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

Issue 9704054: Refactoring of code generation for declarations, in preparation for modules. (Closed)

Created:
8 years, 9 months ago by rossberg
Modified:
8 years, 8 months ago
Reviewers:
fschneider
CC:
v8-dev
Visibility:
Public.

Description

Refactoring of code generation for declarations, in preparation for modules. Do proper dispatch on declaration type instead of mingling together different code generation paths. Once we add more declaration forms, this is more scalable. In separate steps, I'd like to (1) clean up the logic for DeclareGlobal, and (2) try to reduce the special handling of the name function var if possible. R=fschneider@chromium.org BUG= TEST= Committed: https://code.google.com/p/v8/source/detail?r=11331

Patch Set 1 #

Total comments: 8

Patch Set 2 : Addressed Florian's comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+544 lines, -301 lines) Patch
M src/arm/full-codegen-arm.cc View 1 6 chunks +135 lines, -54 lines 0 comments Download
M src/full-codegen.h View 2 chunks +5 lines, -12 lines 0 comments Download
M src/full-codegen.cc View 1 chunk +0 lines, -25 lines 0 comments Download
M src/hydrogen.h View 2 chunks +1 line, -5 lines 0 comments Download
M src/hydrogen.cc View 4 chunks +87 lines, -49 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 6 chunks +133 lines, -51 lines 0 comments Download
M src/parser.cc View 1 1 chunk +9 lines, -9 lines 0 comments Download
M src/runtime.cc View 3 chunks +18 lines, -21 lines 0 comments Download
M src/scopeinfo.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M src/scopes.h View 3 chunks +6 lines, -13 lines 0 comments Download
M src/scopes.cc View 1 5 chunks +14 lines, -8 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 1 6 chunks +133 lines, -51 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
rossberg
8 years, 9 months ago (2012-03-15 13:10:27 UTC) #1
fschneider
lgtm https://chromiumcodereview.appspot.com/9704054/diff/1/src/ia32/full-codegen-ia32.cc File src/ia32/full-codegen-ia32.cc (right): https://chromiumcodereview.appspot.com/9704054/diff/1/src/ia32/full-codegen-ia32.cc#newcode272 src/ia32/full-codegen-ia32.cc:272: != Variable::UNALLOCATED); Break line after the operator to ...
8 years, 8 months ago (2012-04-11 11:00:42 UTC) #2
rossberg
8 years, 8 months ago (2012-04-16 11:25:13 UTC) #3
https://chromiumcodereview.appspot.com/9704054/diff/1/src/ia32/full-codegen-i...
File src/ia32/full-codegen-ia32.cc (right):

https://chromiumcodereview.appspot.com/9704054/diff/1/src/ia32/full-codegen-i...
src/ia32/full-codegen-ia32.cc:272: != Variable::UNALLOCATED);
On 2012/04/11 11:00:42, fschneider wrote:
> Break line after the operator to be consistent with the surrounding code.
> 
> Or since scope()->function() is used outside the ASSERT, you could also store
it
> in a local to make the line shorter.

Done (here and in other back-ends).

https://chromiumcodereview.appspot.com/9704054/diff/1/src/ia32/full-codegen-i...
src/ia32/full-codegen-ia32.cc:754: // The variable in the decl always resides in
the current function
On 2012/04/11 11:00:42, fschneider wrote:
> s/decl/declaration/

Done (here and in other backends).

https://chromiumcodereview.appspot.com/9704054/diff/1/src/parser.cc
File src/parser.cc (right):

https://chromiumcodereview.appspot.com/9704054/diff/1/src/parser.cc#newcode4450
src/parser.cc:4450: function_name, fvar_mode, true, Variable::NORMAL,
kCreatedInitialized);
On 2012/04/11 11:00:42, fschneider wrote:
> Maybe break after each parameter and add a short same-line comment to the
> boolean parameter.

Done.

https://chromiumcodereview.appspot.com/9704054/diff/1/src/scopes.cc
File src/scopes.cc (right):

https://chromiumcodereview.appspot.com/9704054/diff/1/src/scopes.cc#newcode423
src/scopes.cc:423: this, name, mode, true, Variable::NORMAL,
kCreatedInitialized);
On 2012/04/11 11:00:42, fschneider wrote:
> Boolean parameter should have a comment.

Done.

Powered by Google App Engine
This is Rietveld 408576698