| Index: sdk/lib/_internal/compiler/implementation/deferred_load.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/deferred_load.dart b/sdk/lib/_internal/compiler/implementation/deferred_load.dart
|
| index e7e7ca7dc9a8461afb3832a7499ca9444481f791..a63e5cc4b59876a06b788f5a730bdc6ac1f4f93b 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/deferred_load.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/deferred_load.dart
|
| @@ -4,6 +4,8 @@
|
|
|
| library deferred_load;
|
|
|
| +import 'cps_ir/const_expression.dart';
|
| +
|
| import 'dart2jslib.dart' show
|
| Backend,
|
| Compiler,
|
| @@ -314,16 +316,16 @@ class DeferredLoadTask extends CompilerTask {
|
| treeElements.forEachConstantNode((Node node, _) {
|
| // Explicitly depend on the backend constants.
|
| addConstants(
|
| - backend.constants.getConstantForNode(node, treeElements));
|
| + backend.constants.getConstantForNode(node, treeElements).value);
|
| });
|
| elements.addAll(treeElements.otherDependencies);
|
| }
|
|
|
| // TODO(sigurdm): How is metadata on a patch-class handled?
|
| for (MetadataAnnotation metadata in element.metadata) {
|
| - Constant constant = backend.constants.getConstantForMetadata(metadata);
|
| + ConstExp constant = backend.constants.getConstantForMetadata(metadata);
|
| if (constant != null) {
|
| - addConstants(constant);
|
| + addConstants(constant.value);
|
| }
|
| }
|
| if (element.isClass) {
|
| @@ -457,19 +459,19 @@ class DeferredLoadTask extends CompilerTask {
|
| });
|
|
|
| for (MetadataAnnotation metadata in library.metadata) {
|
| - Constant constant =
|
| + ConstExp constant =
|
| backend.constants.getConstantForMetadata(metadata);
|
| if (constant != null) {
|
| - _mapDependencies(constant.computeType(compiler).element,
|
| + _mapDependencies(constant.value.computeType(compiler).element,
|
| deferredImport);
|
| }
|
| }
|
| for (LibraryTag tag in library.tags) {
|
| for (MetadataAnnotation metadata in tag.metadata) {
|
| - Constant constant =
|
| + ConstExp constant =
|
| backend.constants.getConstantForMetadata(metadata);
|
| if (constant != null) {
|
| - _mapDependencies(constant.computeType(compiler).element,
|
| + _mapDependencies(constant.value.computeType(compiler).element,
|
| deferredImport);
|
| }
|
| }
|
| @@ -503,9 +505,9 @@ class DeferredLoadTask extends CompilerTask {
|
| assert(metadatas != null);
|
| for (MetadataAnnotation metadata in metadatas) {
|
| metadata.ensureResolved(compiler);
|
| - Element element = metadata.value.computeType(compiler).element;
|
| + Element element = metadata.constant.value.computeType(compiler).element;
|
| if (element == deferredLibraryClass) {
|
| - ConstructedConstant constant = metadata.value;
|
| + ConstructedConstant constant = metadata.constant.value;
|
| StringConstant s = constant.fields[0];
|
| result = s.value.slowToString();
|
| break;
|
| @@ -657,7 +659,8 @@ class DeferredLoadTask extends CompilerTask {
|
| if (metadataList != null) {
|
| for (MetadataAnnotation metadata in metadataList) {
|
| metadata.ensureResolved(compiler);
|
| - Element element = metadata.value.computeType(compiler).element;
|
| + Element element =
|
| + metadata.constant.value.computeType(compiler).element;
|
| if (element == deferredLibraryClass) {
|
| compiler.reportFatalError(import, MessageKind.DEFERRED_OLD_SYNTAX);
|
| }
|
|
|