Index: lib/compiler/implementation/compiler.dart |
diff --git a/lib/compiler/implementation/compiler.dart b/lib/compiler/implementation/compiler.dart |
index 4d587cbccf17751bb32b95de3f3d8e7f06412087..1f7643a0f1bf4d067ac60501f3856ae5c78d6dc7 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; |
Element assertMethod; |
Element identicalFunction; |
@@ -185,9 +186,23 @@ abstract class Compiler implements DiagnosticListener { |
static const SourceString START_ROOT_ISOLATE = |
const SourceString('startRootIsolate'); |
bool enabledNoSuchMethod = false; |
- bool enabledRuntimeType = false; |
bool enabledFunctionApply = false; |
+ bool _enabledRuntimeType = false; |
ngeoffray
2012/10/31 10:33:03
Why private? I'd prefer to have it consistent with
karlklose
2012/10/31 13:01:18
I have a change to implement the runtime cache to
|
+ bool _needsRuntimeTypeCache = false; |
+ |
+ void enableRuntimeTypeFunction() { |
+ _enabledRuntimeType = true; |
+ enableRuntimeTypeCache(); |
+ } |
+ |
+ void enableRuntimeTypeCache() { |
+ _needsRuntimeTypeCache = true; |
+ } |
+ |
+ bool get enabledRuntimeType => _enabledRuntimeType; |
+ bool needsRuntimeTypeCache() => _needsRuntimeTypeCache; |
+ |
Stopwatch progress; |
static const int PHASE_SCANNING = 0; |
@@ -393,6 +408,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')); |
closureClass = lookupSpecialClass(const SourceString('Closure')); |
dynamicClass = lookupSpecialClass(const SourceString('Dynamic_')); |