Commit 40f5e675 authored by Dmitriy Vyukov's avatar Dmitriy Vyukov

runtime: minor improvement of string scanning

If we set obj, then it will be enqueued for marking at the end of the scanning loop.
This is not necessary, since we've already marked it.
This can wait for 1.4 if you wish.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/80030043
parent 61f2fabd
......@@ -913,10 +913,8 @@ scanblock(Workbuf *wbuf, bool keepworking)
case GC_STRING:
stringptr = (String*)(stack_top.b + pc[1]);
if(stringptr->len != 0) {
obj = stringptr->str;
markonly(obj);
}
if(stringptr->len != 0)
markonly(stringptr->str);
pc += 2;
continue;
......
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