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

Unified Diff: test/mjsunit/es6/regress/regress-inlined-new-target.js

Issue 1484163003: [crankshaft] Prevent inlining of new.target functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/crankshaft/hydrogen.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/regress/regress-inlined-new-target.js
diff --git a/test/mjsunit/array-push12.js b/test/mjsunit/es6/regress/regress-inlined-new-target.js
similarity index 61%
copy from test/mjsunit/array-push12.js
copy to test/mjsunit/es6/regress/regress-inlined-new-target.js
index f4c15b484b41197c9007113ecf8f91fe909cc5d3..59932f6b4cc1c7ca613db765f3178960003448ae 100644
--- a/test/mjsunit/array-push12.js
+++ b/test/mjsunit/es6/regress/regress-inlined-new-target.js
@@ -4,20 +4,10 @@
// Flags: --allow-natives-syntax
-var a = [];
-for (var i = -20; i < 0; ++i) {
- a[i] = 0;
-}
+function g() { return { val: new.target }; }
+function f() { return (new g()).val; }
-function g() {
- [].push.apply(a, arguments);
-}
-
-function f() {
- g();
-}
-
-g();
-g();
+assertEquals(g, f());
+assertEquals(g, f());
%OptimizeFunctionOnNextCall(f);
-f();
+assertEquals(g, f());
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698