OLD | NEW |
1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 library fletchc.lazy_field_initializer_codegen; | 5 library fletchc.lazy_field_initializer_codegen; |
6 | 6 |
7 import 'package:compiler/src/elements/elements.dart'; | 7 import 'package:compiler/src/elements/elements.dart'; |
8 import 'package:compiler/src/resolution/tree_elements.dart' show | 8 import 'package:compiler/src/resolution/tree_elements.dart' show |
9 TreeElements; | 9 TreeElements; |
10 | 10 |
11 import 'package:compiler/src/tree/tree.dart'; | 11 import 'package:compiler/src/tree/tree.dart'; |
(...skipping 28 matching lines...) Expand all Loading... |
40 void compile() { | 40 void compile() { |
41 Node initializer = field.initializer; | 41 Node initializer = field.initializer; |
42 visitForValue(initializer); | 42 visitForValue(initializer); |
43 // TODO(ajohnsen): Add cycle detection. | 43 // TODO(ajohnsen): Add cycle detection. |
44 assembler | 44 assembler |
45 ..storeStatic(context.getStaticFieldIndex(field, null)) | 45 ..storeStatic(context.getStaticFieldIndex(field, null)) |
46 ..ret() | 46 ..ret() |
47 ..methodEnd(); | 47 ..methodEnd(); |
48 } | 48 } |
49 } | 49 } |
OLD | NEW |