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

Issue 339004: Eliminate the constant location used for literals in the AST.... (Closed)

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

Description

Eliminate the constant location used for literals in the AST. Literals now have a location of temporary by default and are responsible for moving themselves into their location like all other expressions. The constant location turned out not to allow us to avoid checking subexpressions in AST interior nodes, and it turned out to require checking after some normal calls to Visit (like for the arguments to a call). With this change do not have to check after a call to Visit that we got our result in the expected location. Committed: http://code.google.com/p/v8/source/detail?r=3137

Patch Set 1 #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+198 lines, -248 lines) Patch
M src/arm/fast-codegen-arm.cc View 11 chunks +65 lines, -83 lines 3 comments Download
M src/compiler.cc View 1 chunk +1 line, -2 lines 0 comments Download
M src/fast-codegen.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M src/ia32/fast-codegen-ia32.cc View 12 chunks +65 lines, -78 lines 3 comments Download
M src/location.h View 1 chunk +1 line, -3 lines 0 comments Download
M src/x64/fast-codegen-x64.cc View 12 chunks +66 lines, -77 lines 3 comments Download

Messages

Total messages: 2 (0 generated)
Kevin Millikin (Chromium)
11 years, 1 month ago (2009-10-26 16:37:25 UTC) #1
fschneider
11 years, 1 month ago (2009-10-26 17:57:19 UTC) #2
LGTM.

Small comments about inserting ASSERTs to be more consistent in our code.

http://codereview.chromium.org/339004/diff/1/7
File src/arm/fast-codegen-arm.cc (right):

http://codereview.chromium.org/339004/diff/1/7#newcode480
Line 480: }
Add an assert here to be consistent with the rest of the code:

else { ASSERT(destination.is_nowhere()); }

http://codereview.chromium.org/339004/diff/1/7#newcode574
Line 574: if (destination.is_temporary()) __ push(r0);
May want to add an assert here to be consistent with the rest of the code:

else ASSERT(destination.is_nowhere());

http://codereview.chromium.org/339004/diff/1/7#newcode581
Line 581: }
Add an assert:

else {
  ASSERT(destination.is_nowhere());
}

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

http://codereview.chromium.org/339004/diff/1/2#newcode475
Line 475: __ push(eax);
Add an assert here to be consistent with the rest of the code:

else { ASSERT(destination.is_nowhere()); }

http://codereview.chromium.org/339004/diff/1/2#newcode571
Line 571: if (destination.is_temporary()) __ push(eax);
May want to add an assert here to be consistent with the rest of the code:

else ASSERT(destination.is_nowhere());

http://codereview.chromium.org/339004/diff/1/2#newcode582
Line 582: __ pop(eax);
Adding an assert to be consistent on all platforms:

ASSERT(destination.is_nowhere());

http://codereview.chromium.org/339004/diff/1/4
File src/x64/fast-codegen-x64.cc (right):

http://codereview.chromium.org/339004/diff/1/4#newcode487
Line 487: }
Add an assert here to be consistent with the rest of the code:

else { ASSERT(destination.is_nowhere()); }

http://codereview.chromium.org/339004/diff/1/4#newcode582
Line 582: if (destination.is_temporary()) __ push(rax);
May want to add an assert here to be consistent with the rest of the code:

else ASSERT(destination.is_nowhere());

http://codereview.chromium.org/339004/diff/1/4#newcode593
Line 593: __ pop(rax);
Adding an assert to be consistent on all platforms:

ASSERT(destination.is_nowhere());

Powered by Google App Engine
This is Rietveld 408576698