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

Side by Side Diff: test/mjsunit/compiler/deopt-string-outofbounds.js

Issue 2654733004: [tests] Make assertOptimized()/assertUnoptimized() great again. (Closed)
Patch Set: Addressing comments Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --allow-natives-syntax 5 // Flags: --allow-natives-syntax --no-always-opt
6
7 assertFalse(isAlwaysOptimize());
6 8
7 var s = "12345"; 9 var s = "12345";
8 10
9 (function() { 11 (function() {
10 function foo() { return s[5]; } 12 function foo() { return s[5]; }
11 13
12 foo(); 14 foo();
13 foo(); 15 foo();
14 %OptimizeFunctionOnNextCall(foo); 16 %OptimizeFunctionOnNextCall(foo);
15 foo(); 17 foo();
16 %OptimizeFunctionOnNextCall(foo); 18 %OptimizeFunctionOnNextCall(foo);
17 foo(); 19 foo();
18 assertOptimized(foo); 20 assertOptimized(foo);
19 })(); 21 })();
20 22
21 (function() { 23 (function() {
22 function foo(i) { return s[i]; } 24 function foo(i) { return s[i]; }
23 25
24 foo(0); 26 foo(0);
25 foo(1); 27 foo(1);
26 %OptimizeFunctionOnNextCall(foo); 28 %OptimizeFunctionOnNextCall(foo);
27 foo(5); 29 foo(5);
28 %OptimizeFunctionOnNextCall(foo); 30 %OptimizeFunctionOnNextCall(foo);
29 foo(5); 31 foo(5);
30 assertOptimized(foo); 32 assertOptimized(foo);
31 })(); 33 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698