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

Unified Diff: lib/src/codegen/side_effect_analysis.dart

Issue 1554683002: Update to latest analyzer (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 12 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: lib/src/codegen/side_effect_analysis.dart
diff --git a/lib/src/codegen/side_effect_analysis.dart b/lib/src/codegen/side_effect_analysis.dart
index 3126291e200b40c3e022012314b6bb328d9c7fe0..435d799544a9795ce598af78439450d01420d6a9 100644
--- a/lib/src/codegen/side_effect_analysis.dart
+++ b/lib/src/codegen/side_effect_analysis.dart
@@ -36,8 +36,8 @@ bool isStateless(Expression node, [AstNode context]) {
if (node is ThisExpression || node is SuperExpression) return true;
if (node is SimpleIdentifier) {
var e = node.staticElement;
- if (e is PropertyAccessorElement) e =
- (e as PropertyAccessorElement).variable;
+ if (e is PropertyAccessorElement)
+ e = (e as PropertyAccessorElement).variable;
if (e is VariableElement && !e.isSynthetic) {
if (e.isFinal) return true;
if (e is LocalVariableElement || e is ParameterElement) {
@@ -77,12 +77,12 @@ class _AssignmentFinder extends RecursiveAstVisitor {
visitSimpleIdentifier(SimpleIdentifier node) {
// Ignore if qualified.
AstNode parent = node.parent;
- if (parent is PrefixedIdentifier &&
- identical(parent.identifier, node)) return;
- if (parent is PropertyAccess &&
- identical(parent.propertyName, node)) return;
- if (parent is MethodInvocation &&
- identical(parent.methodName, node)) return;
+ if (parent is PrefixedIdentifier && identical(parent.identifier, node))
+ return;
+ if (parent is PropertyAccess && identical(parent.propertyName, node))
+ return;
+ if (parent is MethodInvocation && identical(parent.methodName, node))
+ return;
if (parent is ConstructorName) return;
if (parent is Label) return;

Powered by Google App Engine
This is Rietveld 408576698