OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 part of js_backend; | 5 import '../compile_time_constants.dart'; |
| 6 import '../compiler.dart' show Compiler; |
| 7 import '../constants/constant_system.dart'; |
| 8 import '../constants/expressions.dart'; |
| 9 import '../constants/values.dart'; |
| 10 import '../elements/elements.dart'; |
| 11 import '../elements/visitor.dart' show BaseElementVisitor; |
| 12 import '../resolution/tree_elements.dart' show TreeElements; |
| 13 import '../tree/tree.dart'; |
| 14 import 'constant_system_javascript.dart'; |
6 | 15 |
7 /// [ConstantCompilerTask] for compilation of constants for the JavaScript | 16 /// [ConstantCompilerTask] for compilation of constants for the JavaScript |
8 /// backend. | 17 /// backend. |
9 /// | 18 /// |
10 /// Since this task needs to distinguish between frontend and backend constants | 19 /// Since this task needs to distinguish between frontend and backend constants |
11 /// the actual compilation of the constants is forwarded to a | 20 /// the actual compilation of the constants is forwarded to a |
12 /// [DartConstantCompiler] for the frontend interpretation of the constants and | 21 /// [DartConstantCompiler] for the frontend interpretation of the constants and |
13 /// to a [JavaScriptConstantCompiler] for the backend interpretation. | 22 /// to a [JavaScriptConstantCompiler] for the backend interpretation. |
14 class JavaScriptConstantTask extends ConstantCompilerTask { | 23 class JavaScriptConstantTask extends ConstantCompilerTask { |
15 DartConstantCompiler dartConstantCompiler; | 24 DartConstantCompiler dartConstantCompiler; |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 // TODO(ahe): This doesn't belong here. Rename this class and generalize. | 278 // TODO(ahe): This doesn't belong here. Rename this class and generalize. |
270 var closureClassMap = constants | 279 var closureClassMap = constants |
271 .compiler.closureToClassMapper.closureMappingCache | 280 .compiler.closureToClassMapper.closureMappingCache |
272 .remove(node); | 281 .remove(node); |
273 if (closureClassMap != null) { | 282 if (closureClassMap != null) { |
274 closureClassMap | 283 closureClassMap |
275 .removeMyselfFrom(constants.compiler.enqueuer.codegen.universe); | 284 .removeMyselfFrom(constants.compiler.enqueuer.codegen.universe); |
276 } | 285 } |
277 } | 286 } |
278 } | 287 } |
OLD | NEW |