Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(513)

Unified Diff: sdk/lib/_internal/compiler/implementation/js_emitter/metadata_emitter.dart

Issue 226953003: Revert "Compute frontend/backend specific constants." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/js_emitter/metadata_emitter.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_emitter/metadata_emitter.dart b/sdk/lib/_internal/compiler/implementation/js_emitter/metadata_emitter.dart
index b57a8e231e12b1f6635f34da68c0632de30529a9..394ee95d1454aba10d058bd4418e8cb24109e4c1 100644
--- a/sdk/lib/_internal/compiler/implementation/js_emitter/metadata_emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_emitter/metadata_emitter.dart
@@ -27,8 +27,7 @@ class MetadataEmitter extends CodeEmitterHelper {
if (link != null) {
for (; !link.isEmpty; link = link.tail) {
MetadataAnnotation annotation = link.head;
- Constant value =
- backend.constants.getConstantForMetadata(annotation);
+ Constant value = annotation.value;
if (value == null) {
compiler.internalError(annotation, 'Annotation value is null.');
} else {
@@ -47,7 +46,8 @@ class MetadataEmitter extends CodeEmitterHelper {
if (signature.optionalParameterCount == 0) return const [];
List<int> defaultValues = <int>[];
for (Element element in signature.optionalParameters) {
- Constant value = backend.constants.getConstantForVariable(element);
+ Constant value =
+ compiler.constantHandler.initialVariableValues[element];
String stringRepresentation = (value == null)
? "null"
: jsAst.prettyPrint(task.constantReference(value), compiler)
@@ -58,7 +58,7 @@ class MetadataEmitter extends CodeEmitterHelper {
}
int reifyMetadata(MetadataAnnotation annotation) {
- Constant value = backend.constants.getConstantForMetadata(annotation);
+ Constant value = annotation.value;
if (value == null) {
compiler.internalError(annotation, 'Annotation value is null.');
return -1;

Powered by Google App Engine
This is Rietveld 408576698