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

Issue 9431030: Support OSR in for-in loops. (Closed)

Created:
8 years, 10 months ago by Vyacheslav Egorov (Chromium)
Modified:
8 years, 10 months ago
Reviewers:
fschneider
CC:
v8-dev
Visibility:
Public.

Description

Support OSR in for-in loops. Modify PreProcessOsrEntry to work with OSR entries that have non-empty expression stack. Modify graph builder to take for-in state from environment instead of directly referencing emitted instructions. Extend %OptimizeFunctionOnNextCall with an argument to force OSR to make writing OSR tests easier: %OptimizeFunctionOnNextCall(f, "osr"). R=fschneider@chromium.org TEST=test/mjsunit/compiler/optimized-for-in.js Committed: https://code.google.com/p/v8/source/detail?r=10796

Patch Set 1 #

Total comments: 1

Patch Set 2 : Extend OptimizeFunctionOnNextCall with an arguments to force OSR. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -15 lines) Patch
M src/hydrogen.h View 1 chunk +4 lines, -0 lines 0 comments Download
M src/hydrogen.cc View 4 chunks +25 lines, -11 lines 0 comments Download
M src/runtime.h View 1 1 chunk +1 line, -1 line 0 comments Download
M src/runtime.cc View 1 1 chunk +13 lines, -1 line 0 comments Download
M src/runtime-profiler.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M test/mjsunit/compiler/optimized-for-in.js View 1 1 chunk +54 lines, -0 lines 1 comment Download

Messages

Total messages: 4 (0 generated)
Vyacheslav Egorov (Chromium)
8 years, 10 months ago (2012-02-22 15:20:30 UTC) #1
fschneider
lgtm https://chromiumcodereview.appspot.com/9431030/diff/1/test/mjsunit/compiler/optimized-for-in.js File test/mjsunit/compiler/optimized-for-in.js (right): https://chromiumcodereview.appspot.com/9431030/diff/1/test/mjsunit/compiler/optimized-for-in.js#newcode246 test/mjsunit/compiler/optimized-for-in.js:246: // Test OSR inside for each. s/for each/for-in/
8 years, 10 months ago (2012-02-22 15:29:59 UTC) #2
Vyacheslav Egorov (Chromium)
PTAL, I have extended OptimizeFunctionOnNextCall with an argument to force OSR and improved coverage of ...
8 years, 10 months ago (2012-02-22 16:18:04 UTC) #3
fschneider
8 years, 10 months ago (2012-02-22 16:22:39 UTC) #4
lgtm

https://chromiumcodereview.appspot.com/9431030/diff/4001/test/mjsunit/compile...
File test/mjsunit/compiler/optimized-for-in.js (right):

https://chromiumcodereview.appspot.com/9431030/diff/4001/test/mjsunit/compile...
test/mjsunit/compiler/optimized-for-in.js:295: assertEquals("101234567",
osr_outer_and_deopt([1,2,3,4,5,6,7,8], "5"));
You could check the optimization status with %GetOptimizationStatus to assert
that the OSR succeeded.

Powered by Google App Engine
This is Rietveld 408576698