http://codereview.appspot.com/4313062/diff/2001/src/cmd/gc/subr.c File src/cmd/gc/subr.c (left): http://codereview.appspot.com/4313062/diff/2001/src/cmd/gc/subr.c#oldcode1135 src/cmd/gc/subr.c:1135: if(debug['r']) { Would you mind leaving these in, just ...
14 years, 1 month ago
(2011-03-31 15:21:51 UTC)
#1
all done, the tree compiles and timngs of the benchmark still same. http://codereview.appspot.com/4313062/diff/10011/src/cmd/6g/gsubr.c File src/cmd/6g/gsubr.c ...
i started on the 8g stuff but took it out as it's unlikely that i can get all
the bugs stamped out before i go offline for a few weeks.
will test all again and submit as discussed.
http://codereview.appspot.com/4313062/diff/23001/src/cmd/gc/walk.c
File src/cmd/gc/walk.c (right):
http://codereview.appspot.com/4313062/diff/23001/src/cmd/gc/walk.c#newcode2398
src/cmd/gc/walk.c:2398: n->right = n->left; // s = append(s) => s = s (ONOP?)
On 2011/04/14 15:12:08, rsc wrote:
> n->op = OEMPTY;
Done.
http://codereview.appspot.com/4313062/diff/23001/src/cmd/gc/walk.c#newcode2402
src/cmd/gc/walk.c:2402: walkexprlistsafe(n->list, init);
On 2011/04/14 15:12:08, rsc wrote:
> move this one line down.
> you have to get the side effects from n->left onto init
> (via cheapexpr) before the side effects from n->list
> (via walkexprlistsafe), because the language spec says
> that the side effects (that is, function calls) are
> executed in the order on the line.
>
> right now n->left is always simple (just a name)
> so it doesn't really matter, but it's worth getting
> right now in case the code expands its scope later.
>
> for the same reason, move both lines up above the
> argc check, so that you have:
>
> ns = cheapexpr...
> walkexprlistsafe...
>
> argc = ...
> ...
Done.
http://codereview.appspot.com/4313062/diff/23001/src/pkg/runtime/append_test.go
File src/pkg/runtime/append_test.go (right):
http://codereview.appspot.com/4313062/diff/23001/src/pkg/runtime/append_test....
src/pkg/runtime/append_test.go:6:
On 2011/04/14 15:12:08, rsc wrote:
> since you've got a test file anyway, please add the test case
> i sent in my last code review
Done.
http://codereview.appspot.com/4313062/diff/23001/src/pkg/runtime/slice.c
File src/pkg/runtime/slice.c (right):
http://codereview.appspot.com/4313062/diff/23001/src/pkg/runtime/slice.c#newc...
src/pkg/runtime/slice.c:99: if (n < 1) { // if we're gonna check, but only to
panic about it we may as well ignore it
On 2011/04/14 15:12:08, rsc wrote:
> I still have no idea what this comment says.
> Just delete the whole statement.
first i thought i should check newcap >= cap, in the if... panic below, but then
i thought if i'm going to pay the price of chekcing it, i may as well do it to
handle it gracefully. then again, growslice should never be called with a
negative argument
done as discussed
Issue 4313062: code review 4313062: gc: inline append when len<cap
(Closed)
Created 14 years, 1 month ago by lvd
Modified 13 years, 11 months ago
Reviewers: peterGo
Base URL:
Comments: 55