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

Issue 5812005: Deoptimize non-smi switch cases if they are reached. (Closed)

Created:
10 years ago by Vitaly Repeshko
Modified:
9 years, 7 months ago
Reviewers:
fschneider
CC:
v8-dev
Visibility:
Public.

Description

Deoptimize non-smi switch cases if they are reached. This way if the type oracle says an unreachable clause has a non-smi type, we can still emit optimized code instead of doing an early bailout. This change depends of Florian's r5970. Committed: http://code.google.com/p/v8/source/detail?r=6037

Patch Set 1 #

Total comments: 5

Patch Set 2 : Review fixes. #

Patch Set 3 : Rebased #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -29 lines) Patch
M src/hydrogen.cc View 1 2 6 chunks +51 lines, -23 lines 1 comment Download
M src/ia32/full-codegen-ia32.cc View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M src/runtime.cc View 1 1 chunk +9 lines, -4 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Vitaly Repeshko
10 years ago (2010-12-13 22:11:15 UTC) #1
fschneider
It already looks pretty good - the only issue I have is that it is ...
10 years ago (2010-12-14 16:03:17 UTC) #2
Vitaly Repeshko
http://codereview.chromium.org/5812005/diff/1/src/hydrogen.cc File src/hydrogen.cc (right): http://codereview.chromium.org/5812005/diff/1/src/hydrogen.cc#newcode2656 src/hydrogen.cc:2656: last_false_block->Finish(new HDeoptimize); On 2010/12/14 16:03:17, fschneider wrote: > It ...
10 years ago (2010-12-14 19:16:58 UTC) #3
fschneider
http://codereview.chromium.org/5812005/diff/1/src/hydrogen.cc File src/hydrogen.cc (right): http://codereview.chromium.org/5812005/diff/1/src/hydrogen.cc#newcode2577 src/hydrogen.cc:2577: AddSimulate(stmt->tag()->id()); I think that if the stmt->tag() expression has ...
10 years ago (2010-12-15 12:10:16 UTC) #4
Vitaly Repeshko
Please take another look. Thanks, Vitaly http://codereview.chromium.org/5812005/diff/1/src/hydrogen.cc File src/hydrogen.cc (right): http://codereview.chromium.org/5812005/diff/1/src/hydrogen.cc#newcode2577 src/hydrogen.cc:2577: AddSimulate(stmt->tag()->id()); On 2010/12/15 ...
10 years ago (2010-12-15 15:22:16 UTC) #5
fschneider
LGTM. Maybe we can avoid the problem with OSR by checking all clauses if are ...
10 years ago (2010-12-15 16:12:13 UTC) #6
Vitaly Repeshko
10 years ago (2010-12-15 17:14:39 UTC) #7
Landed with an extra check on the number of smi compares. We can't completely
avoid the OSR issue, but we can avoid generating totally useless switch
statements.

Thanks for the review!


-- Vitaly

Powered by Google App Engine
This is Rietveld 408576698