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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 10790086: Minor cleanups: use GrowableArray::is_empty instead of ::length() == 0 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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 | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler.cc
===================================================================
--- runtime/vm/flow_graph_compiler.cc (revision 9778)
+++ runtime/vm/flow_graph_compiler.cc (working copy)
@@ -511,7 +511,7 @@
Register FrameRegisterAllocator::SpillFirst() {
- ASSERT(stack_.length() > 0);
+ ASSERT(!stack_.is_empty());
Register reg = stack_[0];
stack_.RemoveFirst();
compiler()->assembler()->PushRegister(reg);
@@ -589,7 +589,7 @@
reg = loc.reg();
} else if (loc.IsUnallocated()) {
ASSERT(loc.policy() == Location::kRequiresRegister);
- if ((stack_.length() > 0) && !blocked_temp_registers[stack_.Last()]) {
+ if (!stack_.is_empty() && !blocked_temp_registers[stack_.Last()]) {
reg = stack_.Last();
blocked_registers[reg] = true;
} else {
@@ -642,7 +642,7 @@
void FrameRegisterAllocator::Pop(Register dst, Value* val) {
if (is_ssa_) return;
- if (stack_.length() > 0) {
+ if (!stack_.is_empty()) {
ASSERT(keep_values_in_registers_);
Register src = stack_.Last();
ASSERT(val->AsUse()->definition() == registers_[src]);
« no previous file with comments | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698