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

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

Issue 10001008: Many type fixes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 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 | « lib/compiler/implementation/ssa/codegen.dart ('k') | lib/compiler/implementation/tree/nodes.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/nodes.dart
diff --git a/lib/compiler/implementation/ssa/nodes.dart b/lib/compiler/implementation/ssa/nodes.dart
index 43e19ffc4ef6f394b57c69f82497bd927ed1a65c..068db800e123c3810873211dbed095ea155fac99 100644
--- a/lib/compiler/implementation/ssa/nodes.dart
+++ b/lib/compiler/implementation/ssa/nodes.dart
@@ -505,7 +505,8 @@ class HBasicBlock extends HInstructionList implements Hashable {
void removePhi(HPhi phi) {
phis.remove(phi);
- phi.notifyRemovedFromBlock(this);
+ assert(phi.block == this);
+ phi.notifyRemovedFromBlock();
}
void addAfter(HInstruction cursor, HInstruction instruction) {
@@ -528,7 +529,8 @@ class HBasicBlock extends HInstructionList implements Hashable {
assert(isOpen() || isClosed());
assert(instruction is !HPhi);
super.remove(instruction);
- instruction.notifyRemovedFromBlock(this);
+ assert(instruction.block == this);
+ instruction.notifyRemovedFromBlock();
}
void addSuccessor(HBasicBlock block) {
@@ -941,22 +943,21 @@ class HInstruction implements Hashable {
abstract accept(HVisitor visitor);
- void notifyAddedToBlock(HBasicBlock block) {
+ void notifyAddedToBlock(HBasicBlock targetBlock) {
assert(!isInBasicBlock());
- assert(this.block === null);
+ assert(block === null);
// Add [this] to the inputs' uses.
for (int i = 0; i < inputs.length; i++) {
assert(inputs[i].isInBasicBlock());
inputs[i].usedBy.add(this);
}
- this.block = block;
+ block = targetBlock;
assert(isValid());
}
- void notifyRemovedFromBlock(HBasicBlock block) {
+ void notifyRemovedFromBlock() {
assert(isInBasicBlock());
assert(usedBy.isEmpty());
- assert(this.block === block);
// Remove [this] from the inputs' uses.
for (int i = 0; i < inputs.length; i++) {
« no previous file with comments | « lib/compiler/implementation/ssa/codegen.dart ('k') | lib/compiler/implementation/tree/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698