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

Side by Side Diff: compiler/javatests/com/google/dart/compiler/backend/js/testFieldAccessExprOpt.dart

Issue 8231031: Check for compile-time constants in DartCompiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Renamed CompileTimeConstTest to CTConst2Test Created 9 years, 2 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 class A { 5 class A {
6 int x; 6 int x;
7 7
8 const A() : this.x = 1;
ngeoffray 2011/10/14 09:26:56 Why changing this file? I would keep it as is, and
zundel 2011/10/14 10:04:21 Part of this change is to enforce the initializati
ngeoffray 2011/10/14 10:33:42 I'm not sure I follow. This file looks like valid
floitsch 2011/10/14 14:36:58 Maybe because the "static final A a = new A() (bel
zundel 2011/10/14 20:59:52 It seems to me that if you add together all the pl
zundel 2011/10/14 20:59:52 Done.
9
8 static final A a = new A(); 10 static final A a = new A();
9 11
10 A(){} 12
11 } 13 }
12 14
13 class WillNotOptimizeFieldAccess { 15 class WillNotOptimizeFieldAccess {
14 WillNotOptimizeFieldAccess(){} 16 WillNotOptimizeFieldAccess(){}
15 int x; 17 int x;
16 } 18 }
17 19
18 class WillNotOptimizeFieldAccessSubclass extends WillNotOptimizeFieldAccess { 20 class WillNotOptimizeFieldAccessSubclass extends WillNotOptimizeFieldAccess {
19 WillNotOptimizeFieldAccessSubclass() : super() {} 21 WillNotOptimizeFieldAccessSubclass() : super() {}
20 22
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 99
98 int _marker_7 = c.XGetter; 100 int _marker_7 = c.XGetter;
99 101
100 int _marker_8 = c.AXGetter; 102 int _marker_8 = c.AXGetter;
101 } 103 }
102 } 104 }
103 105
104 main() { 106 main() {
105 Main.main(); 107 Main.main();
106 } 108 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698