From: Josh Bleecher Snyder Date: Tue, 11 Aug 2015 21:23:08 +0000 (-0700) Subject: [dev.ssa] cmd/compile: fix function call memory accounting X-Git-Tag: go1.7beta1~1623^2^2~288 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=2af06480140dd48a4dc54257c2da46a73ca3ebb5;p=gostls13.git [dev.ssa] cmd/compile: fix function call memory accounting We were not recording function calls as changing the state of memory. As a result, the scheduler was not aware that storing values to the stack in order to make a function call must happen *after* retrieving results from the stack from a just-completed function call. This fixes the container/ring tests. This was my first experience debugging an issue using the HTML output. I'm feeling quite pleased with it. Change-Id: I9e8276846be9fd7a60422911b11816c5175e3d0a Reviewed-on: https://go-review.googlesource.com/13560 Reviewed-by: Keith Randall --- diff --git a/src/cmd/compile/internal/gc/ssa.go b/src/cmd/compile/internal/gc/ssa.go index 13a6d6c009..dcc7de8d04 100644 --- a/src/cmd/compile/internal/gc/ssa.go +++ b/src/cmd/compile/internal/gc/ssa.go @@ -1319,6 +1319,7 @@ func (s *state) expr(n *Node) *ssa.Value { // read result from stack at the start of the fallthrough block s.startBlock(bNext) + s.vars[&memvar] = call var titer Iter fp := Structfirst(&titer, Getoutarg(left.Type)) if fp == nil {