OLD | NEW |
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 | 4 |
5 library dart2js.compile_time_constant_evaluator; | 5 library dart2js.compile_time_constant_evaluator; |
6 | 6 |
7 import 'common/tasks.dart' show | 7 import 'common/tasks.dart' show |
8 CompilerTask; | 8 CompilerTask; |
9 import 'compiler.dart' show | 9 import 'compiler.dart' show |
10 Compiler; | 10 Compiler; |
(...skipping 11 matching lines...) Expand all Loading... |
22 WorldImpact; | 22 WorldImpact; |
23 import 'elements/elements.dart'; | 23 import 'elements/elements.dart'; |
24 import 'elements/modelx.dart' show | 24 import 'elements/modelx.dart' show |
25 FunctionElementX; | 25 FunctionElementX; |
26 import 'resolution/tree_elements.dart' show | 26 import 'resolution/tree_elements.dart' show |
27 TreeElements; | 27 TreeElements; |
28 import 'resolution/operators.dart'; | 28 import 'resolution/operators.dart'; |
29 import 'tree/tree.dart'; | 29 import 'tree/tree.dart'; |
30 import 'util/util.dart' show | 30 import 'util/util.dart' show |
31 Link; | 31 Link; |
32 import 'universe/universe.dart' show | 32 import 'universe/call_structure.dart' show |
33 CallStructure; | 33 CallStructure; |
34 | 34 |
35 /// A [ConstantEnvironment] provides access for constants compiled for variable | 35 /// A [ConstantEnvironment] provides access for constants compiled for variable |
36 /// initializers. | 36 /// initializers. |
37 abstract class ConstantEnvironment { | 37 abstract class ConstantEnvironment { |
38 /// The [ConstantSystem] used by this environment. | 38 /// The [ConstantSystem] used by this environment. |
39 ConstantSystem get constantSystem; | 39 ConstantSystem get constantSystem; |
40 | 40 |
41 /// Returns the constant value computed for [expression]. | 41 /// Returns the constant value computed for [expression]. |
42 // TODO(johnniwinther): Support directly evaluation of [expression]. | 42 // TODO(johnniwinther): Support directly evaluation of [expression]. |
(...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1266 class _CompilerEnvironment implements Environment { | 1266 class _CompilerEnvironment implements Environment { |
1267 final Compiler compiler; | 1267 final Compiler compiler; |
1268 | 1268 |
1269 _CompilerEnvironment(this.compiler); | 1269 _CompilerEnvironment(this.compiler); |
1270 | 1270 |
1271 @override | 1271 @override |
1272 String readFromEnvironment(String name) { | 1272 String readFromEnvironment(String name) { |
1273 return compiler.fromEnvironment(name); | 1273 return compiler.fromEnvironment(name); |
1274 } | 1274 } |
1275 } | 1275 } |
OLD | NEW |