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

Unified Diff: test/mjsunit/regress/regress-osr-in-literal.js

Issue 1452193003: [turbofan] Fix several OSR entries within class literals. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | « src/compiler/ast-loop-assignment-analyzer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-osr-in-literal.js
diff --git a/test/mjsunit/regress/regress-osr-in-literal.js b/test/mjsunit/regress/regress-osr-in-literal.js
index 9d0897276ea675467e7de28a34b8154a88aeced5..bef107ef1c5ef5ea64dceff2d318423c4056bbf9 100644
--- a/test/mjsunit/regress/regress-osr-in-literal.js
+++ b/test/mjsunit/regress/regress-osr-in-literal.js
@@ -4,6 +4,8 @@
// Flags: --allow-natives-syntax --harmony-do-expressions
+"use strict";
+
var p = {};
var testCases = [
{ s:"[1, do { _OSR_ 2 }, 3]", r:[1, 2, 3] },
@@ -14,11 +16,13 @@ var testCases = [
{ s:"{ [do { _OSR_ 'b' }]: 3 }", r:{ b:3 } },
{ s:"{ [do { _OSR_ 'b' }]: 3, c: 4 }", r:{ b:3, c:4 } },
{ s:"{ [do { _OSR_ 'b' }]: 3, __proto__:p }", r:{ b:3, __proto__:p } },
+ { s:"class { [do { _OSR_ 'f' }]() {} }" },
+ { s:"class { [do { _OSR_ 'f' }]() {}; g() {} }" },
];
for (var i = 0; i < testCases.length; ++i) {
var source = "(function f" + i + "(x) { return " + testCases[i].s + "})";
var osr = "for (var i = 0; i < 10; i++) { if (i == 5) %OptimizeOsr(); }";
- var fun = eval(source.replace("_OSR_", osr));
- assertEquals(testCases[i].r, fun(23));
+ var result = eval(source.replace("_OSR_", osr))();
+ if (testCases[i].r) assertEquals(testCases[i].r, result);
}
« no previous file with comments | « src/compiler/ast-loop-assignment-analyzer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698