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); |