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

Side by Side Diff: tests/language/deopt_inlined_function_lazy_test.dart

Issue 1759973002: Add --no-background-compilation to tests that expect to run code in optimized form (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: more Created 4 years, 9 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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // Test lazy deoptimization from within an inlined function. 4 // Test lazy deoptimization from within an inlined function.
5 // VMOptions=--deoptimize_alot --optimization-counter-threshold=10 --no-use-osr 5 // VMOptions=--deoptimize_alot --optimization-counter-threshold=10 --no-use-osr --no-background-compilation
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 8
9 call_native(x) { 9 call_native(x) {
10 // Wrap in try to avoid inlining. 10 // Wrap in try to avoid inlining.
11 // Use a large int so the intrinsifier does not fire. 11 // Use a large int so the intrinsifier does not fire.
12 try { return x + 12342353257893275483274832; } finally { } 12 try { return x + 12342353257893275483274832; } finally { }
13 } 13 }
14 14
15 bar(x) { 15 bar(x) {
16 if (x < 0) call_native(x); 16 if (x < 0) call_native(x);
17 x = 42; 17 x = 42;
18 return x; 18 return x;
19 } 19 }
20 20
21 foo(x) { 21 foo(x) {
22 x = bar(x); 22 x = bar(x);
23 return x; 23 return x;
24 } 24 }
25 25
26 main() { 26 main() {
27 Expect.equals(42, foo(1)); 27 Expect.equals(42, foo(1));
28 for (var i = 0; i < 20; i++) foo(7); 28 for (var i = 0; i < 20; i++) foo(7);
29 Expect.equals(42, foo(2)); 29 Expect.equals(42, foo(2));
30 // Call the runtime to trigger lazy deopt with foo/bar on the stack. 30 // Call the runtime to trigger lazy deopt with foo/bar on the stack.
31 Expect.equals(42, foo(-1)); 31 Expect.equals(42, foo(-1));
32 } 32 }
OLDNEW
« no previous file with comments | « tests/language/deferred_optimized_test.dart ('k') | tests/language/deopt_lazy_finalization_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698