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

Unified Diff: pkg/compiler/lib/src/js_backend/constant_emitter.dart

Issue 1153243003: dart2js: Use frequency of occurence to sort metadata indices. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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: pkg/compiler/lib/src/js_backend/constant_emitter.dart
diff --git a/pkg/compiler/lib/src/js_backend/constant_emitter.dart b/pkg/compiler/lib/src/js_backend/constant_emitter.dart
index f01f0d079e3ad55a3aae269686186f767e5a95dc..b7f8d867cbfd018947b3a749811b7ae614411273 100644
--- a/pkg/compiler/lib/src/js_backend/constant_emitter.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_emitter.dart
@@ -264,7 +264,17 @@ class ConstantEmitter
@override
jsAst.Expression visitDummy(DummyConstantValue constant, [_]) {
- return new jsAst.LiteralNumber('0');
+ switch (constant.kind) {
+ case DummyConstantKinds.dummyReceiver:
+ case DummyConstantKinds.emptyValue:
+ return new jsAst.LiteralNumber('0');
+ case DummyConstantKinds.typeVariableReference:
+ return constant.payload;
+ default:
+ compiler.internalError(NO_LOCATION_SPANNABLE,
+ "Unexpected DummyConstantKind ${constant.kind}");
+ return null;
+ }
}
@override

Powered by Google App Engine
This is Rietveld 408576698