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

Issue 6929066: First step in letting Crankshaft inline functions with a different context. (Closed)

Created:
9 years, 7 months ago by William Hesse
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

First step in letting Crankshaft inline functions with a different context. Use a special slot for HContext, and fetch the value from there each time it is used. Allocate space for special slots in every HEnvironment. Fill them with constant undefined. Do not copy them to LEnvironment. BUG= TEST= Committed: http://code.google.com/p/v8/source/detail?r=7807

Patch Set 1 #

Total comments: 11

Patch Set 2 : Remove commented code, use is_special_index function where possible. #

Patch Set 3 : foo #

Patch Set 4 : foo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+89 lines, -83 lines) Patch
M src/arm/lithium-arm.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/hydrogen.h View 1 2 3 7 chunks +20 lines, -4 lines 0 comments Download
M src/hydrogen.cc View 1 2 3 35 chunks +62 lines, -78 lines 0 comments Download
M src/hydrogen-instructions.h View 1 chunk +1 line, -1 line 0 comments Download
M src/ia32/lithium-ia32.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/x64/lithium-x64.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
William Hesse
9 years, 7 months ago (2011-05-06 11:46:33 UTC) #1
Kevin Millikin (Chromium)
9 years, 7 months ago (2011-05-06 12:29:45 UTC) #2
LGTM with the changes below addressed.

http://codereview.chromium.org/6929066/diff/1/src/arm/lithium-arm.cc
File src/arm/lithium-arm.cc (right):

http://codereview.chromium.org/6929066/diff/1/src/arm/lithium-arm.cc#newcode1018
src/arm/lithium-arm.cc:1018: if (i >= hydrogen_env->parameter_count() &&
if (hydrogen_env->is_special_index(i)) continue;

http://codereview.chromium.org/6929066/diff/1/src/hydrogen.cc
File src/hydrogen.cc (right):

http://codereview.chromium.org/6929066/diff/1/src/hydrogen.cc#newcode2241
src/hydrogen.cc:2241: HInstruction* context = AddInstruction(new(zone())
HContext());
I like to write new(zone()) HContext.

http://codereview.chromium.org/6929066/diff/1/src/hydrogen.cc#newcode2242
src/hydrogen.cc:2242: environment()->Bind(environment()->parameter_count(),
context);
environment()->BindContext(context)

http://codereview.chromium.org/6929066/diff/1/src/hydrogen.cc#newcode2605
src/hydrogen.cc:2605: ASSERT(count == (environment()->parameter_count() +
ASSERT(environment()->ExpressionStackIsEmpty())

http://codereview.chromium.org/6929066/diff/1/src/hydrogen.cc#newcode2618
src/hydrogen.cc:2618: environment()->Bind(environment()->parameter_count(),
context);
environment()->BindContext(context)

http://codereview.chromium.org/6929066/diff/1/src/hydrogen.cc#newcode4123
src/hydrogen.cc:4123: // AddInstruction(environment()->LookupContext());
Remove me.

http://codereview.chromium.org/6929066/diff/1/src/hydrogen.cc#newcode5756
src/hydrogen.cc:5756: int local_count = function->scope()->num_stack_slots() +
specials_count();
Don't call these local_base and local_count since they include more than the
locals.  Use 'base' and 'count', or else write:

inner->BindContext(outer->LookupContext());
int local_base = arity + 2;
int local_count = function->scope()->num_stack_slots();
// Loop from 0 to local_count.

http://codereview.chromium.org/6929066/diff/1/src/hydrogen.cc#newcode5759
src/hydrogen.cc:5759: //  HContext* inner_context = new(zone) HContext;
Remove me.

http://codereview.chromium.org/6929066/diff/1/src/hydrogen.cc#newcode5760
src/hydrogen.cc:5760: // This HContext will be added to the graph by the caller
of this function.
Comment is probably unnecessary, we don't say this anywhere else that we have
HEnvironment::Lookup or HEnvironment::LookupContext.

http://codereview.chromium.org/6929066/diff/1/src/hydrogen.h
File src/hydrogen.h (right):

http://codereview.chromium.org/6929066/diff/1/src/hydrogen.h#newcode355
src/hydrogen.h:355: HValue* LookupContext() const {
Probably should have a BindContext function too, so this class is the only place
that has to know the context's environment index.

http://codereview.chromium.org/6929066/diff/1/src/ia32/lithium-ia32.cc
File src/ia32/lithium-ia32.cc (right):

http://codereview.chromium.org/6929066/diff/1/src/ia32/lithium-ia32.cc#newcod...
src/ia32/lithium-ia32.cc:1013: if (i >= hydrogen_env->parameter_count() &&
hydrogen_env->is_special_index(i)

Powered by Google App Engine
This is Rietveld 408576698