| Index: dart/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
|
| diff --git a/dart/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart b/dart/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
|
| index e4758a2ec1b2fc4e36c6f617a616034e3792395c..174b429bfc793cf30966a1677c56103d3219cd21 100644
|
| --- a/dart/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
|
| +++ b/dart/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
|
| @@ -43,7 +43,8 @@ class ConstantHandler extends CompilerTask {
|
| String get name => 'ConstantHandler';
|
|
|
| void registerCompileTimeConstant(Constant constant) {
|
| - registerInstantiatedClass(constant.computeType(compiler).element);
|
| + registerInstantiatedClass(constant.computeType(compiler).element,
|
| + compiler.globalDependencies);
|
| if (constant.isFunction()) {
|
| FunctionConstant function = constant;
|
| registerGetOfStaticFunction(function.element);
|
| @@ -51,9 +52,9 @@ class ConstantHandler extends CompilerTask {
|
| compiledConstants.add(constant);
|
| }
|
|
|
| - void registerInstantiatedClass(ClassElement element) {
|
| + void registerInstantiatedClass(ClassElement element, TreeElements elements) {
|
| if (isMetadata) return;
|
| - compiler.enqueuer.codegen.registerInstantiatedClass(element);
|
| + compiler.enqueuer.codegen.registerInstantiatedClass(element, elements);
|
| }
|
|
|
| void registerStaticUse(Element element) {
|
| @@ -67,7 +68,8 @@ class ConstantHandler extends CompilerTask {
|
| }
|
|
|
| void registerStringInstance() {
|
| - registerInstantiatedClass(compiler.stringClass);
|
| + registerInstantiatedClass(compiler.stringClass,
|
| + compiler.globalDependencies);
|
| }
|
|
|
| void registerCreateRuntimeTypeFunction() {
|
| @@ -312,17 +314,17 @@ class CompileTimeConstantEvaluator extends Visitor {
|
| }
|
|
|
| Constant visitLiteralBool(LiteralBool node) {
|
| - handler.registerInstantiatedClass(compiler.boolClass);
|
| + handler.registerInstantiatedClass(compiler.boolClass, elements);
|
| return constantSystem.createBool(node.value);
|
| }
|
|
|
| Constant visitLiteralDouble(LiteralDouble node) {
|
| - handler.registerInstantiatedClass(compiler.doubleClass);
|
| + handler.registerInstantiatedClass(compiler.doubleClass, elements);
|
| return constantSystem.createDouble(node.value);
|
| }
|
|
|
| Constant visitLiteralInt(LiteralInt node) {
|
| - handler.registerInstantiatedClass(compiler.intClass);
|
| + handler.registerInstantiatedClass(compiler.intClass, elements);
|
| return constantSystem.createInt(node.value);
|
| }
|
|
|
| @@ -385,7 +387,7 @@ class CompileTimeConstantEvaluator extends Visitor {
|
| classElement.ensureResolved(compiler);
|
| // TODO(floitsch): copy over the generic type.
|
| DartType type = classElement.rawType;
|
| - handler.registerInstantiatedClass(classElement);
|
| + handler.registerInstantiatedClass(classElement, elements);
|
| Constant constant = new MapConstant(type, keysList, values, protoValue);
|
| handler.registerCompileTimeConstant(constant);
|
| return constant;
|
| @@ -660,7 +662,7 @@ class CompileTimeConstantEvaluator extends Visitor {
|
| evaluator.evaluateConstructorFieldValues(arguments);
|
| List<Constant> jsNewArguments = evaluator.buildJsNewArguments(classElement);
|
|
|
| - handler.registerInstantiatedClass(classElement);
|
| + handler.registerInstantiatedClass(classElement, elements);
|
| // TODO(floitsch): take generic types into account.
|
| classElement.computeType(compiler);
|
| DartType type = classElement.rawType;
|
|
|