| 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 part of js_backend; | 
| 6 | 6 | 
| 7 /// [ConstantCompilerTask] for compilation of constants for the JavaScript | 7 /// [ConstantCompilerTask] for compilation of constants for the JavaScript | 
| 8 /// backend. | 8 /// backend. | 
| 9 /// | 9 /// | 
| 10 /// Since this task needs to distinguish between frontend and backend constants | 10 /// Since this task needs to distinguish between frontend and backend constants | 
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 254       element.node.accept(new ForgetConstantNodeVisitor(this)); | 254       element.node.accept(new ForgetConstantNodeVisitor(this)); | 
| 255     } | 255     } | 
| 256   } | 256   } | 
| 257 } | 257 } | 
| 258 | 258 | 
| 259 class ForgetConstantElementVisitor | 259 class ForgetConstantElementVisitor | 
| 260     extends BaseElementVisitor<dynamic, JavaScriptConstantCompiler> { | 260     extends BaseElementVisitor<dynamic, JavaScriptConstantCompiler> { | 
| 261   const ForgetConstantElementVisitor(); | 261   const ForgetConstantElementVisitor(); | 
| 262 | 262 | 
| 263   void visitElement(Element e, JavaScriptConstantCompiler constants) { | 263   void visitElement(Element e, JavaScriptConstantCompiler constants) { | 
| 264     for (MetadataAnnotation data in e.metadata) { | 264     for (MetadataAnnotation data in e.implementation.metadata) { | 
| 265       constants.metadataConstantMap.remove(data); | 265       constants.metadataConstantMap.remove(data); | 
| 266       if (data.hasNode) { | 266       if (data.hasNode) { | 
| 267         data.node.accept(new ForgetConstantNodeVisitor(constants)); | 267         data.node.accept(new ForgetConstantNodeVisitor(constants)); | 
| 268       } | 268       } | 
| 269     } | 269     } | 
| 270   } | 270   } | 
| 271 | 271 | 
| 272   void visitFunctionElement(FunctionElement e, | 272   void visitFunctionElement(FunctionElement e, | 
| 273                             JavaScriptConstantCompiler constants) { | 273                             JavaScriptConstantCompiler constants) { | 
| 274     super.visitFunctionElement(e, constants); | 274     super.visitFunctionElement(e, constants); | 
| (...skipping 15 matching lines...) Expand all  Loading... | 
| 290     // TODO(ahe): This doesn't belong here. Rename this class and generalize. | 290     // TODO(ahe): This doesn't belong here. Rename this class and generalize. | 
| 291     var closureClassMap = | 291     var closureClassMap = | 
| 292         constants.compiler.closureToClassMapper.closureMappingCache | 292         constants.compiler.closureToClassMapper.closureMappingCache | 
| 293         .remove(node); | 293         .remove(node); | 
| 294     if (closureClassMap != null) { | 294     if (closureClassMap != null) { | 
| 295       closureClassMap.removeMyselfFrom( | 295       closureClassMap.removeMyselfFrom( | 
| 296           constants.compiler.enqueuer.codegen.universe); | 296           constants.compiler.enqueuer.codegen.universe); | 
| 297     } | 297     } | 
| 298   } | 298   } | 
| 299 } | 299 } | 
| OLD | NEW | 
|---|