Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Issue 147075: Allocate arguments object on-demand instead of at function entry.... (Closed)

Created:
11 years, 6 months ago by Kasper Lund
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Allocate arguments object on-demand instead of at function entry. This allows Function.prototype.apply to not allocate the objects and copy the arguments directly from the stack. Committed: http://code.google.com/p/v8/source/detail?r=2256

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+542 lines, -76 lines) Patch
M src/accessors.cc View 1 chunk +4 lines, -1 line 0 comments Download
M src/ast.h View 2 chunks +12 lines, -4 lines 0 comments Download
M src/ast.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/ia32/codegen-ia32.h View 5 chunks +24 lines, -2 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 8 chunks +296 lines, -49 lines 4 comments Download
M src/parser.cc View 1 chunk +2 lines, -1 line 0 comments Download
M src/runtime.js View 1 chunk +3 lines, -2 lines 0 comments Download
M src/scopes.h View 1 chunk +1 line, -1 line 0 comments Download
M src/scopes.cc View 9 chunks +13 lines, -10 lines 0 comments Download
M src/variables.h View 3 chunks +10 lines, -3 lines 0 comments Download
M src/variables.cc View 1 chunk +2 lines, -2 lines 0 comments Download
A test/mjsunit/arguments-apply.js View 1 chunk +127 lines, -0 lines 0 comments Download
A test/mjsunit/arguments-lazy.js View 1 chunk +47 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Kasper Lund
11 years, 6 months ago (2009-06-24 06:52:19 UTC) #1
Kasper Lund
http://codereview.chromium.org/147075/diff/1/5 File src/ia32/codegen-ia32.cc (right): http://codereview.chromium.org/147075/diff/1/5#newcode2267 Line 2267: Result a2 = frame_->Pop(); It would be nice ...
11 years, 6 months ago (2009-06-24 06:55:07 UTC) #2
Mads Ager (chromium)
11 years, 6 months ago (2009-06-24 07:52:16 UTC) #3
LGTM

Hairy stuff.  Do we want to do this on ARM.  We should do this on x64 as well. 
Maybe just add TODO(x64) for now in the codegen paths that need to change?

http://codereview.chromium.org/147075/diff/1/5
File src/ia32/codegen-ia32.cc (right):

http://codereview.chromium.org/147075/diff/1/5#newcode570
Line 570: return (scope_->num_heap_slots() > 0)
Could you add a short comment explaining the reason for doing eager allocation
when there are heap slots?

http://codereview.chromium.org/147075/diff/1/5#newcode2187
Line 2187: // Verify that we're invoking is Function.prototype.apply.
invoking is -> invoking

http://codereview.chromium.org/147075/diff/1/5#newcode2263
Line 2263: // Flip the apply function and the function we to call on the stack,
we to -> to

Powered by Google App Engine
This is Rietveld 408576698