Commit ec8caf69 authored by Jan Ziak's avatar Jan Ziak

runtime: mark strings without going through an intermediate buffer

R=rsc
CC=golang-dev
https://golang.org/cl/7949043
parent e95c41f3
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment