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

Unified Diff: pkg/compiler/lib/src/cps_ir/gvn.dart

Issue 1859343004: dartfmt pkg/compiler (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 | « pkg/compiler/lib/src/cps_ir/finalize.dart ('k') | pkg/compiler/lib/src/cps_ir/inline.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/gvn.dart
diff --git a/pkg/compiler/lib/src/cps_ir/gvn.dart b/pkg/compiler/lib/src/cps_ir/gvn.dart
index d8eeff020a0af7172ba53d7526cfeaf27b9edc2e..8970f5cf8acf49c2cd478a4be48a33d365892697 100644
--- a/pkg/compiler/lib/src/cps_ir/gvn.dart
+++ b/pkg/compiler/lib/src/cps_ir/gvn.dart
@@ -95,10 +95,10 @@ class GVN extends TrampolineRecursiveVisitor implements Pass {
// GetLazyStatic cannot have side effects because the field has already
// been initialized.
return prim.isSafeForElimination ||
- prim is GetField ||
- prim is GetLength ||
- prim is GetIndex ||
- prim is GetLazyStatic;
+ prim is GetField ||
+ prim is GetLength ||
+ prim is GetIndex ||
+ prim is GetLazyStatic;
}
@override
@@ -150,7 +150,9 @@ class GVN extends TrampolineRecursiveVisitor implements Pass {
Interceptor interceptor = existing;
interceptor.interceptedClasses.addAll(prim.interceptedClasses);
}
- prim..replaceUsesWith(existing)..destroy();
+ prim
+ ..replaceUsesWith(existing)
+ ..destroy();
node.remove();
return next;
}
@@ -247,7 +249,7 @@ class GVN extends TrampolineRecursiveVisitor implements Pass {
Continuation enclosingLoop = currentLoopHeader;
Continuation hoistTarget = null;
while (loopHierarchy.getDepth(enclosingLoop) > hoistDepth &&
- canHoistHeapDependencyOutOfLoop(prim, enclosingLoop)) {
+ canHoistHeapDependencyOutOfLoop(prim, enclosingLoop)) {
hoistTarget = enclosingLoop;
enclosingLoop = loopHierarchy.getEnclosingLoop(enclosingLoop);
}
@@ -294,17 +296,14 @@ class GVN extends TrampolineRecursiveVisitor implements Pass {
// Put the primitive in the environment while processing the loop.
environment[gvn] = prim;
- loopHoistedBindings
- .putIfAbsent(hoistTarget, () => <int>[])
- .add(gvn);
+ loopHoistedBindings.putIfAbsent(hoistTarget, () => <int>[]).add(gvn);
return true;
}
/// If the given primitive is a trivial primitive that should be hoisted
/// on-demand, hoist it and its dependent values above [loopBinding].
- void hoistTrivialPrimitive(Primitive prim,
- LetCont loopBinding,
- Continuation enclosingLoop) {
+ void hoistTrivialPrimitive(
+ Primitive prim, LetCont loopBinding, Continuation enclosingLoop) {
assert(isFastConstant(prim));
// The primitive might already be bound in an outer scope. Do not relocate
@@ -439,9 +438,11 @@ class GvnEntry {
final List vector;
final int hashCode;
- GvnEntry(List vector) : vector = vector, hashCode = computeHashCode(vector);
+ GvnEntry(List vector)
+ : vector = vector,
+ hashCode = computeHashCode(vector);
- bool operator==(other) {
+ bool operator ==(other) {
if (other is! GvnEntry) return false;
GvnEntry entry = other;
List otherVector = entry.vector;
@@ -461,7 +462,7 @@ class GvnEntry {
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
hash = hash ^ (hash >> 6);
}
- hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
+ hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
hash = hash ^ (hash >> 11);
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
}
@@ -600,6 +601,7 @@ class GvnCode {
}
typedef ReferenceCallback(Reference ref);
+
class InputVisitor extends DeepRecursiveVisitor {
ReferenceCallback callback;
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/finalize.dart ('k') | pkg/compiler/lib/src/cps_ir/inline.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698