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

Issue 16567: Enable register allocation for return statements. Make sure to... (Closed)

Created:
11 years, 11 months ago by Kasper Lund
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Enable register allocation for return statements. Make sure to prepare the frame for the return even in the try-finally and try-catch cases that shadows the function return label. Committed: http://code.google.com/p/v8/source/detail?r=1037

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+218 lines, -137 lines) Patch
M src/codegen-ia32.h View 1 2 chunks +0 lines, -5 lines 0 comments Download
M src/codegen-ia32.cc View 1 8 chunks +87 lines, -56 lines 2 comments Download
M src/jump-target-ia32.cc View 1 6 chunks +18 lines, -46 lines 0 comments Download
M src/virtual-frame-ia32.h View 1 3 chunks +9 lines, -3 lines 1 comment Download
M src/virtual-frame-ia32.cc View 1 2 chunks +19 lines, -2 lines 1 comment Download
M test/mjsunit/debug-evaluate.js View 1 1 chunk +22 lines, -22 lines 0 comments Download
M test/mjsunit/debug-step.js View 1 2 chunks +1 line, -3 lines 0 comments Download
A test/mjsunit/multiple-return.js View 1 chunk +62 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Kasper Lund
11 years, 11 months ago (2009-01-07 09:10:20 UTC) #1
Kevin Millikin (Chromium)
11 years, 11 months ago (2009-01-07 10:25:11 UTC) #2
The issue with Forget is the serious one.  I think using "Drop" is all it takes
to make it work.

http://codereview.chromium.org/16567/diff/209/217
File src/codegen-ia32.cc (right):

http://codereview.chromium.org/16567/diff/209/217#newcode1651
Line 1651: result.Unuse();
Since the reference to eax is live in the next basic block, it should be passed
to Jump or Bind.

http://codereview.chromium.org/16567/diff/209/217#newcode1660
Line 1660: frame_->EmitPush(eax);  // Materialize result on the stack.
EmitPush assumes the frame is spilled.  This should be a plain Push of the
result.

http://codereview.chromium.org/16567/diff/209/214
File src/virtual-frame-ia32.cc (right):

http://codereview.chromium.org/16567/diff/209/214#newcode637
Line 637: Forget(height());
As discussed offline, Forget as it currently stands probably isn't the right
thing here.  It assumes that it is forgetting things below the actual stack
pointer, and it doesn't adjust the stack pointer itself but assumes someone else
has or will.

http://codereview.chromium.org/16567/diff/209/215
File src/virtual-frame-ia32.h (right):

http://codereview.chromium.org/16567/diff/209/215#newcode242
Line 242: // This avoid generating unnecessary merge code when jumping to the
avoids

Powered by Google App Engine
This is Rietveld 408576698