aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/wasm
diff options
context:
space:
mode:
authorKeith Randall <keithr@alum.mit.edu>2018-12-04 07:58:18 -0800
committerKeith Randall <khr@golang.org>2018-12-28 20:55:36 +0000
commit69c2c56453cdea1ad32d50fc82193f06b1b33f93 (patch)
tree68923304deca5d767ceff2dca690faffb7b58616 /src/cmd/compile/internal/wasm
parentc043fc4f655ce34f67a0e7fe2833139f6313a3f0 (diff)
downloadgo-69c2c56453cdea1ad32d50fc82193f06b1b33f93.tar.gz
go-69c2c56453cdea1ad32d50fc82193f06b1b33f93.zip
cmd/compile,runtime: redo mid-stack inlining tracebacks
Work involved in getting a stack trace is divided between runtime.Callers and runtime.CallersFrames. Before this CL, runtime.Callers returns a pc per runtime frame. runtime.CallersFrames is responsible for expanding a runtime frame into potentially multiple user frames. After this CL, runtime.Callers returns a pc per user frame. runtime.CallersFrames just maps those to user frame info. Entries in the result of runtime.Callers are now pcs of the calls (or of the inline marks), not of the instruction just after the call. Fixes #29007 Fixes #28640 Update #26320 Change-Id: I1c9567596ff73dc73271311005097a9188c3406f Reviewed-on: https://go-review.googlesource.com/c/152537 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/cmd/compile/internal/wasm')
-rw-r--r--src/cmd/compile/internal/wasm/ssa.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/wasm/ssa.go b/src/cmd/compile/internal/wasm/ssa.go
index d82b1f7953..6e6dc557b4 100644
--- a/src/cmd/compile/internal/wasm/ssa.go
+++ b/src/cmd/compile/internal/wasm/ssa.go
@@ -58,8 +58,8 @@ func zeroAuto(pp *gc.Progs, n *gc.Node) {
}
}
-func ginsnop(pp *gc.Progs) {
- pp.Prog(wasm.ANop)
+func ginsnop(pp *gc.Progs) *obj.Prog {
+ return pp.Prog(wasm.ANop)
}
func ssaMarkMoves(s *gc.SSAGenState, b *ssa.Block) {
@@ -134,10 +134,12 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
if sym, ok := v.Aux.(*obj.LSym); ok {
p := s.Prog(obj.ACALL)
p.To = obj.Addr{Type: obj.TYPE_MEM, Name: obj.NAME_EXTERN, Sym: sym}
+ p.Pos = v.Pos
} else {
getValue64(s, v.Args[0])
p := s.Prog(obj.ACALL)
p.To = obj.Addr{Type: obj.TYPE_NONE}
+ p.Pos = v.Pos
}
case ssa.OpWasmLoweredMove: