Index: lib/compiler/implementation/compiler.dart |
diff --git a/lib/compiler/implementation/compiler.dart b/lib/compiler/implementation/compiler.dart |
index 0f5fa175133601bfff948f08cb1ba97eaa6bcd58..ac228b8c448ba4295aedd79b258333cfd947ecad 100644 |
--- a/lib/compiler/implementation/compiler.dart |
+++ b/lib/compiler/implementation/compiler.dart |
@@ -127,6 +127,7 @@ abstract class Compiler implements DiagnosticListener { |
ClassElement functionClass; |
ClassElement nullClass; |
ClassElement listClass; |
+ ClassElement typeClass; |
ClassElement mapClass; |
ClassElement jsInvocationMirrorClass; |
Element assertMethod; |
@@ -189,10 +190,24 @@ abstract class Compiler implements DiagnosticListener { |
static const SourceString START_ROOT_ISOLATE = |
const SourceString('startRootIsolate'); |
bool enabledNoSuchMethod = false; |
- bool enabledRuntimeType = false; |
bool enabledFunctionApply = false; |
bool enabledInvokeOn = false; |
+ bool _enabledRuntimeType = false; |
+ bool _needsRuntimeTypeCache = false; |
+ |
+ void enableRuntimeTypeFunction() { |
ahe
2012/11/01 13:55:27
Why do you need this complexity? What is wrong wit
karlklose
2012/11/01 14:34:20
It is not needed anymore. Before making the runtim
|
+ _enabledRuntimeType = true; |
+ enableRuntimeTypeCache(); |
+ } |
+ |
+ void enableRuntimeTypeCache() { |
+ _needsRuntimeTypeCache = true; |
+ } |
+ |
+ bool get enabledRuntimeType => _enabledRuntimeType; |
+ bool needsRuntimeTypeCache() => _needsRuntimeTypeCache; |
+ |
Stopwatch progress; |
static const int PHASE_SCANNING = 0; |
@@ -403,6 +418,7 @@ abstract class Compiler implements DiagnosticListener { |
stringClass = lookupSpecialClass(const SourceString('String')); |
functionClass = lookupSpecialClass(const SourceString('Function')); |
listClass = lookupSpecialClass(const SourceString('List')); |
+ typeClass = lookupSpecialClass(const SourceString('Type')); |
mapClass = lookupSpecialClass(const SourceString('Map')); |
jsInvocationMirrorClass = |
lookupSpecialClass(const SourceString('JSInvocationMirror')); |