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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart

Issue 1250023002: dart2js: Add an empty "MANGLED_NAMES" embedded global to the startup-emitter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart2js.js_emitter.startup_emitter.model_emitter; 5 part of dart2js.js_emitter.startup_emitter.model_emitter;
6 6
7 /// The fast startup emitter's goal is to minimize the amount of work that the 7 /// The fast startup emitter's goal is to minimize the amount of work that the
8 /// JavaScript engine has to do before it can start running user code. 8 /// JavaScript engine has to do before it can start running user code.
9 /// 9 ///
10 /// Whenever possible, the emitter uses object literals instead of updating 10 /// Whenever possible, the emitter uses object literals instead of updating
(...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 // same JavaScript context (except for testing) this shouldn't have any 1013 // same JavaScript context (except for testing) this shouldn't have any
1014 // impact on real-world programs, though. 1014 // impact on real-world programs, though.
1015 globals.add( 1015 globals.add(
1016 new js.Property(js.string(CREATE_NEW_ISOLATE), 1016 new js.Property(js.string(CREATE_NEW_ISOLATE),
1017 js.js('function () { return $staticStateName; }'))); 1017 js.js('function () { return $staticStateName; }')));
1018 // TODO(floitsch): add remaining isolate functions. 1018 // TODO(floitsch): add remaining isolate functions.
1019 } 1019 }
1020 1020
1021 globals.add(emitMangledGlobalNames()); 1021 globals.add(emitMangledGlobalNames());
1022 1022
1023 // The [MANGLED_NAMES] table is only relevant for reflection.
1024 // TODO(floitsch): verify that this is correct.
1025 globals.add(new js.Property(js.string(MANGLED_NAMES),
1026 new js.ObjectInitializer([])));
1027
1023 globals.add(emitGetTypeFromName()); 1028 globals.add(emitGetTypeFromName());
1024 1029
1025 globals.addAll(emitMetadata(program)); 1030 globals.addAll(emitMetadata(program));
1026 1031
1027 if (program.needsNativeSupport) { 1032 if (program.needsNativeSupport) {
1028 globals.add(new js.Property(js.string(INTERCEPTORS_BY_TAG), 1033 globals.add(new js.Property(js.string(INTERCEPTORS_BY_TAG),
1029 new js.LiteralNull())); 1034 new js.LiteralNull()));
1030 globals.add(new js.Property(js.string(LEAF_TAGS), 1035 globals.add(new js.Property(js.string(LEAF_TAGS),
1031 new js.LiteralNull())); 1036 new js.LiteralNull()));
1032 } 1037 }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 } 1100 }
1096 statements.add(js.js.statement("setOrUpdateInterceptorsByTag(#);", 1101 statements.add(js.js.statement("setOrUpdateInterceptorsByTag(#);",
1097 js.objectLiteral(interceptorsByTag))); 1102 js.objectLiteral(interceptorsByTag)));
1098 statements.add(js.js.statement("setOrUpdateLeafTags(#);", 1103 statements.add(js.js.statement("setOrUpdateLeafTags(#);",
1099 js.objectLiteral(leafTags))); 1104 js.objectLiteral(leafTags)));
1100 statements.add(subclassAssignment); 1105 statements.add(subclassAssignment);
1101 1106
1102 return new js.Block(statements); 1107 return new js.Block(statements);
1103 } 1108 }
1104 } 1109 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698