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

Unified Diff: test/mjsunit/compiler/opt-next-call-turbo.js

Issue 863443003: Remove overzealous check from %OptimizeFunctionOnNextCall. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added test cases. Created 5 years, 11 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/opt-next-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/compiler/opt-next-call-turbo.js
diff --git a/test/mjsunit/compiler/opt-next-call-turbo.js b/test/mjsunit/compiler/opt-next-call-turbo.js
new file mode 100644
index 0000000000000000000000000000000000000000..3a7bf6ec61bda739beba5f145ea9a21abdae0a0c
--- /dev/null
+++ b/test/mjsunit/compiler/opt-next-call-turbo.js
@@ -0,0 +1,23 @@
+// Copyright 2015 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: --allow-natives-syntax --turbo-filter=*
+
+function foo() {
+ with ({ value:"fooed" }) { return value; }
+}
+
+%OptimizeFunctionOnNextCall(foo);
+assertEquals("fooed", foo());
+assertOptimized(foo);
+
+function bar() {
+ with ({ value:"bared" }) { return value; }
+}
+
+assertEquals("bared", bar());
+%OptimizeFunctionOnNextCall(bar);
+assertEquals("bared", bar());
+// TODO(mstarzinger): Still not optimized, make sure it is.
Michael Starzinger 2015/01/19 14:35:27 Note that this is sill not working as inteded, you
+// assertOptimized(bar);
« no previous file with comments | « test/mjsunit/compiler/opt-next-call.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698