chromium/v8/src/objects/slots-inl.h

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

#ifndef V8_OBJECTS_SLOTS_INL_H_
#define V8_OBJECTS_SLOTS_INL_H_

#include "include/v8-internal.h"
#include "src/base/atomic-utils.h"
#include "src/common/globals.h"
#include "src/common/ptr-compr-inl.h"
#include "src/objects/compressed-slots.h"
#include "src/objects/heap-object.h"
#include "src/objects/map.h"
#include "src/objects/maybe-object.h"
#include "src/objects/objects.h"
#include "src/objects/slots.h"
#include "src/objects/tagged.h"
#include "src/sandbox/cppheap-pointer-inl.h"
#include "src/sandbox/external-pointer-inl.h"
#include "src/sandbox/indirect-pointer-inl.h"
#include "src/sandbox/isolate-inl.h"
#include "src/utils/memcopy.h"

namespace v8 {
namespace internal {

//
// FullObjectSlot implementation.
//

FullObjectSlot::FullObjectSlot(TaggedBase* object)
    :{}

bool FullObjectSlot::contains_map_value(Address raw_value) const {}

bool FullObjectSlot::Relaxed_ContainsMapValue(Address raw_value) const {}

Tagged<Object> FullObjectSlot::operator*() const {}

Tagged<Object> FullObjectSlot::load() const {}

Tagged<Object> FullObjectSlot::load(PtrComprCageBase cage_base) const {}

void FullObjectSlot::store(Tagged<Object> value) const {}

void FullObjectSlot::store_map(Tagged<Map> map) const {}

Tagged<Map> FullObjectSlot::load_map() const {}

Tagged<Object> FullObjectSlot::Acquire_Load() const {}

Tagged<Object> FullObjectSlot::Acquire_Load(PtrComprCageBase cage_base) const {}

Tagged<Object> FullObjectSlot::Relaxed_Load() const {}

Tagged<Object> FullObjectSlot::Relaxed_Load(PtrComprCageBase cage_base) const {}

Address FullObjectSlot::Relaxed_Load_Raw() const {}

// static
Tagged<Object> FullObjectSlot::RawToTagged(PtrComprCageBase cage_base,
                                           Address raw) {}

void FullObjectSlot::Relaxed_Store(Tagged<Object> value) const {}

void FullObjectSlot::Release_Store(Tagged<Object> value) const {}

Tagged<Object> FullObjectSlot::Relaxed_CompareAndSwap(
    Tagged<Object> old, Tagged<Object> target) const {}

Tagged<Object> FullObjectSlot::Release_CompareAndSwap(
    Tagged<Object> old, Tagged<Object> target) const {}

//
// FullMaybeObjectSlot implementation.
//

Tagged<MaybeObject> FullMaybeObjectSlot::operator*() const {}

Tagged<MaybeObject> FullMaybeObjectSlot::load(
    PtrComprCageBase cage_base) const {}

void FullMaybeObjectSlot::store(Tagged<MaybeObject> value) const {}

Tagged<MaybeObject> FullMaybeObjectSlot::Relaxed_Load() const {}

Tagged<MaybeObject> FullMaybeObjectSlot::Relaxed_Load(
    PtrComprCageBase cage_base) const {}

Address FullMaybeObjectSlot::Relaxed_Load_Raw() const {}

// static
Tagged<Object> FullMaybeObjectSlot::RawToTagged(PtrComprCageBase cage_base,
                                                Address raw) {}

void FullMaybeObjectSlot::Relaxed_Store(Tagged<MaybeObject> value) const {}

void FullMaybeObjectSlot::Release_CompareAndSwap(
    Tagged<MaybeObject> old, Tagged<MaybeObject> target) const {}

//
// FullHeapObjectSlot implementation.
//

Tagged<HeapObjectReference> FullHeapObjectSlot::operator*() const {}

Tagged<HeapObjectReference> FullHeapObjectSlot::load(
    PtrComprCageBase cage_base) const {}

void FullHeapObjectSlot::store(Tagged<HeapObjectReference> value) const {}

Tagged<HeapObject> FullHeapObjectSlot::ToHeapObject() const {}

void FullHeapObjectSlot::StoreHeapObject(Tagged<HeapObject> value) const {}

void ExternalPointerSlot::init(IsolateForSandbox isolate,
                               Tagged<HeapObject> host, Address value) {}

#ifdef V8_COMPRESS_POINTERS
ExternalPointerHandle ExternalPointerSlot::Relaxed_LoadHandle() const {}

void ExternalPointerSlot::Relaxed_StoreHandle(
    ExternalPointerHandle handle) const {}

void ExternalPointerSlot::Release_StoreHandle(
    ExternalPointerHandle handle) const {}
#endif  // V8_COMPRESS_POINTERS

Address ExternalPointerSlot::load(IsolateForSandbox isolate) {}

void ExternalPointerSlot::store(IsolateForSandbox isolate, Address value) {}

ExternalPointerSlot::RawContent
ExternalPointerSlot::GetAndClearContentForSerialization(
    const DisallowGarbageCollection& no_gc) {}

void ExternalPointerSlot::RestoreContentAfterSerialization(
    ExternalPointerSlot::RawContent content,
    const DisallowGarbageCollection& no_gc) {}

void ExternalPointerSlot::ReplaceContentWithIndexForSerialization(
    const DisallowGarbageCollection& no_gc, uint32_t index) {}

uint32_t ExternalPointerSlot::GetContentAsIndexAfterDeserialization(
    const DisallowGarbageCollection& no_gc) {}

#ifdef V8_COMPRESS_POINTERS
CppHeapPointerHandle CppHeapPointerSlot::Relaxed_LoadHandle() const {}

void CppHeapPointerSlot::Relaxed_StoreHandle(
    CppHeapPointerHandle handle) const {}

void CppHeapPointerSlot::Release_StoreHandle(
    CppHeapPointerHandle handle) const {}
#endif  // V8_COMPRESS_POINTERS

Address CppHeapPointerSlot::try_load(IsolateForPointerCompression isolate,
                                     CppHeapPointerTagRange tag_range) const {}

void CppHeapPointerSlot::store(IsolateForPointerCompression isolate,
                               Address value, CppHeapPointerTag tag) const {}

void CppHeapPointerSlot::init() const {}

Tagged<Object> IndirectPointerSlot::load(IsolateForSandbox isolate) const {}

void IndirectPointerSlot::store(Tagged<ExposedTrustedObject> value) const {}

Tagged<Object> IndirectPointerSlot::Relaxed_Load(
    IsolateForSandbox isolate) const {}

Tagged<Object> IndirectPointerSlot::Acquire_Load(
    IsolateForSandbox isolate) const {}

void IndirectPointerSlot::Relaxed_Store(
    Tagged<ExposedTrustedObject> value) const {}

void IndirectPointerSlot::Release_Store(
    Tagged<ExposedTrustedObject> value) const {}

IndirectPointerHandle IndirectPointerSlot::Relaxed_LoadHandle() const {}

IndirectPointerHandle IndirectPointerSlot::Acquire_LoadHandle() const {}

void IndirectPointerSlot::Relaxed_StoreHandle(
    IndirectPointerHandle handle) const {}

void IndirectPointerSlot::Release_StoreHandle(
    IndirectPointerHandle handle) const {}

bool IndirectPointerSlot::IsEmpty() const {}

Tagged<Object> IndirectPointerSlot::ResolveHandle(
    IndirectPointerHandle handle, IsolateForSandbox isolate) const {}

#ifdef V8_ENABLE_SANDBOX
Tagged<Object> IndirectPointerSlot::ResolveTrustedPointerHandle(
    IndirectPointerHandle handle, IsolateForSandbox isolate) const {}

Tagged<Object> IndirectPointerSlot::ResolveCodePointerHandle(
    IndirectPointerHandle handle) const {}
#endif  // V8_ENABLE_SANDBOX

template <typename SlotT>
void WriteProtectedSlot<SlotT>::Relaxed_Store(TObject value) const {}

//
// Utils.
//

// Copies tagged words from |src| to |dst|. The data spans must not overlap.
// |src| and |dst| must be kTaggedSize-aligned.
inline void CopyTagged(Address dst, const Address src, size_t num_tagged) {}

// Sets |counter| number of kTaggedSize-sized values starting at |start| slot.
inline void MemsetTagged(Tagged_t* start, Tagged<Object> value,
                         size_t counter) {}

// Sets |counter| number of kTaggedSize-sized values starting at |start| slot.
template <typename T>
inline void MemsetTagged(SlotBase<T, Tagged_t> start, Tagged<Object> value,
                         size_t counter) {}

// Sets |counter| number of kSystemPointerSize-sized values starting at |start|
// slot.
inline void MemsetPointer(FullObjectSlot start, Tagged<Object> value,
                          size_t counter) {}

}  // namespace internal
}  // namespace v8

#endif  // V8_OBJECTS_SLOTS_INL_H_