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

Issue 456024: Refactor code for generating assignments in the fast compiler.... (Closed)

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

Description

Refactor code for generating assignments in the fast compiler. 1. Refactor the structure of VisitAssignment: The existing code is not ideal to be extended with support for compound assignments. 2. Reuse common code for keyed property assigments: Now variables rewritten to a property (.arguments access) are treated like normal keyed property assignments. This allows us to remove some code duplication. Committed: http://code.google.com/p/v8/source/detail?r=3425

Patch Set 1 #

Total comments: 6

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 3

Patch Set 5 : '' #

Patch Set 6 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -129 lines) Patch
M src/arm/fast-codegen-arm.cc View 1 2 3 4 5 2 chunks +1 line, -30 lines 0 comments Download
M src/compiler.cc View 2 chunks +9 lines, -16 lines 0 comments Download
M src/fast-codegen.cc View 1 2 3 4 5 1 chunk +28 lines, -22 lines 0 comments Download
M src/ia32/fast-codegen-ia32.cc View 1 2 3 4 5 2 chunks +1 line, -30 lines 0 comments Download
M src/x64/fast-codegen-x64.cc View 1 2 3 4 5 2 chunks +1 line, -31 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
fschneider
This change is a starting point for supporting compound assignments and generic pre-/postfix operations in ...
11 years ago (2009-12-01 17:24:49 UTC) #1
Kevin Millikin (Chromium)
LGTM. You might still wait for comments from Lasse because I'm kind of out of ...
11 years ago (2009-12-02 09:50:59 UTC) #2
Lasse Reichstein
What Kevin said. LGTM
11 years ago (2009-12-03 09:13:12 UTC) #3
fschneider
http://codereview.chromium.org/456024/diff/1/4 File src/fast-codegen.cc (right): http://codereview.chromium.org/456024/diff/1/4#newcode510 src/fast-codegen.cc:510: enum { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; On 2009/12/02 09:50:59, ...
11 years ago (2009-12-03 13:43:50 UTC) #4
fschneider
Another small simplification of the code. http://codereview.chromium.org/456024/diff/11001/9007 File src/fast-codegen.cc (right): http://codereview.chromium.org/456024/diff/11001/9007#newcode512 src/fast-codegen.cc:512: Variable* var = ...
11 years ago (2009-12-04 09:54:45 UTC) #5
Kevin Millikin (Chromium)
LGTM, if you add the asserts mentioned below to be extra defensive. http://codereview.chromium.org/456024/diff/11001/9007 File src/fast-codegen.cc ...
11 years ago (2009-12-04 12:10:51 UTC) #6
fschneider
11 years ago (2009-12-04 14:22:06 UTC) #7
http://codereview.chromium.org/456024/diff/11001/9007
File src/fast-codegen.cc (right):

http://codereview.chromium.org/456024/diff/11001/9007#newcode512
src/fast-codegen.cc:512: Variable* var =
expr->target()->AsVariableProxy()->AsVariable();
On 2009/12/04 12:10:51, Kevin Millikin wrote:
> On 2009/12/04 09:54:45, fschneider wrote:
> > In case of a variable rewritten to a property, this expression return NULL:
> > proxy->AsVariable() returns NULL if (proxy->rewrite_->AsSlot() == NULL).
> That's
> > why we set the context of obj and key is set to kValue and not
kUninitialized.
> 
> I see.  Then there is dead code in CodeGenSelector::VisitAssignmnent that
should
> be removed.
> 

Done.


> Also, could you check for the places we set contexts on the subexpressions of
a
> variable rewrite that is a property, and assert that they are either
unitialized
> before setting or not changed by setting?

Done.

Powered by Google App Engine
This is Rietveld 408576698