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

Unified Diff: lib/compiler/implementation/js_backend/backend.dart

Issue 10919123: Reapply Issue 10911006. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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
« no previous file with comments | « lib/compiler/implementation/enqueue.dart ('k') | lib/compiler/implementation/js_backend/emitter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/js_backend/backend.dart
diff --git a/lib/compiler/implementation/js_backend/backend.dart b/lib/compiler/implementation/js_backend/backend.dart
index 2732a013cb1f8293e9b1c9d80936350551657f94..92d7ceae448d979f982f6be9b5b9d03c6629af3f 100644
--- a/lib/compiler/implementation/js_backend/backend.dart
+++ b/lib/compiler/implementation/js_backend/backend.dart
@@ -401,6 +401,13 @@ class JavaScriptBackend extends Backend {
SsaCodeGeneratorTask generator;
CodeEmitterTask emitter;
+ /**
+ * Interface used to determine if an object has the JavaScript
+ * indexing behavior. The interface is only visible to specific
+ * libraries.
+ */
+ ClassElement jsIndexingBehaviorInterface;
+
final Map<Element, Map<Element, HType>> fieldInitializers;
final Map<Element, Map<Element, HType>> fieldConstructorSetters;
final Map<Element, Map<Element, HType>> fieldSettersType;
@@ -439,6 +446,13 @@ class JavaScriptBackend extends Backend {
void enqueueHelpers(Enqueuer world) {
enqueueAllTopLevelFunctions(compiler.jsHelperLibrary, world);
enqueueAllTopLevelFunctions(compiler.interceptorsLibrary, world);
+
+ jsIndexingBehaviorInterface =
+ compiler.findHelper(const SourceString('JavaScriptIndexingBehavior'));
+ if (jsIndexingBehaviorInterface != null) {
+ world.registerIsCheck(jsIndexingBehaviorInterface.computeType(compiler));
+ }
+
for (var helper in [const SourceString('Closure'),
const SourceString('ConstantMap'),
const SourceString('ConstantProtoMap')]) {
« no previous file with comments | « lib/compiler/implementation/enqueue.dart ('k') | lib/compiler/implementation/js_backend/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698