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

Unified Diff: lib/compiler/implementation/ssa/variable_allocator.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/value_set.dart ('k') | lib/compiler/implementation/tools/mini_parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/variable_allocator.dart
diff --git a/lib/compiler/implementation/ssa/variable_allocator.dart b/lib/compiler/implementation/ssa/variable_allocator.dart
index 8844a8c63c1ecb8e061fdda21edce8139dde40b4..1f16c6ff8cf11b1aeb86734e5312b721cb32f92d 100644
--- a/lib/compiler/implementation/ssa/variable_allocator.dart
+++ b/lib/compiler/implementation/ssa/variable_allocator.dart
@@ -180,7 +180,7 @@ class LiveEnvironment {
loopMarkers.remove(header);
}
- bool isEmpty() => liveInstructions.isEmpty() && loopMarkers.isEmpty();
+ bool get isEmpty => liveInstructions.isEmpty && loopMarkers.isEmpty;
bool contains(HInstruction instruction) =>
liveInstructions.containsKey(instruction);
String toString() => liveInstructions.toString();
@@ -219,7 +219,7 @@ class SsaLiveIntervalBuilder extends HBaseVisitor {
void visitGraph(HGraph graph) {
visitPostDominatorTree(graph);
- if (!liveInstructions[graph.entry].isEmpty()) {
+ if (!liveInstructions[graph.entry].isEmpty) {
compiler.internalError('LiveIntervalBuilder',
node: compiler.currentElement.parseNode(compiler));
}
@@ -358,7 +358,7 @@ class CopyHandler {
}
String toString() => 'Copies: $copies, assignments: $assignments';
- bool isEmpty() => copies.isEmpty() && assignments.isEmpty();
+ bool get isEmpty => copies.isEmpty && assignments.isEmpty;
}
/**
@@ -458,7 +458,7 @@ class VariableNamer {
}
String allocateTemporary() {
- while (!freeTemporaryNames.isEmpty()) {
+ while (!freeTemporaryNames.isEmpty) {
String name = freeTemporaryNames.removeLast();
if (!usedNames.contains(name)) return name;
}
@@ -590,7 +590,7 @@ class SsaVariableAllocator extends HBaseVisitor {
* have no users or that are generated at use site does not need a name.
*/
bool needsName(HInstruction instruction) {
- if (instruction.usedBy.isEmpty()) return false;
+ if (instruction.usedBy.isEmpty) return false;
// TODO(ngeoffray): locals/parameters are being generated at use site,
// but we need a name for them. We should probably not make
// them generate at use site to make things simpler.
« no previous file with comments | « lib/compiler/implementation/ssa/value_set.dart ('k') | lib/compiler/implementation/tools/mini_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698