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

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

Issue 726593002: Reland "Suppress canonicalization of Unbox() instruction that can deoptimize." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: more fixes Created 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intermediate_language.cc ('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) 2014, 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 // VMOptions=--optimization_counter_threshold=10 --no-use-osr
5
6 import "package:expect/expect.dart";
7
8 class X {
9 operator * (other) => "NaNNaNNaNNaNBatman";
10 }
11
12 foo(x) => (x * 1.0) is double;
13
14 bar(x) {
15 try {
16 int i = (x * 1);
17 return true;
18 } catch (e) {
19 return false;
20 }
21 }
22
23 baz(x) => (x * 1) == x;
24
25 main() {
26 for (var i = 0; i < 100; i++) {
27 Expect.isTrue(foo(1.0));
28 assert(() {
29 Expect.isTrue(bar(-1 << 63));
30 return true;
31 });
32 Expect.isTrue(baz(-1 << 63));
33 }
34 Expect.isFalse(foo(new X()));
35 assert(() {
36 Expect.isFalse(bar(new X()));
37 return true;
38 });
39 Expect.isFalse(baz(new X()));
40 }
41
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698