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

Unified Diff: test/mjsunit/compiler/regress-3218915.js

Issue 6821009: Introduce runtime function %OptimizeFunctionOnNextCall to manually trigger optimization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address comments Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/compiler/recursive-deopt.js ('k') | test/mjsunit/compiler/regress-loadfield.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/regress-3218915.js
diff --git a/test/mjsunit/compiler/regress-3218915.js b/test/mjsunit/compiler/regress-3218915.js
index d27c319e41ea8fd8323c11f8bdd3c38dc9d9b6db..dfce815afbe9ab0f4816182531ed679db492ba82 100644
--- a/test/mjsunit/compiler/regress-3218915.js
+++ b/test/mjsunit/compiler/regress-3218915.js
@@ -25,6 +25,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// Flags: --allow-natives-syntax
+
// Regression test for failure to deoptimize properly when the most recent
// side effect occurred in a comma expression in an effect context.
@@ -40,7 +42,9 @@ function observe(x, y) { try {} finally {} return x; }
function test(x) { return observe(this, ((0, side_effect()), x + 1)); }
// Run test enough times to get it optimized.
-for (var i = 0; i < 1000000; ++i) test(0);
+for (var i = 0; i < 5; ++i) test(0);
+%OptimizeFunctionOnNextCall(test);
+test(0);
// Force test to deopt. If it behaves normally, it should return the global
// object. If the value of the call to side_effect() is lingering after the
« no previous file with comments | « test/mjsunit/compiler/recursive-deopt.js ('k') | test/mjsunit/compiler/regress-loadfield.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698