https://codereview.appspot.com/7026044/diff/7001/src/pkg/runtime/proc.c File src/pkg/runtime/proc.c (right): https://codereview.appspot.com/7026044/diff/7001/src/pkg/runtime/proc.c#newcode1125 src/pkg/runtime/proc.c:1125: label.sp = top->gobuf.sp; Can this be label = top->gobuf;
12 years, 2 months ago
(2013-01-04 01:03:33 UTC)
#3
12 years, 2 months ago
(2013-01-08 12:59:02 UTC)
#7
PTAL
https://codereview.appspot.com/7026044/diff/3008/src/pkg/runtime/proc.c
File src/pkg/runtime/proc.c (right):
https://codereview.appspot.com/7026044/diff/3008/src/pkg/runtime/proc.c#newco...
src/pkg/runtime/proc.c:1117: dstend = dst + argsize/PtrSize;
On 2013/01/05 14:09:00, minux wrote:
> how about s/PtrSize/sizeof(*dst)/ ?
Done.
https://codereview.appspot.com/7026044/diff/3008/src/pkg/runtime/proc.c#newco...
src/pkg/runtime/proc.c:1117: dstend = dst + argsize/PtrSize;
On 2013/01/07 05:28:47, rsc wrote:
> On 2013/01/05 14:09:00, minux wrote:
> > how about s/PtrSize/sizeof(*dst)/ ?
>
> Yes please.
>
> However, this word-based copy is only correct if we know argsize is always an
> exact multiple of PtrSize. That's reasonable to demand, but I am not sure if
the
> compilers guarantee it just yet. If you change the linkers to reject object
> files with non-conforming argument sizes, then I'll feel a lot more
comfortable
> about this.
But newstack() contains:
if(argsize % sizeof(uintptr) != 0) throw();
Doesn't argsize is the same in newstack and oldstack?
https://codereview.appspot.com/7026044/diff/3008/src/pkg/runtime/proc.c#newco...
src/pkg/runtime/proc.c:1119: for(; dst != dstend; dst++, src++)
On 2013/01/07 05:28:47, rsc wrote:
> while(dst < dstend)
> *dst++ = *src++;
Done.
https://codereview.appspot.com/7026044/diff/3008/src/pkg/runtime/proc.c#newco...
src/pkg/runtime/proc.c:1168: if(reflectcall) {
On 2013/01/07 05:28:47, rsc wrote:
> On 2013/01/05 14:09:00, minux wrote:
> > so for non reflect.calls, framesize will always be bigger
> > than minalloc?
>
> minalloc is a clumsy hack added so that the garbage collector can use
> a reflect call to get running on a fresh stack frame. It doesn't get used
> otherwise.
I've added a comment here.
https://codereview.appspot.com/7026044/diff/3008/src/pkg/runtime/proc.c#newco...
src/pkg/runtime/proc.c:1223: dstend = dst + argsize/PtrSize;
On 2013/01/05 14:09:00, minux wrote:
> ditto.
Done.
Issue 7026044: code review 7026044: runtime: faster segmented stacks
(Closed)
Created 12 years, 2 months ago by dvyukov
Modified 12 years, 2 months ago
Reviewers:
Base URL:
Comments: 14