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 import '../compile_time_constants.dart'; | 5 import '../compile_time_constants.dart'; |
6 import '../compiler.dart' show Compiler; | 6 import '../compiler.dart' show Compiler; |
7 import '../constants/constant_system.dart'; | 7 import '../constants/constant_system.dart'; |
8 import '../constants/expressions.dart'; | 8 import '../constants/expressions.dart'; |
9 import '../constants/values.dart'; | 9 import '../constants/values.dart'; |
10 import '../elements/elements.dart'; | 10 import '../elements/elements.dart'; |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 } | 267 } |
268 | 268 |
269 class ForgetConstantNodeVisitor extends Visitor { | 269 class ForgetConstantNodeVisitor extends Visitor { |
270 final JavaScriptConstantCompiler constants; | 270 final JavaScriptConstantCompiler constants; |
271 | 271 |
272 ForgetConstantNodeVisitor(this.constants); | 272 ForgetConstantNodeVisitor(this.constants); |
273 | 273 |
274 void visitNode(Node node) { | 274 void visitNode(Node node) { |
275 node.visitChildren(this); | 275 node.visitChildren(this); |
276 constants.nodeConstantMap.remove(node); | 276 constants.nodeConstantMap.remove(node); |
277 | |
278 // TODO(ahe): This doesn't belong here. Rename this class and generalize. | |
279 var closureClassMap = constants | |
280 .compiler.closureToClassMapper.closureMappingCache | |
281 .remove(node); | |
282 if (closureClassMap != null) { | |
283 closureClassMap | |
284 .removeMyselfFrom(constants.compiler.enqueuer.codegen.universe); | |
285 } | |
286 } | 277 } |
287 } | 278 } |
OLD | NEW |