// 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_EMBEDDER_DATA_SLOT_H_ #define V8_OBJECTS_EMBEDDER_DATA_SLOT_H_ #include <utility> #include "src/common/assert-scope.h" #include "src/common/globals.h" #include "src/objects/slots.h" // Has to be the last include (doesn't have include guards): #include "src/objects/object-macros.h" namespace v8 { namespace internal { class EmbedderDataArray; class JSObject; class Object; // An EmbedderDataSlot instance describes a kEmbedderDataSlotSize field ("slot") // holding an embedder data which may contain raw aligned pointer or a tagged // pointer (smi or heap object). // Its address() is the address of the slot. // The slot's contents can be read and written using respective load_XX() and // store_XX() methods. // Storing heap object through this slot may require triggering write barriers // so this operation must be done via static store_tagged() methods. class EmbedderDataSlot : public SlotBase<EmbedderDataSlot, Address, kTaggedSize> { … }; } // namespace internal } // namespace v8 #include "src/objects/object-macros-undef.h" #endif // V8_OBJECTS_EMBEDDER_DATA_SLOT_H_