blob: d0c0e3cb2a9d19c6ec5b93aa9b121275c7784487 [file] [log] [blame]
Ben Murdoch257744e2011-11-30 15:57:28 +00001// Copyright 2011 the V8 project authors. All rights reserved.
Ben Murdochb8a8cc12014-11-26 15:28:44 +00002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
Steve Blocka7e24c12009-10-30 11:49:00 +00004
Ben Murdoch257744e2011-11-30 15:57:28 +00005#ifndef V8_UTILS_INL_H_
6#define V8_UTILS_INL_H_
Steve Blocka7e24c12009-10-30 11:49:00 +00007
Ben Murdochb8a8cc12014-11-26 15:28:44 +00008#include "src/list-inl.h"
Steve Blocka7e24c12009-10-30 11:49:00 +00009
10namespace v8 {
11namespace internal {
12
Ben Murdoch257744e2011-11-30 15:57:28 +000013template<typename T, int growth_factor, int max_growth>
14void Collector<T, growth_factor, max_growth>::Reset() {
15 for (int i = chunks_.length() - 1; i >= 0; i--) {
16 chunks_.at(i).Dispose();
17 }
18 chunks_.Rewind(0);
19 index_ = 0;
20 size_ = 0;
21}
Steve Blocka7e24c12009-10-30 11:49:00 +000022
23} } // namespace v8::internal
Ben Murdoch257744e2011-11-30 15:57:28 +000024
25#endif // V8_UTILS_INL_H_