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

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

Issue 2039913006: DBC: Eager deoptimization and CheckSmi instruction. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments Created 4 years, 6 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/simulator_dbc.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) 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 // Test deoptimization on a smi check.
5 // VMOptions=--optimization-counter-threshold=10 --no-background-compilation
6
7 import 'package:expect/expect.dart';
8
9 hc(a) {
10 var r = a.hashCode;
11 return r;
12 }
13
14 main() {
15 for (var i = 0; i < 20; i++) {
16 Expect.equals((1).hashCode, hc(1));
17 }
18 // Passing double causes deoptimization.
19 Expect.equals((1.0).hashCode, hc(1.0));
20 }
OLDNEW
« no previous file with comments | « runtime/vm/simulator_dbc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698