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

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

Issue 16830002: Be smarter about when to disable global type inference. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with HEAD Created 7 years, 6 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 | dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/sdk/lib/_internal/compiler/implementation/compiler.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/compiler.dart b/dart/sdk/lib/_internal/compiler/implementation/compiler.dart
index c850caa3ae3367d60e30319a08121a9cf29b1a8a..446e36a8015141ff424397f3ed3b27c85e10d910 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/compiler.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/compiler.dart
@@ -453,6 +453,9 @@ abstract class Compiler implements DiagnosticListener {
bool hasCrashed = false;
+ /// Set by the backend if real reflection is detected in use of dart:mirrors.
+ bool disableTypeInferenceForMirrors = false;
+
Compiler({this.tracer: const Tracer(),
this.enableTypeAssertions: false,
this.enableUserAssertions: false,
@@ -530,7 +533,9 @@ abstract class Compiler implements DiagnosticListener {
bool get compileAll => false;
- bool get disableTypeInference => disableTypeInferenceFlag || mirrorsEnabled;
+ bool get disableTypeInference {
+ return disableTypeInferenceFlag || disableTypeInferenceForMirrors;
+ }
int getNextFreeClassId() => nextFreeClassId++;
« no previous file with comments | « no previous file | dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698