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

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

Issue 11238035: Make isEmpty a getter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file with co19 issue number. Created 8 years, 2 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_helpers.dart ('k') | lib/compiler/implementation/ssa/optimize.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 5ba15e5b44885e396e7e381fcd39f66262f2fce0..af2d006a4e2c534a871ce234989b0a3f0411be8e 100644
--- a/lib/compiler/implementation/ssa/nodes.dart
+++ b/lib/compiler/implementation/ssa/nodes.dart
@@ -365,13 +365,13 @@ class HInstructionList {
HInstruction first = null;
HInstruction last = null;
- bool isEmpty() {
+ bool get isEmpty {
return first == null;
}
void addAfter(HInstruction cursor, HInstruction instruction) {
if (cursor == null) {
- assert(isEmpty());
+ assert(isEmpty);
first = last = instruction;
} else if (identical(cursor, last)) {
last.next = instruction;
@@ -387,7 +387,7 @@ class HInstructionList {
void addBefore(HInstruction cursor, HInstruction instruction) {
if (cursor == null) {
- assert(isEmpty());
+ assert(isEmpty);
first = last = instruction;
} else if (identical(cursor, first)) {
first.previous = instruction;
@@ -419,7 +419,7 @@ class HInstructionList {
}
void remove(HInstruction instruction) {
- assert(instruction.usedBy.isEmpty());
+ assert(instruction.usedBy.isEmpty);
detach(instruction);
}
@@ -488,7 +488,7 @@ class HBasicBlock extends HInstructionList {
return parentLoopHeader;
}
- bool hasBailoutTargets() => !bailoutTargets.isEmpty();
+ bool hasBailoutTargets() => !bailoutTargets.isEmpty;
void open() {
assert(isNew());
@@ -581,7 +581,7 @@ class HBasicBlock extends HInstructionList {
}
void addSuccessor(HBasicBlock block) {
- if (successors.isEmpty()) {
+ if (successors.isEmpty) {
successors = [block];
} else {
successors.add(block);
@@ -623,7 +623,7 @@ class HBasicBlock extends HInstructionList {
}
}
- if (better.isEmpty()) return rewrite(from, to);
+ if (better.isEmpty) return rewrite(from, to);
L1: for (HInstruction user in from.usedBy) {
for (HCheck check in better) {
@@ -985,7 +985,7 @@ abstract class HInstruction implements Spannable {
void notifyRemovedFromBlock() {
assert(isInBasicBlock());
- assert(usedBy.isEmpty());
+ assert(usedBy.isEmpty);
// Remove [this] from the inputs' uses.
for (int i = 0; i < inputs.length; i++) {
@@ -2974,7 +2974,7 @@ class HSwitchBlockInformation implements HStatementInformation {
HBasicBlock get start => expression.start;
HBasicBlock get end {
// We don't create a switch block if there are no cases.
- assert(!statements.isEmpty());
+ assert(!statements.isEmpty);
return statements.last().end;
}
« no previous file with comments | « lib/compiler/implementation/ssa/codegen_helpers.dart ('k') | lib/compiler/implementation/ssa/optimize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698