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

Unified Diff: pkg/compiler/lib/src/closure.dart

Issue 1803303002: Move all flags to CompilerOptions (first step to stop passing the compiler to (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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/compiler/lib/src/closure.dart
diff --git a/pkg/compiler/lib/src/closure.dart b/pkg/compiler/lib/src/closure.dart
index d015b7ca4b6a241d5162aa4e4f11894f11350cbd..bb516799a5eefda41195955daa6528c23666711b 100644
--- a/pkg/compiler/lib/src/closure.dart
+++ b/pkg/compiler/lib/src/closure.dart
@@ -743,7 +743,7 @@ class ClosureTranslator extends Visitor {
// TODO(karlklose,johnniwinther): if the type is null, the annotation is
// from a parameter which has been analyzed before the method has been
// resolved and the result has been thrown away.
- if (compiler.enableTypeAssertions && type != null &&
+ if (compiler.options.enableTypeAssertions && type != null &&
type.containsTypeVariables) {
if (insideClosure && member.isFactoryConstructor) {
// This is a closure in a factory constructor. Since there is no
@@ -813,7 +813,7 @@ class ClosureTranslator extends Visitor {
Element element = elements[node];
if (Elements.isLocal(element)) {
mutatedVariables.add(element);
- if (compiler.enableTypeAssertions) {
+ if (compiler.options.enableTypeAssertions) {
TypedElement typedElement = element;
analyzeTypeVariables(typedElement.type);
}
@@ -1065,7 +1065,7 @@ class ClosureTranslator extends Visitor {
// escape the potential type variables used in that closure.
if (element is FunctionElement &&
(compiler.backend.methodNeedsRti(element) ||
- compiler.enableTypeAssertions)) {
+ compiler.options.enableTypeAssertions)) {
analyzeTypeVariables(type);
}

Powered by Google App Engine
This is Rietveld 408576698