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

Unified Diff: lib/compiler/implementation/ssa/tracer.dart

Issue 10566021: Reapply change to GVN all HFieldGet instructions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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/compiler/implementation/ssa/optimize.dart ('k') | lib/compiler/implementation/ssa/value_set.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/tracer.dart
diff --git a/lib/compiler/implementation/ssa/tracer.dart b/lib/compiler/implementation/ssa/tracer.dart
index 9ee5d3a57783d07a647ba3768e0dc750233ab466..d8b63435755b42097cbdd40777ee511bd7a16ae6 100644
--- a/lib/compiler/implementation/ssa/tracer.dart
+++ b/lib/compiler/implementation/ssa/tracer.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -72,10 +72,12 @@ class HTracer extends HGraphVisitor implements Tracer {
instruction = instruction.next) {
int bci = 0;
int uses = instruction.usedBy.length;
+ String changes = instruction.hasSideEffects() ? '!' : ' ';
+ String depends = instruction.dependsOnSomething() ? '?' : '';
addIndent();
String temporaryId = stringifier.temporaryId(instruction);
String instructionString = stringifier.visit(instruction);
- add("$bci $uses $temporaryId $instructionString <|@\n");
+ add("$bci $uses $temporaryId $instructionString $changes $depends <|@\n");
}
}
@@ -464,9 +466,10 @@ class HInstructionStringifier implements HVisitor<String> {
}
StringBuffer envBuffer = new StringBuffer();
List<HInstruction> inputs = node.inputs;
- // The last input is the guarded expression.
- for (int i = 0; i < inputs.length - 1; i++) {
- envBuffer.add(" ${temporaryId(inputs[i])}");
+ for (int i = 0; i < inputs.length; i++) {
+ if (inputs[i] !== node.guarded) {
+ envBuffer.add(" ${temporaryId(inputs[i])}");
+ }
}
String on = node.isOn ? "on" : "off";
String id = temporaryId(node.guarded);
« no previous file with comments | « lib/compiler/implementation/ssa/optimize.dart ('k') | lib/compiler/implementation/ssa/value_set.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698