1
0
mirror of https://github.com/golang/go synced 2024-10-04 06:31:22 -06:00
go/src/cmd/cc
Keith Randall 1b45cc45e3 runtime: redo stack map entries to avoid false retention
Change two-bit stack map entries to encode:
0 = dead
1 = scalar
2 = pointer
3 = multiword

If multiword, the two-bit entry for the following word encodes:
0 = string
1 = slice
2 = iface
3 = eface

That way, during stack scanning we can check if a string
is zero length or a slice has zero capacity.  We can avoid
following the contained pointer in those cases.  It is safe
to do so because it can never be dereferenced, and it is
desirable to do so because it may cause false retention
of the following block in memory.

Slice feature turned off until issue 7564 is fixed.

Update #7549

LGTM=rsc
R=golang-codereviews, bradfitz, rsc
CC=golang-codereviews
https://golang.org/cl/76380043
2014-03-25 14:11:34 -07:00
..
acid.c 8c: fixes for Plan 9 build 2011-07-01 09:50:24 -04:00
bits.c 8c: fixes for Plan 9 build 2011-07-01 09:50:24 -04:00
bv.c cmd/dist: Plan 9 build needs an additional include path 2013-09-06 16:15:44 +10:00
cc.h cmd/cc, cmd/5c, cmd/6c, cmd/8c: introduce linkarchinit and add amd64p32 support 2014-03-07 09:55:59 +11:00
cc.y cmd/cc: support 21-bit runes in wide string constants 2013-06-04 16:30:55 -07:00
com64.c cmd/cc: grow some global arrays 2012-02-23 22:45:55 -05:00
com.c build: remove various uses of C undefined behavior 2013-09-09 15:07:23 -04:00
dcl.c cmd/cc: support 21-bit runes in wide string constants 2013-06-04 16:30:55 -07:00
doc.go cmd/godoc: use go/build to determine package and example files 2013-02-19 11:19:58 -08:00
dpchk.c cmd/cc,runtime: change preprocessor to expand macros inside of 2013-08-29 12:36:59 -07:00
funct.c all: fix typos 2013-06-09 21:50:24 +08:00
godefs.c cmd/cc: map C int to int32 in Go defs 2012-10-06 13:56:12 +08:00
lex.c cmd/cc, cmd/5c, cmd/6c, cmd/8c: introduce linkarchinit and add amd64p32 support 2014-03-07 09:55:59 +11:00
lexbody cmd/cc, cmd/gc: update compilers, assemblers for liblink changes 2013-12-16 12:51:38 -05:00
mac.c cc: fixes for Plan 9 build 2011-07-13 16:01:29 -07:00
macbody cmd/5c, cmd/6c, cmd/8c: use liblink 2013-12-08 22:51:31 -05:00
Makefile cmd/cc: add PREFETCH built-in (like SET, USED) 2012-05-02 16:22:56 -04:00
omachcap.c 8c: fixes for Plan 9 build 2011-07-01 09:50:24 -04:00
pgen.c runtime: redo stack map entries to avoid false retention 2014-03-25 14:11:34 -07:00
pswt.c cmd/5c, cmd/6c, cmd/8c: use liblink 2013-12-08 22:51:31 -05:00
scon.c cmd/6c, cmd/6g, cmd/cc: fix undefined behavior warnings 2013-09-17 13:43:27 +10:00
sub.c cmd/5c, cmd/6c, cmd/8c: use liblink 2013-12-08 22:51:31 -05:00
y.tab.c cmd/cc: support 21-bit runes in wide string constants 2013-06-04 16:30:55 -07:00
y.tab.h cmd/cc: support 21-bit runes in wide string constants 2013-06-04 16:30:55 -07:00