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

Issue 342035: Move the Location class into the AST Expression class as a member.... (Closed)

Created:
11 years, 1 month ago by Kevin Millikin (Chromium)
Modified:
9 years, 7 months ago
Reviewers:
William Hesse
CC:
v8-dev
Visibility:
Public.

Description

Move the Location class into the AST Expression class as a member. Since it is (currently) only an enum, change it to an enum (for now). Committed: http://code.google.com/p/v8/source/detail?r=3181

Patch Set 1 #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+267 lines, -454 lines) Patch
M src/arm/fast-codegen-arm.cc View 26 chunks +69 lines, -92 lines 2 comments Download
M src/ast.h View 3 chunks +10 lines, -5 lines 0 comments Download
M src/compiler.cc View 15 chunks +32 lines, -67 lines 2 comments Download
M src/fast-codegen.h View 1 chunk +4 lines, -7 lines 0 comments Download
M src/fast-codegen.cc View 2 chunks +6 lines, -19 lines 0 comments Download
M src/ia32/fast-codegen-ia32.cc View 24 chunks +74 lines, -97 lines 2 comments Download
D src/location.h View 1 chunk +0 lines, -62 lines 0 comments Download
M src/x64/fast-codegen-x64.cc View 24 chunks +72 lines, -96 lines 2 comments Download
M tools/gyp/v8.gyp View 1 chunk +0 lines, -1 line 0 comments Download
M tools/visual_studio/v8_base.vcproj View 1 chunk +0 lines, -4 lines 0 comments Download
M tools/visual_studio/v8_base_arm.vcproj View 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Kevin Millikin (Chromium)
11 years, 1 month ago (2009-10-29 14:23:38 UTC) #1
William Hesse
LGTM. http://codereview.chromium.org/342035/diff/1/12 File src/arm/fast-codegen-arm.cc (right): http://codereview.chromium.org/342035/diff/1/12#newcode179 Line 179: ASSERT_EQ(Expression::kValue, expr->context()); Why are you dropping the ...
11 years, 1 month ago (2009-10-29 15:15:24 UTC) #2
Kevin Millikin (Chromium)
11 years, 1 month ago (2009-10-29 16:36:10 UTC) #3
http://codereview.chromium.org/342035/diff/1/12
File src/arm/fast-codegen-arm.cc (right):

http://codereview.chromium.org/342035/diff/1/12#newcode179
Line 179: ASSERT_EQ(Expression::kValue, expr->context());
On 2009/10/29 15:15:25, William Hesse wrote:
> Why are you dropping the optimization for a constant literal here?

As part of getting rid of the move "location" -> register, I was trying to
simplify the code here since we have plans to make the subexpression responsible
for putting itself in r0.  I'll put the shortcut back in for now.

http://codereview.chromium.org/342035/diff/1/8
File src/compiler.cc (right):

http://codereview.chromium.org/342035/diff/1/8#newcode58
Line 58: void ProcessExpression(Expression::Context context, Expression* expr) {
On 2009/10/29 15:15:25, William Hesse wrote:
> Could this be called VisitExpression?
> I think the expression should be the first argument, and how you visit it
should
> be the second.

I will change the order of arguments, and I'm open to changing the name.

I don't want to call it "VisitExpression" because it's too easy to get it
confused with the other Visit<AST node type> functions, and it's subtly
different.

http://codereview.chromium.org/342035/diff/1/6
File src/ia32/fast-codegen-ia32.cc (right):

http://codereview.chromium.org/342035/diff/1/6#newcode168
Line 168: __ pop(eax);
On 2009/10/29 15:15:25, William Hesse wrote:
> Restore optimization?

Done.

http://codereview.chromium.org/342035/diff/1/9
File src/x64/fast-codegen-x64.cc (left):

http://codereview.chromium.org/342035/diff/1/9#oldcode463
Line 463: Location destination = expr->location();
On 2009/10/29 15:15:25, William Hesse wrote:
> Why wasn't this giving an "unused" warning before?

Dunno.

Powered by Google App Engine
This is Rietveld 408576698