From: Jan Ziak <0xe2.0x9a.0x9b@gmail.com> Date: Thu, 21 Mar 2013 18:00:02 +0000 (+0100) Subject: runtime: mark strings without going through an intermediate buffer X-Git-Tag: go1.1rc2~406 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=ec8caf696ae44b9ea4624025a613dad4301398c4;p=gostls13.git runtime: mark strings without going through an intermediate buffer R=rsc CC=golang-dev https://golang.org/cl/7949043 --- diff --git a/src/pkg/runtime/mgc0.c b/src/pkg/runtime/mgc0.c index dd268fcda0..aa499f4762 100644 --- a/src/pkg/runtime/mgc0.c +++ b/src/pkg/runtime/mgc0.c @@ -740,8 +740,9 @@ scanblock(Workbuf *wbuf, Obj *wp, uintptr nobj, bool keepworking) case GC_STRING: obj = *(void**)(stack_top.b + pc[1]); + markonly(obj); pc += 2; - break; + continue; case GC_EFACE: eface = (Eface*)(stack_top.b + pc[1]); @@ -804,9 +805,9 @@ scanblock(Workbuf *wbuf, Obj *wp, uintptr nobj, bool keepworking) break; case GC_DEFAULT_PTR: - while((i = stack_top.b) <= end_b) { + while(stack_top.b <= end_b) { + obj = *(byte**)stack_top.b; stack_top.b += PtrSize; - obj = *(byte**)i; if(obj >= arena_start && obj < arena_used) { *ptrbufpos++ = (PtrTarget){obj, 0}; if(ptrbufpos == ptrbuf_end)