summaryrefslogtreecommitdiff
path: root/compiler/optimizing/parallel_move_test.cc
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2015-09-28 12:17:40 +0100
committerVladimir Marko <vmarko@google.com>2015-09-29 10:49:35 +0100
commit225b6464a58ebe11c156144653f11a1c6607f4eb (patch)
tree3f1c6067c3841c892edaa1a60a61af9c559cb4e4 /compiler/optimizing/parallel_move_test.cc
parent6a9984e62c08bcd78c8e49dd40b1f0f9d53513b7 (diff)
Optimizing: Tag arena allocations in code generators.
And completely remove the deprecated GrowableArray. Replace GrowableArray with ArenaVector in code generators and related classes and tag arena allocations. Label arrays use direct allocations from ArenaAllocator because Label is non-copyable and non-movable and as such cannot be really held in a container. The GrowableArray never actually constructed them, instead relying on the zero-initialized storage from the arena allocator to be correct. We now actually construct the labels. Also avoid StackMapStream::ComputeDexRegisterMapSize() being passed null references, even though unused. Change-Id: I26a46fdd406b23a3969300a67739d55528df8bf4
Diffstat (limited to 'compiler/optimizing/parallel_move_test.cc')
-rw-r--r--compiler/optimizing/parallel_move_test.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/compiler/optimizing/parallel_move_test.cc b/compiler/optimizing/parallel_move_test.cc
index f8f70105cf..da91cb811d 100644
--- a/compiler/optimizing/parallel_move_test.cc
+++ b/compiler/optimizing/parallel_move_test.cc
@@ -56,7 +56,8 @@ class TestParallelMoveResolverWithSwap : public ParallelMoveResolverWithSwap {
: ParallelMoveResolverWithSwap(allocator) {}
void EmitMove(size_t index) OVERRIDE {
- MoveOperands* move = moves_.Get(index);
+ DCHECK_LT(index, moves_.size());
+ MoveOperands* move = moves_[index];
if (!message_.str().empty()) {
message_ << " ";
}
@@ -68,7 +69,8 @@ class TestParallelMoveResolverWithSwap : public ParallelMoveResolverWithSwap {
}
void EmitSwap(size_t index) OVERRIDE {
- MoveOperands* move = moves_.Get(index);
+ DCHECK_LT(index, moves_.size());
+ MoveOperands* move = moves_[index];
if (!message_.str().empty()) {
message_ << " ";
}
@@ -127,7 +129,8 @@ class TestParallelMoveResolverNoSwap : public ParallelMoveResolverNoSwap {
void FreeScratchLocation(Location loc ATTRIBUTE_UNUSED) OVERRIDE {}
void EmitMove(size_t index) OVERRIDE {
- MoveOperands* move = moves_.Get(index);
+ DCHECK_LT(index, moves_.size());
+ MoveOperands* move = moves_[index];
if (!message_.str().empty()) {
message_ << " ";
}