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

Side by Side Diff: tests/compiler/dart2js/dead_bailout_target_test.dart

Issue 14972005: Fix https://code.google.com/p/dart/issues/detail?id=10474 by not loop hoisting instructions that ma… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // This unit test of dart2js checks that a SSA bailout target 5 // This unit test of dart2js checks that a SSA bailout target
6 // instruction gets removed from the graph when it's not used. 6 // instruction gets removed from the graph when it's not used.
7 7
8 import "package:expect/expect.dart"; 8 import "package:expect/expect.dart";
9 import 'compiler_helper.dart'; 9 import 'compiler_helper.dart';
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 // Check that the foo bailout method is generated. 54 // Check that the foo bailout method is generated.
55 checkNumberOfMatches( 55 checkNumberOfMatches(
56 new RegExp('foo\\\$bailout').allMatches(generated).iterator, 2); 56 new RegExp('foo\\\$bailout').allMatches(generated).iterator, 2);
57 57
58 // Check that it's the only bailout method. 58 // Check that it's the only bailout method.
59 checkNumberOfMatches(new RegExp('bailout').allMatches(generated).iterator, 2); 59 checkNumberOfMatches(new RegExp('bailout').allMatches(generated).iterator, 2);
60 60
61 // Check that the bailout method has a case 2 for the state, which 61 // Check that the bailout method has a case 2 for the state, which
62 // is the second bailout in foo. 62 // is the second bailout in foo.
63 RegExp state = new RegExp('case 2:'); 63 Expect.isTrue(generated.contains('case 2:'));
64 checkNumberOfMatches(state.allMatches(generated).iterator, 1);
65 64
66 // Finally, make sure that the reason foo does not contain 65 // Finally, make sure that the reason foo does not contain
67 // 'getInterceptor' is not because the compiler renamed it. 66 // 'getInterceptor' is not because the compiler renamed it.
68 Expect.isTrue(generated.contains('getInterceptor')); 67 Expect.isTrue(generated.contains('getInterceptor'));
69 } 68 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/optimize.dart ('k') | tests/language/licm2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698