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

Issue 7618007: Simplify handling of exits from with and catch. (Closed)

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

Description

Simplify handling of exits from with and catch. Remove the try/finally used for with and catch. Instead of using try/finally to handle break and continue from with or catch, statically track nesting dept and clean up when compiling break or continue. And instead of using try/finally to handle throw to handler in a frame whose pc is inside a with or catch, store the context that the handler should run in in the handler itself. BUG= TEST= Committed: http://code.google.com/p/v8/source/detail?r=8922

Patch Set 1 #

Total comments: 5

Patch Set 2 : Bugfix: insert .result assignment for with bodies. #

Patch Set 3 : Fixed bug pointed out in review. #

Total comments: 2

Patch Set 4 : Incorporate review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+435 lines, -249 lines) Patch
M src/arm/frames-arm.h View 2 chunks +6 lines, -5 lines 0 comments Download
M src/arm/macro-assembler-arm.cc View 1 2 3 8 chunks +40 lines, -46 lines 0 comments Download
M src/ast.h View 1 2 3 2 chunks +7 lines, -5 lines 0 comments Download
M src/ast.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/frames.h View 2 chunks +2 lines, -1 line 0 comments Download
M src/frames-inl.h View 3 chunks +8 lines, -1 line 0 comments Download
M src/full-codegen.h View 1 2 5 chunks +33 lines, -20 lines 0 comments Download
M src/full-codegen.cc View 1 2 3 9 chunks +58 lines, -20 lines 0 comments Download
M src/hydrogen.cc View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
M src/ia32/frames-ia32.h View 2 chunks +6 lines, -5 lines 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 2 3 9 chunks +32 lines, -21 lines 0 comments Download
M src/parser.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M src/parser.cc View 1 2 3 3 chunks +20 lines, -68 lines 0 comments Download
M src/prettyprinter.cc View 3 chunks +10 lines, -9 lines 0 comments Download
M src/rewriter.cc View 1 1 chunk +7 lines, -3 lines 0 comments Download
M src/x64/frames-x64.h View 2 chunks +7 lines, -6 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 2 3 6 chunks +36 lines, -33 lines 0 comments Download
M test/mjsunit/with-leave.js View 1 2 2 chunks +160 lines, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
Kevin Millikin (Chromium)
I have separate change of cleanup after this one (e.g., we can remove the exit ...
9 years, 4 months ago (2011-08-11 10:37:18 UTC) #1
Vyacheslav Egorov (Chromium)
seems almost ok, but I'll need another pass after you fix the bug. http://codereview.chromium.org/7618007/diff/1/src/full-codegen.cc File ...
9 years, 4 months ago (2011-08-11 11:21:55 UTC) #2
Kevin Millikin (Chromium)
http://codereview.chromium.org/7618007/diff/1/src/full-codegen.cc File src/full-codegen.cc (right): http://codereview.chromium.org/7618007/diff/1/src/full-codegen.cc#newcode940 src/full-codegen.cc:940: } Oops, yes. Good catch.
9 years, 4 months ago (2011-08-11 11:30:50 UTC) #3
Kevin Millikin (Chromium)
Please take another look. http://codereview.chromium.org/7618007/diff/1/src/full-codegen.h File src/full-codegen.h (right): http://codereview.chromium.org/7618007/diff/1/src/full-codegen.h#newcode150 src/full-codegen.h:150: // contains the value in ...
9 years, 4 months ago (2011-08-11 15:22:20 UTC) #4
Vyacheslav Egorov (Chromium)
LGTM http://codereview.chromium.org/7618007/diff/4002/src/arm/macro-assembler-arm.cc File src/arm/macro-assembler-arm.cc (right): http://codereview.chromium.org/7618007/diff/4002/src/arm/macro-assembler-arm.cc#newcode1180 src/arm/macro-assembler-arm.cc:1180: // (r3 == IN_JS_ENTRY) == (fp == 0) ...
9 years, 4 months ago (2011-08-12 10:04:52 UTC) #5
Kevin Millikin (Chromium)
9 years, 4 months ago (2011-08-12 11:33:45 UTC) #6
http://codereview.chromium.org/7618007/diff/4002/src/arm/macro-assembler-arm.cc
File src/arm/macro-assembler-arm.cc (right):

http://codereview.chromium.org/7618007/diff/4002/src/arm/macro-assembler-arm....
src/arm/macro-assembler-arm.cc:1180: // (r3 == IN_JS_ENTRY) == (fp == 0) == (cp
== 0), so we could test
On 2011/08/12 10:04:52, Vyacheslav Egorov wrote:
> r3 == ENTRY to be aligned with code?

Yes, thanks.

Powered by Google App Engine
This is Rietveld 408576698