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

Unified Diff: pkg/compiler/lib/src/ssa/nodes.dart

Issue 1343783002: dart2js ssa: Avoid tracking too much in load elimination (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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/ssa/nodes.dart
diff --git a/pkg/compiler/lib/src/ssa/nodes.dart b/pkg/compiler/lib/src/ssa/nodes.dart
index fdaef0179507644c4b9fdd3a92cd9c95fdf48bcd..8943e70525f806a12f5645b41e34bc5ed6863259 100644
--- a/pkg/compiler/lib/src/ssa/nodes.dart
+++ b/pkg/compiler/lib/src/ssa/nodes.dart
@@ -130,6 +130,7 @@ abstract class HInstructionVisitor extends HGraphVisitor {
}
class HGraph {
+ Element element; // Used for debug printing.
HBasicBlock entry;
HBasicBlock exit;
HThis thisInstruction;
@@ -137,15 +138,13 @@ class HGraph {
HParameterValue explicitReceiverParameter;
bool isRecursiveMethod = false;
bool calledInLoop = false;
- final List<HBasicBlock> blocks;
+ final List<HBasicBlock> blocks = <HBasicBlock>[];
// We canonicalize all constants used within a graph so we do not
// have to worry about them for global value numbering.
- Map<ConstantValue, HConstant> constants;
+ Map<ConstantValue, HConstant> constants = new Map<ConstantValue, HConstant>();
- HGraph()
- : blocks = new List<HBasicBlock>(),
- constants = new Map<ConstantValue, HConstant>() {
+ HGraph() {
entry = addNewBlock();
// The exit block will be added later, so it has an id that is
// after all others in the system.
@@ -262,6 +261,8 @@ class HGraph {
validator.visitGraph(this);
return validator.isValid;
}
+
+ toString() => 'HGraph($element)';
}
class HBaseVisitor extends HGraphVisitor implements HVisitor {
@@ -1883,6 +1884,8 @@ class HForeignNew extends HForeign {
accept(HVisitor visitor) => visitor.visitForeignNew(this);
bool get isAllocation => true;
+
+ String toString() => 'HForeignNew($element)';
}
abstract class HInvokeBinary extends HInstruction {

Powered by Google App Engine
This is Rietveld 408576698