]> Cypherpunks repositories - gostls13.git/commit
runtime: make stack frames fixed size by modifying goproc/deferproc.
authorKeith Randall <khr@golang.org>
Mon, 8 Dec 2014 22:18:58 +0000 (14:18 -0800)
committerKeith Randall <khr@golang.org>
Tue, 23 Dec 2014 01:08:29 +0000 (01:08 +0000)
commit53c5226f9fec0113c182c203b2b6c225938aeced
treed818f78d7e0f6b20a9ad06b6f7cd4edc279abeea
parent005ba4db82c93298dbfdf0866c613f86df713b87
runtime: make stack frames fixed size by modifying goproc/deferproc.

Calls to goproc/deferproc used to push & pop two extra arguments,
the argument size and the function to call.  Now, we allocate space
for those arguments in the outargs section so we don't have to
modify the SP.

Defers now use the stack pointer (instead of the argument pointer)
to identify which frame they are associated with.

A followon CL might simplify funcspdelta and some of the stack
walking code.

Fixes issue #8641

Change-Id: I835ec2f42f0392c5dec7cb0fe6bba6f2aed1dad8
Reviewed-on: https://go-review.googlesource.com/1601
Reviewed-by: Russ Cox <rsc@golang.org>
14 files changed:
src/cmd/5g/ggen.c
src/cmd/6g/ggen.c
src/cmd/8g/ggen.c
src/cmd/9g/ggen.c
src/cmd/gc/go.h
src/cmd/gc/subr.c
src/cmd/gc/walk.c
src/runtime/heapdump.go
src/runtime/panic.go
src/runtime/panic1.go
src/runtime/proc1.go
src/runtime/runtime2.go
src/runtime/stack1.go
src/runtime/traceback.go