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

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

Issue 2789943002: Reland "VM: Handle null-comparisons in the flow graph type propagation" (Closed)
Patch Set: addressed comments Created 3 years, 8 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
« no previous file with comments | « runtime/vm/symbols.h ('k') | tests/language/vm/integer_type_propagation_test.dart » ('j') | 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) 2017, 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 // Test various optimizations and deoptimizations of optimizing compiler..
5 // VMOptions=--enable-inlining-annotations --no-background-compilation --optimiz ation-counter-threshold=1000
6
7 import "package:expect/expect.dart";
8 import "dart:typed_data";
9
10 const noInline = "NeverInline";
11 const alwaysInline = "AlwaysInline";
12
13 var list = new Uint32List(1);
14
15 @noInline
16 testuint32(bool b) {
17 var t;
18 if (b) {
19 t = list[0];
20 }
21 if (t != null) {
22 return t & 0x7fffffff;
23 }
24 return -1;
25 }
26
27 main() {
28 var s = 0;
29 testuint32(true);
30 testuint32(false);
31 for (int i = 0; i < 10000; ++i) {
32 testuint32(true);
33 }
34 Expect.equals(0, testuint32(true));
35 Expect.equals(-1, testuint32(false));
36 }
OLDNEW
« no previous file with comments | « runtime/vm/symbols.h ('k') | tests/language/vm/integer_type_propagation_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698