v8  8.4.371 (node 14.15.5)
V8 is Google's open source JavaScript engine
v8.h File Reference
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <memory>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
#include "cppgc/common.h"
#include "v8-internal.h"
#include "v8-version.h"
#include "v8config.h"
Include dependency graph for v8.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  Local< T >
 
class  MaybeLocal< T >
 
class  Eternal< T >
 
class  WeakCallbackInfo< T >
 
class  PersistentBase< T >
 
class  NonCopyablePersistentTraits< T >
 
struct  CopyablePersistentTraits< T >
 
class  Persistent< T, M >
 
class  Global< T >
 
struct  TracedGlobalTrait< T >
 
class  TracedReferenceBase< T >
 
class  TracedGlobal< T >
 
class  TracedReference< T >
 
class  HandleScope
 
class  EscapableHandleScope
 
class  SealHandleScope
 
class  Data
 
class  ScriptOrModule
 
class  PrimitiveArray
 
class  ScriptOriginOptions
 
class  ScriptOrigin
 
class  UnboundScript
 
class  UnboundModuleScript
 
class  Location
 
class  Module
 
class  Script
 
class  ScriptCompiler
 
struct  ScriptCompiler::CachedData
 
class  ScriptCompiler::Source
 
class  ScriptCompiler::ExternalSourceStream
 
class  ScriptCompiler::StreamedSource
 
class  ScriptCompiler::ScriptStreamingTask
 
class  Message
 
class  StackTrace
 
class  StackFrame
 
struct  RegisterState
 
struct  SampleInfo
 
struct  MemoryRange
 
struct  JSEntryStub
 
struct  UnwindState
 
struct  JSEntryStubs
 
class  JSON
 
class  ValueSerializer
 
class  ValueSerializer::Delegate
 
class  ValueDeserializer
 
class  ValueDeserializer::Delegate
 
class  Value
 
class  Primitive
 
class  Boolean
 
class  Name
 
class  String
 
class  String::ExternalStringResourceBase
 
class  String::ExternalStringResource
 
class  String::ExternalOneByteStringResource
 
class  String::Utf8Value
 
class  String::Value
 
class  Symbol
 
class  Private
 
class  Number
 
class  Integer
 
class  Int32
 
class  Uint32
 
class  BigInt
 
class  Object
 
class  Array
 
class  Map
 
class  Set
 
class  ReturnValue< T >
 
class  FunctionCallbackInfo< T >
 
class  PropertyCallbackInfo< T >
 
class  Function
 
class  Promise
 
class  Promise::Resolver
 
class  PropertyDescriptor
 
class  Proxy
 
class  MemorySpan< T >
 
struct  OwnedBuffer
 
class  CompiledWasmModule
 
class  WasmModuleObject
 
class  WasmStreaming
 
class  WasmStreaming::Client
 
class  WasmModuleObjectBuilderStreaming
 
class  BackingStore
 
class  ArrayBuffer
 
class  ArrayBuffer::Allocator
 
class  ArrayBuffer::Contents
 
class  ArrayBufferView
 
class  TypedArray
 
class  Uint8Array
 
class  Uint8ClampedArray
 
class  Int8Array
 
class  Uint16Array
 
class  Int16Array
 
class  Uint32Array
 
class  Int32Array
 
class  Float32Array
 
class  Float64Array
 
class  BigInt64Array
 
class  BigUint64Array
 
class  DataView
 
class  SharedArrayBuffer
 
class  SharedArrayBuffer::Contents
 
class  Date
 
class  NumberObject
 
class  BigIntObject
 
class  BooleanObject
 
class  StringObject
 
class  SymbolObject
 
class  RegExp
 
class  External
 
class  Template
 
class  FunctionTemplate
 
struct  NamedPropertyHandlerConfiguration
 
struct  IndexedPropertyHandlerConfiguration
 
class  ObjectTemplate
 
class  Signature
 
class  AccessorSignature
 
class  Extension
 
class  ResourceConstraints
 
class  Exception
 
class  PromiseRejectMessage
 
class  MicrotaskQueue
 
class  MicrotasksScope
 
struct  ModifyCodeGenerationFromStringsResult
 
class  SharedMemoryStatistics
 
class  HeapStatistics
 
class  HeapSpaceStatistics
 
class  HeapObjectStatistics
 
class  HeapCodeStatistics
 
struct  JitCodeEvent
 
struct  JitCodeEvent::name_t
 
struct  JitCodeEvent::line_info_t
 
struct  JitCodeEvent::wasm_source_info_t
 
class  ExternalResourceVisitor
 
class  PersistentHandleVisitor
 
class  EmbedderHeapTracer
 
class  EmbedderHeapTracer::TracedGlobalHandleVisitor
 
struct  EmbedderHeapTracer::TraceSummary
 
struct  SerializeInternalFieldsCallback
 
struct  DeserializeInternalFieldsCallback
 
class  MeasureMemoryDelegate
 
class  Isolate
 
struct  Isolate::CreateParams
 
class  Isolate::Scope
 
class  Isolate::DisallowJavascriptExecutionScope
 
class  Isolate::AllowJavascriptExecutionScope
 
class  Isolate::SuppressMicrotaskExecutionScope
 
class  Isolate::SafeForTerminationScope
 
class  Isolate::AtomicsWaitWakeHandle
 
class  StartupData
 
class  V8
 
class  SnapshotCreator
 
class  Maybe< T >
 
class  Maybe< void >
 
class  TryCatch
 
class  ExtensionConfiguration
 
class  Context
 
class  Context::Scope
 
class  Context::BackupIncumbentScope
 
class  Unlocker
 
class  Locker
 
class  Unwinder
 

Namespaces

 v8
 
 v8::internal
 
 v8::internal::wasm
 
 v8::debug
 

Macros

#define V8_PROMISE_INTERNAL_FIELD_COUNT   0
 
#define V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT   2
 
#define V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT   2
 
#define V8_INTRINSICS_LIST(F)
 
#define V8_DECL_INTRINSIC(name, iname)   k##name,
 

Typedefs

template<class T >
using Handle = Local< T >
 
template<class T >
using UniquePersistent = Global< T >
 
typedef void(* AccessorGetterCallback) (Local< String > property, const PropertyCallbackInfo< Value > &info)
 
typedef void(* AccessorNameGetterCallback) (Local< Name > property, const PropertyCallbackInfo< Value > &info)
 
typedef void(* AccessorSetterCallback) (Local< String > property, Local< Value > value, const PropertyCallbackInfo< void > &info)
 
typedef void(* AccessorNameSetterCallback) (Local< Name > property, Local< Value > value, const PropertyCallbackInfo< void > &info)
 
typedef void(* FunctionCallback) (const FunctionCallbackInfo< Value > &info)
 
using BackingStoreDeleterCallback = void(*)(void *data, size_t length, void *deleter_data)
 
typedef void(* GenericNamedPropertyGetterCallback) (Local< Name > property, const PropertyCallbackInfo< Value > &info)
 
typedef void(* GenericNamedPropertySetterCallback) (Local< Name > property, Local< Value > value, const PropertyCallbackInfo< Value > &info)
 
typedef void(* GenericNamedPropertyQueryCallback) (Local< Name > property, const PropertyCallbackInfo< Integer > &info)
 
typedef void(* GenericNamedPropertyDeleterCallback) (Local< Name > property, const PropertyCallbackInfo< Boolean > &info)
 
typedef void(* GenericNamedPropertyEnumeratorCallback) (const PropertyCallbackInfo< Array > &info)
 
typedef void(* GenericNamedPropertyDefinerCallback) (Local< Name > property, const PropertyDescriptor &desc, const PropertyCallbackInfo< Value > &info)
 
typedef void(* GenericNamedPropertyDescriptorCallback) (Local< Name > property, const PropertyCallbackInfo< Value > &info)
 
typedef void(* IndexedPropertyGetterCallback) (uint32_t index, const PropertyCallbackInfo< Value > &info)
 
typedef void(* IndexedPropertySetterCallback) (uint32_t index, Local< Value > value, const PropertyCallbackInfo< Value > &info)
 
typedef void(* IndexedPropertyQueryCallback) (uint32_t index, const PropertyCallbackInfo< Integer > &info)
 
typedef void(* IndexedPropertyDeleterCallback) (uint32_t index, const PropertyCallbackInfo< Boolean > &info)
 
typedef void(* IndexedPropertyEnumeratorCallback) (const PropertyCallbackInfo< Array > &info)
 
typedef void(* IndexedPropertyDefinerCallback) (uint32_t index, const PropertyDescriptor &desc, const PropertyCallbackInfo< Value > &info)
 
typedef void(* IndexedPropertyDescriptorCallback) (uint32_t index, const PropertyCallbackInfo< Value > &info)
 
typedef bool(* AccessCheckCallback) (Local< Context > accessing_context, Local< Object > accessed_object, Local< Value > data)
 
typedef void(* FatalErrorCallback) (const char *location, const char *message)
 
typedef void(* OOMErrorCallback) (const char *location, bool is_heap_oom)
 
typedef void(* DcheckErrorCallback) (const char *file, int line, const char *message)
 
typedef void(* MessageCallback) (Local< Message > message, Local< Value > data)
 
typedef void(* LogEventCallback) (const char *name, int event)
 
typedef int *(* CounterLookupCallback) (const char *name)
 
typedef void *(* CreateHistogramCallback) (const char *name, int min, int max, size_t buckets)
 
typedef void(* AddHistogramSampleCallback) (void *histogram, int sample)
 
typedef void(* AddCrashKeyCallback) (CrashKeyId id, const std::string &value)
 
typedef void(* BeforeCallEnteredCallback) (Isolate *)
 
typedef void(* CallCompletedCallback) (Isolate *)
 
typedef MaybeLocal< Promise >(* HostImportModuleDynamicallyCallback) (Local< Context > context, Local< ScriptOrModule > referrer, Local< String > specifier)
 
typedef void(* HostInitializeImportMetaObjectCallback) (Local< Context > context, Local< Module > module, Local< Object > meta)
 
typedef MaybeLocal< Value >(* PrepareStackTraceCallback) (Local< Context > context, Local< Value > error, Local< Array > sites)
 
typedef void(* PromiseHook) (PromiseHookType type, Local< Promise > promise, Local< Value > parent)
 
typedef void(* PromiseRejectCallback) (PromiseRejectMessage message)
 
typedef void(* MicrotasksCompletedCallback) (Isolate *)
 
typedef void(* MicrotasksCompletedCallbackWithData) (Isolate *, void *)
 
typedef void(* MicrotaskCallback) (void *data)
 
typedef void(* FailedAccessCheckCallback) (Local< Object > target, AccessType type, Local< Value > data)
 
typedef bool(* AllowCodeGenerationFromStringsCallback) (Local< Context > context, Local< String > source)
 
typedef ModifyCodeGenerationFromStringsResult(* ModifyCodeGenerationFromStringsCallback) (Local< Context > context, Local< Value > source)
 
typedef bool(* ExtensionCallback) (const FunctionCallbackInfo< Value > &)
 
typedef bool(* AllowWasmCodeGenerationCallback) (Local< Context > context, Local< String > source)
 
typedef void(* ApiImplementationCallback) (const FunctionCallbackInfo< Value > &)
 
typedef void(* WasmStreamingCallback) (const FunctionCallbackInfo< Value > &)
 
typedef bool(* WasmThreadsEnabledCallback) (Local< Context > context)
 
typedef Local< String >(* WasmLoadSourceMapCallback) (Isolate *isolate, const char *name)
 
typedef bool(* WasmSimdEnabledCallback) (Local< Context > context)
 
typedef void(* GCCallback) (GCType type, GCCallbackFlags flags)
 
typedef void(* InterruptCallback) (Isolate *isolate, void *data)
 
typedef size_t(* NearHeapLimitCallback) (void *data, size_t current_heap_limit, size_t initial_heap_limit)
 
typedef void(* JitCodeEventHandler) (const JitCodeEvent *event)
 
typedef SerializeInternalFieldsCallback SerializeEmbedderFieldsCallback
 
typedef DeserializeInternalFieldsCallback DeserializeEmbedderFieldsCallback
 
typedef bool(* EntropySource) (unsigned char *buffer, size_t length)
 
typedef uintptr_t(* ReturnAddressLocationResolver) (uintptr_t return_addr_location)
 

Enumerations

enum class  WeakCallbackType { kParameter , kInternalFields , kFinalizer }
 
enum  StateTag {
  JS , GC , PARSER , BYTECODE_COMPILER ,
  COMPILER , OTHER , EXTERNAL , ATOMICS_WAIT ,
  IDLE
}
 
enum class  NewStringType { kNormal , kInternalized }
 
enum  PropertyAttribute { None = 0 , ReadOnly = 1 << 0 , DontEnum = 1 << 1 , DontDelete = 1 << 2 }
 
enum  AccessControl { DEFAULT = 0 , ALL_CAN_READ = 1 , ALL_CAN_WRITE = 1 << 1 , PROHIBITS_OVERWRITING = 1 << 2 }
 
enum  PropertyFilter {
  ALL_PROPERTIES = 0 , ONLY_WRITABLE = 1 , ONLY_ENUMERABLE = 2 , ONLY_CONFIGURABLE = 4 ,
  SKIP_STRINGS = 8 , SKIP_SYMBOLS = 16
}
 
enum class  SideEffectType { kHasSideEffect , kHasNoSideEffect , kHasSideEffectToReceiver }
 
enum class  KeyCollectionMode { kOwnOnly , kIncludePrototypes }
 
enum class  IndexFilter { kIncludeIndices , kSkipIndices }
 
enum class  KeyConversionMode { kConvertToString , kKeepNumbers , kNoNumbers }
 
enum class  IntegrityLevel { kFrozen , kSealed }
 
enum class  ConstructorBehavior { kThrow , kAllow }
 
enum class  ArrayBufferCreationMode { kInternalized , kExternalized }
 
enum  Intrinsic
 
enum  AccessType {
  ACCESS_GET , ACCESS_SET , ACCESS_HAS , ACCESS_DELETE ,
  ACCESS_KEYS
}
 
enum class  PropertyHandlerFlags {
  kNone = 0 , kAllCanRead = 1 , kNonMasking = 1 << 1 , kOnlyInterceptStrings = 1 << 2 ,
  kHasNoSideEffect = 1 << 3
}
 
enum class  CrashKeyId {
  kIsolateAddress , kReadonlySpaceFirstPageAddress , kMapSpaceFirstPageAddress , kCodeSpaceFirstPageAddress ,
  kDumpType
}
 
enum class  PromiseHookType { kInit , kResolve , kBefore , kAfter }
 
enum  PromiseRejectEvent { kPromiseRejectWithNoHandler = 0 , kPromiseHandlerAddedAfterReject = 1 , kPromiseRejectAfterResolved = 2 , kPromiseResolveAfterResolved = 3 }
 
enum class  MicrotasksPolicy { kExplicit , kScoped , kAuto }
 
enum  GCType {
  kGCTypeScavenge = 1 << 0 , kGCTypeMarkSweepCompact = 1 << 1 , kGCTypeIncrementalMarking = 1 << 2 , kGCTypeProcessWeakCallbacks = 1 << 3 ,
  kGCTypeAll
}
 
enum  GCCallbackFlags {
  kNoGCCallbackFlags = 0 , kGCCallbackFlagConstructRetainedObjectInfos = 1 << 1 , kGCCallbackFlagForced = 1 << 2 , kGCCallbackFlagSynchronousPhantomCallbackProcessing = 1 << 3 ,
  kGCCallbackFlagCollectAllAvailableGarbage = 1 << 4 , kGCCallbackFlagCollectAllExternalMemory = 1 << 5 , kGCCallbackScheduleIdleGarbageCollection = 1 << 6
}
 
enum  RAILMode : unsigned { PERFORMANCE_RESPONSE , PERFORMANCE_ANIMATION , PERFORMANCE_IDLE , PERFORMANCE_LOAD }
 
enum  JitCodeEventOptions { kJitCodeEventDefault = 0 , kJitCodeEventEnumExisting = 1 }
 
enum class  MemoryPressureLevel { kNone , kModerate , kCritical }
 
enum class  MeasureMemoryMode { kSummary , kDetailed }
 
enum class  MeasureMemoryExecution { kDefault , kEager }
 

Functions

void V8_EXPORT RegisterExtension (std::unique_ptr< Extension >)
 
V8_INLINE Local< Primitive > Undefined (Isolate *isolate)
 
V8_INLINE Local< Primitive > Null (Isolate *isolate)
 
V8_INLINE Local< Boolean > True (Isolate *isolate)
 
V8_INLINE Local< Boolean > False (Isolate *isolate)
 
template<class T >
Maybe< T > Nothing ()
 
template<class T >
Maybe< T > Just (const T &t)
 
Maybe< void > JustVoid ()
 

Macro Definition Documentation

◆ V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT

#define V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT   2

Definition at line 4934 of file v8.h.

◆ V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT

#define V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT   2

Definition at line 5289 of file v8.h.

◆ V8_DECL_INTRINSIC

#define V8_DECL_INTRINSIC (   name,
  iname 
)    k##name,

Definition at line 5969 of file v8.h.

◆ V8_INTRINSICS_LIST

#define V8_INTRINSICS_LIST (   F)
Value:
F(ArrayProto_entries, array_entries_iterator) \
F(ArrayProto_forEach, array_for_each_iterator) \
F(ArrayProto_keys, array_keys_iterator) \
F(ArrayProto_values, array_values_iterator) \
F(ErrorPrototype, initial_error_prototype) \
F(IteratorPrototype, initial_iterator_prototype) \
F(ObjProto_valueOf, object_value_of_function)

Definition at line 5959 of file v8.h.

◆ V8_PROMISE_INTERNAL_FIELD_COUNT

#define V8_PROMISE_INTERNAL_FIELD_COUNT   0

Definition at line 4526 of file v8.h.