X7ROOT File Manager
Current Path:
/opt/golang/1.19.4/src/cmd/compile/internal/escape
opt
/
golang
/
1.19.4
/
src
/
cmd
/
compile
/
internal
/
escape
/
📁
..
📄
assign.go
(2.95 KB)
📄
call.go
(12.61 KB)
📄
desugar.go
(1.16 KB)
📄
escape.go
(12.31 KB)
📄
expr.go
(8.78 KB)
📄
graph.go
(8.15 KB)
📄
leaks.go
(2.58 KB)
📄
solve.go
(7.84 KB)
📄
stmt.go
(4.69 KB)
📄
utils.go
(6.3 KB)
Editing: desugar.go
// Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package escape import ( "cmd/compile/internal/base" "cmd/compile/internal/ir" "cmd/compile/internal/typecheck" "cmd/compile/internal/types" ) // TODO(mdempsky): Desugaring doesn't belong during escape analysis, // but for now it's the most convenient place for some rewrites. // fixRecoverCall rewrites an ORECOVER call into ORECOVERFP, // adding an explicit frame pointer argument. // If call is not an ORECOVER call, it's left unmodified. func fixRecoverCall(call *ir.CallExpr) { if call.Op() != ir.ORECOVER { return } pos := call.Pos() // FP is equal to caller's SP plus FixedFrameSize. var fp ir.Node = ir.NewCallExpr(pos, ir.OGETCALLERSP, nil, nil) if off := base.Ctxt.Arch.FixedFrameSize; off != 0 { fp = ir.NewBinaryExpr(fp.Pos(), ir.OADD, fp, ir.NewInt(off)) } // TODO(mdempsky): Replace *int32 with unsafe.Pointer, without upsetting checkptr. fp = ir.NewConvExpr(pos, ir.OCONVNOP, types.NewPtr(types.Types[types.TINT32]), fp) call.SetOp(ir.ORECOVERFP) call.Args = []ir.Node{typecheck.Expr(fp)} }
Upload File
Create Folder