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

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

Issue 296453013: Fix bug with optimized try-catch and unboxed values. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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 | 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 // Test unboxed double operations inside try-catch.
9 foo(bool b) {
10 if (b) throw 123;
11 }
12
13 test_double(double x, bool b) {
14 try {
15 x += 1.0;
16 foo(b);
17 } catch (e) {
18 var result = x - 1.0;
19 Expect.equals(1.0, result);
20 return result;
21 }
22 }
23
24 main() {
25 for (var i=0; i<100; i++) test_double(1.0, false);
26 test_double(1.0, false);
27 Expect.equals(1.0, test_double(1.0, true));
28 }
29
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