cmd/compile: remove Node.Ntest, Node.Stkdelta
$ sizeof -p cmd/compile/internal/gc Node
Node 272
$
Change-Id: I3d9b67eebfc0be0a4b9768d3de3dc76300abd89c
Reviewed-on: https://go-review.googlesource.com/10521
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
diff --git a/src/cmd/compile/internal/gc/gen.go b/src/cmd/compile/internal/gc/gen.go
index ac436f0..dfc3911 100644
--- a/src/cmd/compile/internal/gc/gen.go
+++ b/src/cmd/compile/internal/gc/gen.go
@@ -788,10 +788,10 @@
lab.Continpc = continpc
}
- gen(n.Right) // contin: incr
- Patch(p1, Pc) // test:
- Bgen(n.Ntest, false, -1, breakpc) // if(!test) goto break
- Genlist(n.Nbody) // body
+ gen(n.Right) // contin: incr
+ Patch(p1, Pc) // test:
+ Bgen(n.Left, false, -1, breakpc) // if(!test) goto break
+ Genlist(n.Nbody) // body
gjmp(continpc)
Patch(breakpc, Pc) // done:
continpc = scontin
@@ -802,15 +802,15 @@
}
case OIF:
- p1 := gjmp(nil) // goto test
- p2 := gjmp(nil) // p2: goto else
- Patch(p1, Pc) // test:
- Bgen(n.Ntest, false, int(-n.Likely), p2) // if(!test) goto p2
- Genlist(n.Nbody) // then
- p3 := gjmp(nil) // goto done
- Patch(p2, Pc) // else:
- Genlist(n.Rlist) // else
- Patch(p3, Pc) // done:
+ p1 := gjmp(nil) // goto test
+ p2 := gjmp(nil) // p2: goto else
+ Patch(p1, Pc) // test:
+ Bgen(n.Left, false, int(-n.Likely), p2) // if(!test) goto p2
+ Genlist(n.Nbody) // then
+ p3 := gjmp(nil) // goto done
+ Patch(p2, Pc) // else:
+ Genlist(n.Rlist) // else
+ Patch(p3, Pc) // done:
case OSWITCH:
sbreak := breakpc