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

Side by Side Diff: tests/language/vm/regress_27671_test.dart

Issue 2453263002: Produce the correct assertion failure expression in the face of inlining (Closed)
Patch Set: asiva review Created 4 years, 1 month 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
« no previous file with comments | « tests/language/vm/regress_27671_other.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
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.
4 //
5 // VMOptions=--enable_asserts --enable-inlining-annotations --optimization-count er-threshold=10 --no-background-compilation
6
7 import 'package:expect/expect.dart';
8 import 'regress_27671_other.dart';
9
10 const AlwaysInline = "AlwaysInline";
11 const NeverInline = "NeverInline";
12
13 @AlwaysInline
14 bounce(x) {
15 for (int i = 0; i < 10; i++) {
16 check(f, x);
17 }
18 }
19
20 @AlwaysInline
21 bool f(y) => y > 0;
22
23 main() {
24 for (int i = 0; i < 100; i++) {
25 bounce(1);
26 }
27 try {
28 bounce(-1);
29 } catch (e) {
30 Expect.isTrue(e.toString().contains('f(x) && true'));
31 }
32 }
OLDNEW
« no previous file with comments | « tests/language/vm/regress_27671_other.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698