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

Issue 9643001: Inline functions that use arguments object in f.apply(o, arguments) pattern. (Closed)

Created:
8 years, 9 months ago by Vyacheslav Egorov (Chromium)
Modified:
8 years, 9 months ago
Reviewers:
fschneider
CC:
v8-dev
Visibility:
Public.

Description

Inline functions that use arguments object in f.apply(o, arguments) pattern. Support arguments materialization after deoptimization in all frames (not only in topmost one). R=fschneider@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=11008

Patch Set 1 #

Patch Set 2 : fix wrapping of the receiver and port to arm&x64 #

Total comments: 5

Patch Set 3 : regression test #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+277 lines, -73 lines) Patch
M src/arm/lithium-arm.h View 1 2 chunks +16 lines, -1 line 0 comments Download
M src/arm/lithium-arm.cc View 1 1 chunk +8 lines, -0 lines 0 comments Download
M src/arm/lithium-codegen-arm.cc View 1 2 chunks +13 lines, -6 lines 0 comments Download
M src/deoptimizer.cc View 1 chunk +0 lines, -1 line 0 comments Download
M src/flag-definitions.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/hydrogen.cc View 1 5 chunks +87 lines, -21 lines 0 comments Download
M src/hydrogen-instructions.h View 1 2 chunks +21 lines, -1 line 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 2 chunks +12 lines, -6 lines 0 comments Download
M src/ia32/lithium-ia32.h View 1 2 chunks +21 lines, -5 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 1 1 chunk +11 lines, -3 lines 0 comments Download
M src/runtime.cc View 2 chunks +26 lines, -16 lines 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 2 chunks +12 lines, -6 lines 0 comments Download
M src/x64/lithium-x64.h View 1 2 chunks +16 lines, -1 line 0 comments Download
M src/x64/lithium-x64.cc View 1 1 chunk +8 lines, -0 lines 0 comments Download
M test/mjsunit/compiler/inline-arguments.js View 1 2 1 chunk +25 lines, -6 lines 1 comment Download

Messages

Total messages: 3 (0 generated)
Vyacheslav Egorov (Chromium)
8 years, 9 months ago (2012-03-08 15:50:06 UTC) #1
Vyacheslav Egorov (Chromium)
this is ready for the review
8 years, 9 months ago (2012-03-09 15:55:43 UTC) #2
fschneider
8 years, 9 months ago (2012-03-12 10:13:32 UTC) #3
lgtm

https://chromiumcodereview.appspot.com/9643001/diff/3001/src/hydrogen.cc
File src/hydrogen.cc (right):

https://chromiumcodereview.appspot.com/9643001/diff/3001/src/hydrogen.cc#newc...
src/hydrogen.cc:5233: // If the function uses arguments object check that
inlining of functions
[...] uses _the_ arguments object [...]

https://chromiumcodereview.appspot.com/9643001/diff/3001/src/hydrogen.cc#newc...
src/hydrogen.cc:5234: // with arguments object is enabled and variable arguments
is stack allocated.
[...] and the arguments-variable [...]

https://chromiumcodereview.appspot.com/9643001/diff/3001/src/hydrogen.cc#newc...
src/hydrogen.cc:5707: if (!receiver->IsAllocateObject()) {
You can use receiver->type().IsJSObject() instead. Result of object-literal is
also a JSObject for example.

https://chromiumcodereview.appspot.com/9643001/diff/3001/src/runtime.cc
File src/runtime.cc (right):

https://chromiumcodereview.appspot.com/9643001/diff/3001/src/runtime.cc#newco...
src/runtime.cc:8478: MaterializeArgumentsObjectInFrame(isolate, frame);
You could move this into the loop above with iterating from [0..jsframes[

https://chromiumcodereview.appspot.com/9643001/diff/3001/src/x64/lithium-x64.cc
File src/x64/lithium-x64.cc (right):

https://chromiumcodereview.appspot.com/9643001/diff/3001/src/x64/lithium-x64....
src/x64/lithium-x64.cc:1096: LOperand* receiver =
UseRegisterAtStart(instr->receiver());
I think it does not matter with DefineSameAsFirst, but on ia32 this is defined
as UseRegister. Maybe we should be consistent.

https://chromiumcodereview.appspot.com/9643001/diff/7001/test/mjsunit/compile...
File test/mjsunit/compiler/inline-arguments.js (right):

https://chromiumcodereview.appspot.com/9643001/diff/7001/test/mjsunit/compile...
test/mjsunit/compiler/inline-arguments.js:34: assertTrue(this instanceof A);
Maybe also add a test where the receiver is wrapped. null or undefined, etc.

Powered by Google App Engine
This is Rietveld 408576698