summaryrefslogtreecommitdiff
path: root/compiler/utils/growable_array.h
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-01-26 15:18:36 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2015-01-26 16:02:35 +0000
commit827eedbfa882496407375f22b08243a38a5bd53b (patch)
treeaa4ff781982ffd2f8a95d9a6cdeb1aa28a1f671a /compiler/utils/growable_array.h
parentf90eec005997f98c1a9f874fbbf68414e5f9c766 (diff)
Move code around and address growable_array comment.
- Move SideEffectsAnalysis to its own file. - Move most of gvn.h to gvn.cc. - Don't call Resize in GrowableArray constructor, but just set num_used directly. Change-Id: I1f1291207945d678d3c99cc0ec1ec155bcae82f6
Diffstat (limited to 'compiler/utils/growable_array.h')
-rw-r--r--compiler/utils/growable_array.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/utils/growable_array.h b/compiler/utils/growable_array.h
index b84842910b..6af4853e09 100644
--- a/compiler/utils/growable_array.h
+++ b/compiler/utils/growable_array.h
@@ -40,8 +40,7 @@ class GrowableArray : public ArenaObject<kArenaAllocGrowableArray> {
GrowableArray(ArenaAllocator* arena, size_t init_length, T initial_data)
: arena_(arena),
num_allocated_(init_length),
- num_used_(0) {
- SetSize(init_length);
+ num_used_(init_length) {
elem_list_ = static_cast<T*>(arena_->Alloc(sizeof(T) * init_length,
kArenaAllocGrowableArray));
for (size_t i = 0; i < init_length; ++i) {