Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 } |
| OLD | NEW |