| Index: dart/sdk/lib/_internal/compiler/implementation/js_backend/constant_handler_javascript.dart
|
| diff --git a/dart/sdk/lib/_internal/compiler/implementation/js_backend/constant_handler_javascript.dart b/dart/sdk/lib/_internal/compiler/implementation/js_backend/constant_handler_javascript.dart
|
| index 5106849cf28c3aeeab32cf3c1dd070a5558a60a1..3f8884f06dfe433459fb135d6df6512b230bfe2b 100644
|
| --- a/dart/sdk/lib/_internal/compiler/implementation/js_backend/constant_handler_javascript.dart
|
| +++ b/dart/sdk/lib/_internal/compiler/implementation/js_backend/constant_handler_javascript.dart
|
| @@ -207,4 +207,25 @@ class JavaScriptConstantCompiler extends ConstantCompilerBase
|
| return new TypeConstExp(
|
| new TypeConstant(elementType, constantType), elementType);
|
| }
|
| +
|
| + void forgetElement(Element element) {
|
| + element.accept(new ForgetConstantVisitor(this));
|
| + }
|
| +}
|
| +
|
| +class ForgetConstantVisitor extends ElementVisitor {
|
| + final JavaScriptConstantCompiler constants;
|
| +
|
| + ForgetConstantVisitor(this.constants);
|
| +
|
| + void visitElement(Element e) {
|
| + for (MetadataAnnotation data in e.metadata) {
|
| + constants.metadataConstantMap.remove(data);
|
| + }
|
| + }
|
| +
|
| + void visitFunctionElement(FunctionElement e) {
|
| + super.visitFunctionElement(e);
|
| + e.functionSignature.forEachParameter(this.visit);
|
| + }
|
| }
|
|
|