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

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

Issue 10911006: Collect the types used in is-checks in the resolver phase. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
« no previous file with comments | « no previous file | lib/compiler/implementation/enqueue.dart » ('j') | lib/compiler/implementation/resolver.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/compiler.dart
diff --git a/lib/compiler/implementation/compiler.dart b/lib/compiler/implementation/compiler.dart
index 23797006b1f4a05d250d98e8961a7876c762c991..cafe2d5d0cc5129aa86574daac08c1efa68cb2eb 100644
--- a/lib/compiler/implementation/compiler.dart
+++ b/lib/compiler/implementation/compiler.dart
@@ -343,6 +343,14 @@ class Compiler implements DiagnosticListener {
jsIndexingBehaviorInterface =
findHelper(const SourceString('JavaScriptIndexingBehavior'));
+
+ // Register is-checks for all special classes.
ngeoffray 2012/08/30 11:03:33 Why? Is checks are for emitting the is$ClassName m
karlklose 2012/08/30 13:04:31 Done. I added internalErrors when elements were n
+ for (ClassElement cls in [objectClass, boolClass, numClass, intClass,
+ doubleClass, stringClass, functionClass,
+ listClass, closureClass, dynamicClass,
+ jsIndexingBehaviorInterface]) {
+ registerIsCheck(cls.computeType(this));
+ }
}
void scanBuiltinLibraries() {
@@ -359,9 +367,6 @@ class Compiler implements DiagnosticListener {
assertMethod = coreLibrary.find(const SourceString('assert'));
initializeSpecialClasses();
-
- //patchDartLibrary(coreLibrary, 'core');
- //patchDartLibrary(coreImplLibrary, 'coreimpl');
}
void importCoreLibrary(LibraryElement library) {
@@ -833,6 +838,11 @@ class Compiler implements DiagnosticListener {
=> interceptorsLibrary.findLocal(name);
bool get isMockCompilation => false;
+
+ registerIsCheck(Type type) {
ngeoffray 2012/08/30 11:03:33 Please remove this helper method, it is too confus
karlklose 2012/08/30 13:04:31 Done.
+ enqueuer.codegen.registerIsCheck(type);
+ enqueuer.resolution.registerIsCheck(type);
+ }
}
class CompilerTask {
« no previous file with comments | « no previous file | lib/compiler/implementation/enqueue.dart » ('j') | lib/compiler/implementation/resolver.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698