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

Unified Diff: pkg/compiler/lib/src/cps_ir/scalar_replacement.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
Index: pkg/compiler/lib/src/cps_ir/scalar_replacement.dart
diff --git a/pkg/compiler/lib/src/cps_ir/scalar_replacement.dart b/pkg/compiler/lib/src/cps_ir/scalar_replacement.dart
index 5eb8156ea719dc188ec5b52dc3d842549e302698..a913f0852ef78996cd23c15809c549e6731d86ff 100644
--- a/pkg/compiler/lib/src/cps_ir/scalar_replacement.dart
+++ b/pkg/compiler/lib/src/cps_ir/scalar_replacement.dart
@@ -8,8 +8,7 @@ import 'optimizers.dart';
import 'dart:collection' show Queue;
import '../common.dart';
-import '../compiler.dart' as dart2js show
- Compiler;
+import '../compiler.dart' as dart2js show Compiler;
import '../constants/values.dart';
import '../elements/elements.dart';
import '../types/types.dart';
@@ -44,7 +43,6 @@ class ScalarReplacer extends Pass {
* can create new candidates, iterate until all scalar replacements are done.
*/
class ScalarReplacementVisitor extends TrampolineRecursiveVisitor {
-
final InternalErrorFunction internalError;
final World classWorld;
ScalarReplacementRemovalVisitor removalVisitor;
@@ -71,7 +69,6 @@ class ScalarReplacementVisitor extends TrampolineRecursiveVisitor {
}
void tryScalarReplacement(Primitive allocation) {
-
// We can do scalar replacement of an aggregate if all uses of an allocation
// are reads or writes.
for (Reference ref = allocation.firstRef; ref != null; ref = ref.next) {
@@ -101,11 +98,10 @@ class ScalarReplacementVisitor extends TrampolineRecursiveVisitor {
if (allocation is CreateInstance) {
int i = 0;
allocation.classElement.forEachInstanceField(
- (ClassElement enclosingClass, FieldElement field) {
- Primitive argument = allocation.argument(i++);
- fieldInitialValues[field] = argument;
- },
- includeSuperAndInjectedMembers: true);
+ (ClassElement enclosingClass, FieldElement field) {
+ Primitive argument = allocation.argument(i++);
+ fieldInitialValues[field] = argument;
+ }, includeSuperAndInjectedMembers: true);
}
// Create [MutableVariable]s for each written field. Initialize the
@@ -113,7 +109,7 @@ class ScalarReplacementVisitor extends TrampolineRecursiveVisitor {
// `null` constant if there is not initial value.
Map<FieldElement, MutableVariable> cells =
<FieldElement, MutableVariable>{};
- InteriorNode insertionPoint = allocation.parent; // LetPrim
+ InteriorNode insertionPoint = allocation.parent; // LetPrim
for (FieldElement field in writes) {
MutableVariable variable = new MutableVariable(field);
variable.type = new TypeMask.nonNullEmpty();
@@ -214,7 +210,6 @@ class ScalarReplacementVisitor extends TrampolineRecursiveVisitor {
}
}
-
/// Visit a just-deleted subterm and unlink all [Reference]s in it. Reconsider
/// allocations for scalar replacement.
class ScalarReplacementRemovalVisitor extends TrampolineRecursiveVisitor {
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/redundant_refinement.dart ('k') | pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698