chromium/v8/src/heap/cppgc/object-view.h

// Copyright 2021 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.

#ifndef V8_HEAP_CPPGC_OBJECT_VIEW_H_
#define V8_HEAP_CPPGC_OBJECT_VIEW_H_

#include "include/v8config.h"
#include "src/heap/cppgc/globals.h"
#include "src/heap/cppgc/heap-object-header.h"
#include "src/heap/cppgc/heap-page.h"

namespace cppgc {
namespace internal {

// ObjectView allows accessing a header within the bounds of the actual object.
// It is not exposed externally and does not keep the underlying object alive.
template <AccessMode = AccessMode::kNonAtomic>
class ObjectView final {};

template <AccessMode access_mode>
ObjectView<access_mode>::ObjectView(const HeapObjectHeader& header)
    :{}

template <AccessMode access_mode>
Address ObjectView<access_mode>::Start() const {}

template <AccessMode access_mode>
ConstAddress ObjectView<access_mode>::End() const {}

template <AccessMode access_mode>
size_t ObjectView<access_mode>::Size() const {}

}  // namespace internal
}  // namespace cppgc

#endif  // V8_HEAP_CPPGC_OBJECT_VIEW_H_