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

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

Issue 12528008: Implement CHA through type mask and TypedSelector in the simple type inferrer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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_backend/backend.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/js_backend/backend.dart (revision 19670)
+++ sdk/lib/_internal/compiler/implementation/js_backend/backend.dart (working copy)
@@ -642,6 +642,9 @@
ClassElement jsFunctionClass;
ClassElement jsNullClass;
ClassElement jsBoolClass;
+ ClassElement typeLiteralClass;
+ ClassElement mapLiteralClass;
+ ClassElement constMapLiteralClass;
ClassElement jsIndexableClass;
Element jsArrayLength;
Element jsStringLength;
@@ -855,6 +858,12 @@
if (cls != null) interceptedClasses.add(cls);
}
+ typeLiteralClass = compiler.findHelper(const SourceString('TypeImpl'));
+ mapLiteralClass =
+ compiler.coreLibrary.find(const SourceString('LinkedHashMap'));
+ constMapLiteralClass =
+ compiler.findHelper(const SourceString('ConstantMap'));
+
specialOperatorEqClasses
..add(jsNullClass)
..add(jsNumberClass);
@@ -924,7 +933,7 @@
// The backend will use a literal list to initialize the entries
// of the map.
enqueuer.registerInstantiatedClass(compiler.listClass);
- enqueuer.registerInstantiatedClass(compiler.mapLiteralClass);
+ enqueuer.registerInstantiatedClass(mapLiteralClass);
enqueueInResolution(getMapMaker());
}
}
@@ -1029,6 +1038,7 @@
}
void registerIsCheck(DartType type, Enqueuer world) {
+ world.registerInstantiatedClass(compiler.boolClass);
bool isTypeVariable = type.kind == TypeKind.TYPE_VARIABLE;
if (!type.isRaw || isTypeVariable) {
enqueueInResolution(getSetRuntimeTypeInfo());
@@ -1531,4 +1541,16 @@
bool isNullImplementation(ClassElement cls) {
return cls == jsNullClass;
}
+
+ ClassElement get intImplementation => jsIntClass;
+ ClassElement get doubleImplementation => jsDoubleClass;
+ ClassElement get numImplementation => jsNumberClass;
+ ClassElement get stringImplementation => jsStringClass;
+ ClassElement get listImplementation => jsArrayClass;
+ ClassElement get mapImplementation => mapLiteralClass;
+ ClassElement get constMapImplementation => constMapLiteralClass;
+ ClassElement get functionImplementation => jsFunctionClass;
+ ClassElement get typeImplementation => typeLiteralClass;
+ ClassElement get boolImplementation => jsBoolClass;
+ ClassElement get nullImplementation => jsNullClass;
}
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/compiler.dart ('k') | sdk/lib/_internal/compiler/implementation/native_handler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698