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

Issue 6384020: Remove the redundant load on every context lookup. (Closed)

Created:
9 years, 10 months ago by Kevin Millikin (Chromium)
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Remove the redundant load on every context lookup. There was an unnecessary load on every statically-resolved context lookup. Remove it. This revealed a hidden bug in const initializers inside 'with'. They claim to be statically resolved (having slot type CONTEXT) but they occur in a spot where the runtime context chain and the static scope chain do not agree. This is fixed by special casing const initializers in the backend. Committed: http://code.google.com/p/v8/source/detail?r=6635

Patch Set 1 #

Total comments: 4

Patch Set 2 : Addressed review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -64 lines) Patch
M src/ia32/full-codegen-ia32.cc View 4 chunks +53 lines, -31 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 chunk +2 lines, -6 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 1 1 chunk +3 lines, -1 line 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 1 chunk +15 lines, -5 lines 0 comments Download
M src/prettyprinter.cc View 2 chunks +4 lines, -21 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Kevin Millikin (Chromium)
This is only implemented on IA32. It would be simple to port. I left the ...
9 years, 10 months ago (2011-02-04 10:45:38 UTC) #1
fschneider
LGTM. http://codereview.chromium.org/6384020/diff/1/src/ia32/lithium-ia32.cc File src/ia32/lithium-ia32.cc (right): http://codereview.chromium.org/6384020/diff/1/src/ia32/lithium-ia32.cc#newcode1697 src/ia32/lithium-ia32.cc:1697: value = UseRegisterAtStart(instr->value()); This is perfectly valid, but ...
9 years, 10 months ago (2011-02-04 11:29:58 UTC) #2
Kevin Millikin (Chromium)
9 years, 10 months ago (2011-02-04 11:51:48 UTC) #3
http://codereview.chromium.org/6384020/diff/1/src/ia32/lithium-ia32.cc
File src/ia32/lithium-ia32.cc (right):

http://codereview.chromium.org/6384020/diff/1/src/ia32/lithium-ia32.cc#newcod...
src/ia32/lithium-ia32.cc:1697: value = UseRegisterAtStart(instr->value());
On 2011/02/04 11:29:58, fschneider wrote:
> This is perfectly valid, but i think the AtStart will not have any benefit
since
> there are no temps or result registers here.

I was trying to be consistent, but I guess UseRegister is a safer default so
I'll switch to that.

http://codereview.chromium.org/6384020/diff/1/src/ia32/macro-assembler-ia32.cc
File src/ia32/macro-assembler-ia32.cc (right):

http://codereview.chromium.org/6384020/diff/1/src/ia32/macro-assembler-ia32.c...
src/ia32/macro-assembler-ia32.cc:1537: cmp(dst, Operand(dst,
Context::SlotOffset(Context::FCONTEXT_INDEX)));
On 2011/02/04 11:29:58, fschneider wrote:
> Shouldn't this be inside
> if (FLAG_debug_code)?

Good catch.

Powered by Google App Engine
This is Rietveld 408576698