v8/src/detachable-vector.cc
tzik e861dbbcf1 Make DetachableVector accessible from builtins
This CL updates DetachableVector to store the data at a known place
instead of in an std::vector<>, so that builtins can update it directly.

Bug: v8:8124
Change-Id: Iba5fb2e9d4e0ddc689d0f7eeaea40bc3218edf3a
Reviewed-on: https://chromium-review.googlesource.com/c/1297783
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57452}
2018-11-13 01:30:16 +00:00

20 lines
627 B
C++

// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/detachable-vector.h"
namespace v8 {
namespace internal {
const size_t DetachableVectorBase::kMinimumCapacity = 8;
const size_t DetachableVectorBase::kDataOffset =
offsetof(DetachableVectorBase, data_);
const size_t DetachableVectorBase::kCapacityOffset =
offsetof(DetachableVectorBase, capacity_);
const size_t DetachableVectorBase::kSizeOffset =
offsetof(DetachableVectorBase, size_);
} // namespace internal
} // namespace v8