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

Unified Diff: pkg/front_end/lib/src/fasta/source/source_library_builder.dart

Issue 2962913002: Create an option to disable type inference and type promotion. (Closed)
Patch Set: Created 3 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
Index: pkg/front_end/lib/src/fasta/source/source_library_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
index 368b3cd4868dbd1bf1c4d69345f9f2700a4c39f7..3ed4f7f9ff91d6620f17aa6dc7b6f30b6a84522c 100644
--- a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
@@ -58,6 +58,10 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
final List<List> implementationBuilders = <List<List>>[];
+ /// Indicates whether type inference (and type promotion) should be disabled
+ /// for this library.
+ final bool disableTypeInference;
+
String name;
String partOfName;
@@ -80,7 +84,8 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
SourceLibraryBuilder.fromScopes(
this.loader, this.fileUri, this.libraryDeclaration, this.importScope)
- : currentDeclaration = libraryDeclaration,
+ : disableTypeInference = loader.target.disableTypeInference,
+ currentDeclaration = libraryDeclaration,
super(
fileUri, libraryDeclaration.toScope(importScope), new Scope.top());
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/diet_listener.dart ('k') | pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698