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

Issue 7739018: Inline functions with different contexts in the optimizing code generator. (Closed)

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

Description

Inline functions with different contexts in the optimizing code generator. Add HInlinedContext to Hydrogen, and use the context from an environment HValue in all places, not from the context slot in the frame. BUG= TEST=

Patch Set 1 #

Patch Set 2 : Rebase to current tip-of-tree. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+142 lines, -17 lines) Patch
M src/arm/lithium-arm.h View 1 2 chunks +10 lines, -0 lines 0 comments Download
M src/arm/lithium-arm.cc View 1 2 chunks +11 lines, -1 line 1 comment Download
M src/arm/lithium-codegen-arm.cc View 1 1 chunk +7 lines, -0 lines 1 comment Download
M src/ast.cc View 1 1 chunk +3 lines, -1 line 0 comments Download
M src/hydrogen.h View 1 2 chunks +8 lines, -1 line 0 comments Download
M src/hydrogen.cc View 1 4 chunks +20 lines, -8 lines 0 comments Download
M src/hydrogen-instructions.h View 1 4 chunks +31 lines, -3 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 1 chunk +7 lines, -0 lines 1 comment Download
M src/ia32/lithium-ia32.h View 1 2 chunks +10 lines, -0 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 1 2 chunks +7 lines, -1 line 0 comments Download
M src/objects.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 1 chunk +7 lines, -0 lines 0 comments Download
M src/x64/lithium-x64.h View 1 2 chunks +10 lines, -0 lines 0 comments Download
M src/x64/lithium-x64.cc View 1 2 chunks +10 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
William Hesse
9 years, 3 months ago (2011-09-05 11:43:22 UTC) #1
William Hesse
Here is the change. We can either enable inlining of builtins with this change, or ...
9 years, 3 months ago (2011-09-15 09:39:01 UTC) #2
Kevin Millikin (Chromium)
9 years, 3 months ago (2011-09-15 11:17:24 UTC) #3
A couple of quick drive bys.

It might be simpler to just use an HConstant than introduce a hydrogen
instruction for this (unless we're getting some value out of it).

I also wonder what it would cost just to always use the context of the callee
rather than trying to catch cases that we can use the context of the caller.

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

http://codereview.chromium.org/7739018/diff/3001/src/arm/lithium-arm.cc#newco...
src/arm/lithium-arm.cc:1117: return instr->HasNoUses() ? NULL :
DefineAsRegister(new LInlinedContext);
Just UNREACHABLE, please, no untested dead code.

Otherwise it's too tempting to think deleting UNREACHABLE() will make everything
work.  That might not be true in three or six months.

http://codereview.chromium.org/7739018/diff/3001/src/arm/lithium-codegen-arm.cc
File src/arm/lithium-codegen-arm.cc (right):

http://codereview.chromium.org/7739018/diff/3001/src/arm/lithium-codegen-arm....
src/arm/lithium-codegen-arm.cc:2754: Register result =
ToRegister(instr->result());
This is dead code?

http://codereview.chromium.org/7739018/diff/3001/src/ia32/lithium-codegen-ia3...
File src/ia32/lithium-codegen-ia32.cc (right):

http://codereview.chromium.org/7739018/diff/3001/src/ia32/lithium-codegen-ia3...
src/ia32/lithium-codegen-ia32.cc:2541: __ mov(result, instr->closure());
Does something like

__ mov(result, Handle<Context>(instr->closure()->context()))

work?

Powered by Google App Engine
This is Rietveld 408576698