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

Unified Diff: test/mjsunit/regress/regress-crbug-608278.js

Issue 1936043002: [es6] Properly handle the case when an inlined getter/setter/constructor does a tail call. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Removed too much, fixing Created 4 years, 7 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/es6/tail-call.js ('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-crbug-608278.js
diff --git a/test/mjsunit/regress/regress-crbug-608278.js b/test/mjsunit/regress/regress-crbug-608278.js
new file mode 100644
index 0000000000000000000000000000000000000000..6840159f30dac8d04585e77013d758bb583659d8
--- /dev/null
+++ b/test/mjsunit/regress/regress-crbug-608278.js
@@ -0,0 +1,62 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-tailcalls --allow-natives-syntax
+
+"use strict";
+
+function h() {
+ var stack = (new Error("boom")).stack;
+ print(stack);
+ %DeoptimizeFunction(f1);
+ %DeoptimizeFunction(f2);
+ %DeoptimizeFunction(f3);
+ %DeoptimizeFunction(g);
+ %DeoptimizeFunction(h);
+ return 1;
+}
+%NeverOptimizeFunction(h);
+
+function g(v) {
+ return h();
+}
+%SetForceInlineFlag(g);
+
+
+function f1() {
+ var o = {};
+ o.__defineGetter__('p', g);
+ o.p;
+}
+
+f1();
+f1();
+%OptimizeFunctionOnNextCall(f1);
+f1();
+
+
+function f2() {
+ var o = {};
+ o.__defineSetter__('q', g);
+ o.q = 1;
+}
+
+f2();
+f2();
+%OptimizeFunctionOnNextCall(f2);
+f2();
+
+
+function A() {
+ return h();
+}
+
+function f3() {
+ new A();
+}
+
+f3();
+f3();
+%OptimizeFunctionOnNextCall(f3);
+f3();
« no previous file with comments | « test/mjsunit/es6/tail-call.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698