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

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

Issue 360493002: Emit declarations for typedefs that are needed by reflection. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 6 years, 4 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 89fdfa6622a0a1097cf5860afc9c809f653c2f16..92b5f552bf72b92f83134e35709e5d669a0bd5dd 100644
--- a/sdk/lib/_internal/compiler/implementation/js_emitter/metadata_emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_emitter/metadata_emitter.dart
@@ -90,20 +90,8 @@ class MetadataEmitter extends CodeEmitterHelper {
}
void emitMetadata(CodeBuffer buffer) {
- var literals = backend.typedefTypeLiterals.toList();
- Elements.sortedByPosition(literals);
- var properties = [];
- for (TypedefElement literal in literals) {
- var key = namer.getNameX(literal);
- var value = js.number(reifyType(literal.rawType));
- properties.add(new jsAst.Property(js.string(key), value));
- }
- var map = new jsAst.ObjectInitializer(properties);
- buffer.write(
- jsAst.prettyPrint(
- js.statement('init.functionAliases = #', map), compiler));
- buffer.write('${N}init.metadata$_=$_[');
- for (var metadata in globalMetadata) {
+ buffer.write('init.metadata$_=$_[');
+ for (String metadata in globalMetadata) {
if (metadata is String) {
if (metadata != 'null') {
buffer.write(metadata);

Powered by Google App Engine
This is Rietveld 408576698