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

Issue 10836133: Inline simple setter calls. (Closed)

Created:
8 years, 4 months ago by Sven Panne
Modified:
8 years, 4 months ago
Reviewers:
Michael Starzinger
CC:
v8-dev
Visibility:
Public.

Description

Inline simple setter calls. Currently only simple setter calls are handled (i.e. no calls in count operations or compound assignments), and deoptimization in the setter is not handled at all. Because of the latter, we temporarily hide this feature behind the --inline-accessors flag, just like inlining getters. We now use an enum everywhere we depend on the handling of a return value, passing around several boolean would be more confusing. Made VisitReturnStatement and the final parts of TryInline more similar, so matching them visually is a bit easier now. Simplified the signature of AddLeaveInlined, the target of the HGoto can simply be retrieved from the function state. Committed: https://code.google.com/p/v8/source/detail?r=12286

Patch Set 1 #

Patch Set 2 : Improved acessor inlining tests. #

Patch Set 3 : Use enum instead of 2 booleans. #

Patch Set 4 : Consistently use ReturnHandlingFlag. #

Patch Set 5 : Made VisitReturnStatement and TryInline more similar. Simplified AddLeaveInlined. #

Total comments: 18

Patch Set 6 : Incorporated most review comments of round one. #

Total comments: 8

Patch Set 7 : Incorporated most review comments again... #

Patch Set 8 : Rebased. Extended unit tests. #

Total comments: 2

Patch Set 9 : Added new frame type. Fixed environment lookup. More tests. #

Total comments: 2

Patch Set 10 : Added comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+456 lines, -99 lines) Patch
M src/arm/lithium-arm.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/arm/lithium-codegen-arm.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -2 lines 0 comments Download
M src/hydrogen.h View 1 2 3 4 5 6 7 8 6 chunks +18 lines, -23 lines 0 comments Download
M src/hydrogen.cc View 1 2 3 4 5 6 7 8 9 17 chunks +107 lines, -60 lines 0 comments Download
M src/hydrogen-instructions.h View 1 2 3 4 5 3 chunks +12 lines, -4 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -2 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/mips/lithium-codegen-mips.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -2 lines 0 comments Download
M src/mips/lithium-mips.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -2 lines 0 comments Download
M src/x64/lithium-x64.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
A test/mjsunit/compiler/inline-accessors.js View 1 2 3 4 5 6 7 8 1 chunk +303 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Sven Panne
8 years, 4 months ago (2012-08-08 12:30:02 UTC) #1
Michael Starzinger
First round. https://chromiumcodereview.appspot.com/10836133/diff/4003/src/hydrogen.cc File src/hydrogen.cc (right): https://chromiumcodereview.appspot.com/10836133/diff/4003/src/hydrogen.cc#newcode6876 src/hydrogen.cc:6876: // Falling from the end of an ...
8 years, 4 months ago (2012-08-08 13:05:33 UTC) #2
Sven Panne
Incorporated most comments, I'll have to investigate a failed ASSERT before writing more tests... :-P ...
8 years, 4 months ago (2012-08-08 14:15:20 UTC) #3
Michael Starzinger
One round of nits, otherwise it's looking good. I'll hold off with the final ElGeTeEm ...
8 years, 4 months ago (2012-08-08 15:01:29 UTC) #4
Sven Panne
Incorporated comments and extended test. Now hunting a bug related to a no-arg setter... :-P ...
8 years, 4 months ago (2012-08-09 12:15:32 UTC) #5
Michael Starzinger
https://chromiumcodereview.appspot.com/10836133/diff/4006/test/mjsunit/compiler/inline-accessors.js File test/mjsunit/compiler/inline-accessors.js (right): https://chromiumcodereview.appspot.com/10836133/diff/4006/test/mjsunit/compiler/inline-accessors.js#newcode80 test/mjsunit/compiler/inline-accessors.js:80: assertEquals(obj, this); I would really use assertSame() here instead, ...
8 years, 4 months ago (2012-08-09 12:20:55 UTC) #6
Sven Panne
Done. Extended and fixed version ready for next round of review... :-) https://chromiumcodereview.appspot.com/10836133/diff/4006/test/mjsunit/compiler/inline-accessors.js File test/mjsunit/compiler/inline-accessors.js ...
8 years, 4 months ago (2012-08-09 14:06:37 UTC) #7
Michael Starzinger
8 years, 4 months ago (2012-08-10 08:52:15 UTC) #8
LGTM (with one nit and one important follow-up for the next CL).

https://chromiumcodereview.appspot.com/10836133/diff/9004/src/hydrogen.cc
File src/hydrogen.cc (right):

https://chromiumcodereview.appspot.com/10836133/diff/9004/src/hydrogen.cc#new...
src/hydrogen.cc:5248: Drop(2);
It seems dropping the arguments after doing HChceckConstantFunction is the
correct order, so it was wrong before. This proves that we don't have test
coverage for that and need to add tests. But we can do that in a follow-up CL.

https://chromiumcodereview.appspot.com/10836133/diff/9004/src/hydrogen.cc#new...
src/hydrogen.cc:9299: outer = CreateStubEnvironment(outer, target, JS_SETTER,
arguments);
Can we add a comment specifying which stub is simulated by this artificial
environment?

Powered by Google App Engine
This is Rietveld 408576698