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

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

Issue 10871071: - Change "static final" to "static const" in the tests/ directory. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // Test that we get rid of duplicate type guards on a field when that 4 // Test that we get rid of duplicate type guards on a field when that
5 // field is being gvn'ed. 5 // field is being gvn'ed.
6 6
7 #import("compiler_helper.dart"); 7 #import("compiler_helper.dart");
8 8
9 final String TEST = @""" 9 const String TEST = @"""
10 class A { 10 class A {
11 var field = 52; 11 var field = 52;
12 foo() { 12 foo() {
13 var a = this.field; 13 var a = this.field;
14 while (a + 42 == 42); 14 while (a + 42 == 42);
15 // This field get should be GVN'ed 15 // This field get should be GVN'ed
16 a = this.field; 16 a = this.field;
17 while (a + 87 == 87); 17 while (a + 87 == 87);
18 field = 'bar'; 18 field = 'bar';
19 } 19 }
20 } 20 }
21 21
22 main() { 22 main() {
23 while (true) new A().foo(); 23 while (true) new A().foo();
24 } 24 }
25 """; 25 """;
26 26
27 main() { 27 main() {
28 String generated = compileAll(TEST); 28 String generated = compileAll(TEST);
29 RegExp regexp = const RegExp('foo\\\$0\\\$bailout'); 29 RegExp regexp = const RegExp('foo\\\$0\\\$bailout');
30 Iterator matches = regexp.allMatches(generated).iterator(); 30 Iterator matches = regexp.allMatches(generated).iterator();
31 31
32 // We check that there is only one call to the bailout method. 32 // We check that there is only one call to the bailout method.
33 // One match for the call, one for the definition. 33 // One match for the call, one for the definition.
34 checkNumberOfMatches(matches, 2); 34 checkNumberOfMatches(matches, 2);
35 } 35 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/return_type_inferer_test.dart ('k') | tests/compiler/dart2js/ssa_phi_codegen_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698