v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::NativeContext Class Reference

#include <contexts.h>

Inheritance diagram for v8::internal::NativeContext:
Collaboration diagram for v8::internal::NativeContext:

Classes

class  BodyDescriptor
 

Public Member Functions

void set (int index, Tagged< Object > value, WriteBarrierMode mode)=delete
 
V8_INLINE void set (int index, Tagged< Object > value, WriteBarrierMode mode, ReleaseStoreTag)
 
void synchronized_set_script_context_table (Tagged< ScriptContextTable > script_context_table)
 
Tagged< ScriptContextTablesynchronized_script_context_table () const
 
Tagged< JSGlobalObjectglobal_object ()
 
Tagged< JSGlobalObjectglobal_object (AcquireLoadTag)
 
Tagged< MapTypedArrayElementsKindToCtorMap (ElementsKind element_kind) const
 
Tagged< MapTypedArrayElementsKindToRabGsabCtorMap (ElementsKind element_kind) const
 
bool HasTemplateLiteralObject (Tagged< JSArray > array)
 
 DEFINE_FIELD_OFFSET_CONSTANTS (Context::kExtendedHeaderSize, NATIVE_CONTEXT_FIELDS_DEF) class BodyDescriptor
 
void ResetErrorsThrown ()
 
void IncrementErrorsThrown ()
 
int GetErrorsThrown ()
 
- Public Member Functions inherited from v8::internal::Context
V8_INLINE Tagged< Objectget (int index) const
 
V8_INLINE Tagged< Objectget (PtrComprCageBase cage_base, int index) const
 
V8_INLINE void set (int index, Tagged< Object > value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
 
V8_INLINE Tagged< Objectget (int index, AcquireLoadTag) const
 
V8_INLINE Tagged< Objectget (PtrComprCageBase cage_base, int index, AcquireLoadTag) const
 
V8_INLINE void set (int index, Tagged< Object > value, WriteBarrierMode mode, ReleaseStoreTag)
 
void Initialize (Isolate *isolate)
 
Tagged< Objectunchecked_previous () const
 
Tagged< Contextprevious () const
 
Tagged< Objectnext_context_link () const
 
bool has_extension () const
 
Tagged< HeapObjectextension () const
 
V8_EXPORT_PRIVATE void set_extension (Tagged< HeapObject > object, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
 
Tagged< JSObjectextension_object () const
 
Tagged< JSReceiverextension_receiver () const
 
Tagged< SourceTextModulemodule () const
 
Tagged< Contextdeclaration_context () const
 
bool is_declaration_context () const
 
Tagged< Contextclosure_context () const
 
V8_EXPORT_PRIVATE Tagged< JSGlobalProxyglobal_proxy () const
 
V8_EXPORT_PRIVATE Tagged< JSGlobalObjectglobal_object () const
 
Tagged< Contextscript_context () const
 
Tagged< NativeContextnative_context () const
 
bool IsDetached () const
 
bool IsFunctionContext () const
 
bool IsCatchContext () const
 
bool IsWithContext () const
 
bool IsDebugEvaluateContext () const
 
bool IsAwaitContext () const
 
bool IsBlockContext () const
 
bool IsModuleContext () const
 
bool IsEvalContext () const
 
bool IsScriptContext () const
 
bool HasSameSecurityTokenAs (Tagged< Context > that) const
 
Handle< ObjectErrorMessageForCodeGenerationFromStrings ()
 
DirectHandle< ObjectErrorMessageForWasmCodeGeneration ()
 
Tagged< MapGetInitialJSArrayMap (ElementsKind kind) const
 
std::optional< ContextSidePropertyCell::PropertyGetScriptContextSideProperty (size_t index) const
 

Private Member Functions

 OBJECT_CONSTRUCTORS (NativeContext, Context)
 

Additional Inherited Members

- Public Types inherited from v8::internal::Context
enum  Field {
  SCOPE_INFO_INDEX , PREVIOUS_INDEX , EXTENSION_INDEX , NEXT_CONTEXT_LINK ,
  NATIVE_CONTEXT_SLOTS , FIRST_WEAK_SLOT = NEXT_CONTEXT_LINK , FIRST_JS_ARRAY_MAP_SLOT = JS_ARRAY_PACKED_SMI_ELEMENTS_MAP_INDEX , MIN_CONTEXT_SLOTS = EXTENSION_INDEX ,
  MIN_CONTEXT_EXTENDED_SLOTS = EXTENSION_INDEX + 1 , THROWN_OBJECT_INDEX = MIN_CONTEXT_SLOTS , WRAPPED_CONTEXT_INDEX = MIN_CONTEXT_EXTENDED_SLOTS , CONTEXT_SIDE_TABLE_PROPERTY_INDEX = MIN_CONTEXT_SLOTS
}
 
- Static Public Member Functions inherited from v8::internal::Context
static V8_INLINE constexpr int SizeFor (int length)
 
static V8_INLINE constexpr int OffsetOfElementAt (int index)
 
static V8_INLINE constexpr int SlotOffset (int index)
 
static Handle< ObjectLookup (Handle< Context > context, Handle< String > name, ContextLookupFlags flags, int *index, PropertyAttributes *attributes, InitializationFlag *init_flag, VariableMode *variable_mode, bool *is_sloppy_function_name=nullptr)
 
static int FunctionMapIndex (LanguageMode language_mode, FunctionKind kind, bool has_shared_name)
 
static int ArrayMapIndex (ElementsKind elements_kind)
 
static Tagged< ContextSidePropertyCellGetOrCreateContextSidePropertyCell (DirectHandle< Context > context, size_t index, ContextSidePropertyCell::Property property, Isolate *isolate)
 
static DirectHandle< ObjectLoadScriptContextElement (DirectHandle< Context > script_context, int index, DirectHandle< Object > new_value, Isolate *isolate)
 
static void StoreScriptContextAndUpdateSlotProperty (DirectHandle< Context > script_context, int index, DirectHandle< Object > new_value, Isolate *isolate)
 
- Static Public Attributes inherited from v8::internal::Context
static const int kScopeInfoOffset = kElementsOffset
 
static const int kPreviousOffset = kScopeInfoOffset + kTaggedSize
 
static const int kTodoHeaderSize = kPreviousOffset + kTaggedSize
 
static const int kExtensionOffset = kTodoHeaderSize
 
static const int kExtensionSize
 
static const int kExtendedHeaderSize = kTodoHeaderSize + kExtensionSize
 
static const int FIRST_FUNCTION_MAP_INDEX = SLOPPY_FUNCTION_MAP_INDEX
 
static const int LAST_FUNCTION_MAP_INDEX = CLASS_FUNCTION_MAP_INDEX
 
static const int FIRST_FIXED_TYPED_ARRAY_FUN_INDEX = UINT8_ARRAY_FUN_INDEX
 
static const int FIRST_RAB_GSAB_TYPED_ARRAY_MAP_INDEX
 
static const int kNoContext = 0
 
static const int kInvalidContext = 1
 
static const int kNotFound = -1
 

Detailed Description

Definition at line 724 of file contexts.h.

Member Function Documentation

◆ DEFINE_FIELD_OFFSET_CONSTANTS()

v8::internal::NativeContext::DEFINE_FIELD_OFFSET_CONSTANTS ( Context::kExtendedHeaderSize ,
NATIVE_CONTEXT_FIELDS_DEF  )

◆ GetErrorsThrown()

int v8::internal::NativeContext::GetErrorsThrown ( )

Definition at line 861 of file contexts.cc.

◆ global_object() [1/2]

Tagged< JSGlobalObject > v8::internal::NativeContext::global_object ( )
inline

Definition at line 750 of file contexts.h.

Here is the call graph for this function:

◆ global_object() [2/2]

Tagged< JSGlobalObject > v8::internal::NativeContext::global_object ( AcquireLoadTag )
inline

Definition at line 751 of file contexts.h.

Here is the call graph for this function:

◆ HasTemplateLiteralObject()

bool v8::internal::NativeContext::HasTemplateLiteralObject ( Tagged< JSArray > array)

Definition at line 778 of file contexts.cc.

◆ IncrementErrorsThrown()

void v8::internal::NativeContext::IncrementErrorsThrown ( )

Definition at line 856 of file contexts.cc.

Here is the call graph for this function:

◆ OBJECT_CONSTRUCTORS()

v8::internal::NativeContext::OBJECT_CONSTRUCTORS ( NativeContext ,
Context  )
private

◆ ResetErrorsThrown()

void v8::internal::NativeContext::ResetErrorsThrown ( )

Definition at line 854 of file contexts.cc.

Here is the call graph for this function:

◆ set() [1/2]

void v8::internal::NativeContext::set ( int index,
Tagged< Object > value,
WriteBarrierMode mode )
delete
Here is the caller graph for this function:

◆ set() [2/2]

void v8::internal::NativeContext::set ( int index,
Tagged< Object > value,
WriteBarrierMode mode,
ReleaseStoreTag tag )

Definition at line 105 of file contexts-inl.h.

Here is the call graph for this function:

◆ synchronized_script_context_table()

Tagged< ScriptContextTable > v8::internal::NativeContext::synchronized_script_context_table ( ) const
inline

Definition at line 279 of file contexts-inl.h.

Here is the call graph for this function:

◆ synchronized_set_script_context_table()

void v8::internal::NativeContext::synchronized_set_script_context_table ( Tagged< ScriptContextTable > script_context_table)
inline

◆ TypedArrayElementsKindToCtorMap()

Tagged< Map > v8::internal::NativeContext::TypedArrayElementsKindToCtorMap ( ElementsKind element_kind) const
inline

Definition at line 285 of file contexts-inl.h.

Here is the call graph for this function:

◆ TypedArrayElementsKindToRabGsabCtorMap()

Tagged< Map > v8::internal::NativeContext::TypedArrayElementsKindToRabGsabCtorMap ( ElementsKind element_kind) const
inline

Definition at line 295 of file contexts-inl.h.

Here is the call graph for this function:

The documentation for this class was generated from the following files: