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

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

Issue 1778623002: DDC: remove dumpInfo flag (Closed) Base URL: git@github.com:dart-lang/dev_compiler.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
« no previous file with comments | « lib/src/codegen/js_codegen.dart ('k') | lib/src/codegen/side_effect_analysis.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/codegen/js_metalet.dart
diff --git a/lib/src/codegen/js_metalet.dart b/lib/src/codegen/js_metalet.dart
index 3ae1bf9649b5f2361b33d4dd1b32e82170a8c8b1..02d7842fcd8671d684763840d7972f8817627a0c 100644
--- a/lib/src/codegen/js_metalet.dart
+++ b/lib/src/codegen/js_metalet.dart
@@ -274,7 +274,8 @@ class MetaLet extends Expression {
class _VariableUseCounter extends BaseVisitor {
final counts = <String, int>{};
- @override visitInterpolatedExpression(InterpolatedExpression node) {
+ @override
+ visitInterpolatedExpression(InterpolatedExpression node) {
int n = counts[node.nameOrPosition];
counts[node.nameOrPosition] = n == null ? 1 : n + 1;
}
@@ -285,11 +286,13 @@ class _IdentFinder extends BaseVisitor {
bool found = false;
_IdentFinder(this.name);
- @override visitIdentifier(Identifier node) {
+ @override
+ visitIdentifier(Identifier node) {
if (node.name == name) found = true;
}
- @override visitNode(Node node) {
+ @override
+ visitNode(Node node) {
if (!found) super.visitNode(node);
}
}
@@ -298,22 +301,26 @@ class _YieldFinder extends BaseVisitor {
bool hasYield = false;
bool hasThis = false;
bool _nestedFunction = false;
- @override visitThis(This node) {
+ @override
+ visitThis(This node) {
hasThis = true;
}
- @override visitFunctionExpression(FunctionExpression node) {
+ @override
+ visitFunctionExpression(FunctionExpression node) {
var savedNested = _nestedFunction;
_nestedFunction = true;
super.visitFunctionExpression(node);
_nestedFunction = savedNested;
}
- @override visitYield(Yield node) {
+ @override
+ visitYield(Yield node) {
if (!_nestedFunction) hasYield = true;
}
- @override visitNode(Node node) {
+ @override
+ visitNode(Node node) {
if (!hasYield) super.visitNode(node);
}
}
« no previous file with comments | « lib/src/codegen/js_codegen.dart ('k') | lib/src/codegen/side_effect_analysis.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698