v8  7.0.276(node11.14.0)
V8 is Google's open source JavaScript engine
v8.h File Reference
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <memory>
#include <utility>
#include <vector>
#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  Maybe< T >
 
class  Local< T >
 
class  MaybeLocal< T >
 
class  Eternal< T >
 
class  NonCopyablePersistentTraits< T >
 
class  PersistentBase< T >
 
class  Persistent< T, M >
 
class  Global< T >
 
class  PersistentValueMap< K, V, Traits >
 
class  PersistentValueMapBase< K, V, Traits >
 
class  GlobalValueMap< K, V, Traits >
 
class  PersistentValueVector< V, Traits >
 
class  WeakCallbackObject< T, P >
 
class  FunctionCallbackInfo< T >
 
class  PropertyCallbackInfo< T >
 
class  ReturnValue< T >
 
class  CustomArguments< T >
 
struct  SmiTagging< tagged_ptr_size >
 
struct  SmiTagging< 4 >
 
struct  SmiTagging< 8 >
 
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 >
 
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
 
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  WasmCompiledModule
 
struct  WasmCompiledModule::BufferReference
 
class  WasmCompiledModule::TransferrableModule
 
class  WasmStreaming
 
class  WasmModuleObjectBuilderStreaming
 
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
 
struct  JitCodeEvent::name_t
 
struct  JitCodeEvent::line_info_t
 
struct  EmbedderHeapTracer::AdvanceTracingActions
 
struct  Isolate::CreateParams
 
class  Isolate::Scope
 
class  Isolate::DisallowJavascriptExecutionScope
 
class  Isolate::AllowJavascriptExecutionScope
 
class  Isolate::SuppressMicrotaskExecutionScope
 
class  Isolate::SafeForTerminationScope
 
class  Isolate::AtomicsWaitWakeHandle
 
class  Maybe< T >
 
class  Context::Scope
 
class  Context::BackupIncumbentScope
 
class  Internals
 
struct  CastCheck< PerformCheck >
 

Namespaces

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

Macros

#define V8_EXPORT
 
#define TYPE_CHECK(T, S)
 
#define V8_PROMISE_INTERNAL_FIELD_COUNT   0
 
#define COMMA   ,
 
#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

typedef SmiTagging< kApiPointerSize > PlatformSmiTagging
 
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)
 
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)
 

Enumerations

enum  WeakCallbackType { kParameter, kInternalFields, kFinalizer }
 
enum  StateTag {
  JS, GC, PARSER, BYTECODE_COMPILER,
  COMPILER, OTHER, EXTERNAL, IDLE
}
 
enum  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  SideEffectType { kHasSideEffect, kHasNoSideEffect }
 
enum  KeyCollectionMode { kOwnOnly, kIncludePrototypes }
 
enum  IndexFilter { kIncludeIndices, kSkipIndices }
 
enum  KeyConversionMode { kConvertToString, kKeepNumbers }
 
enum  IntegrityLevel { kFrozen, kSealed }
 
enum  ConstructorBehavior { kThrow, kAllow }
 
enum  ArrayBufferCreationMode { kInternalized, kExternalized }
 
enum  Intrinsic
 
enum  AccessType {
  ACCESS_GET, ACCESS_SET, ACCESS_HAS, ACCESS_DELETE,
  ACCESS_KEYS
}
 
enum  PropertyHandlerFlags {
  kNone = 0, kAllCanRead = 1, kNonMasking = 1 << 1, kOnlyInterceptStrings = 1 << 2,
  kHasNoSideEffect = 1 << 3
}
 

Functions

template<int kSmiShiftSize>
V8_INLINE internal::Object * IntToSmi (int value)
 
constexpr bool SmiValuesAre31Bits ()
 
constexpr bool SmiValuesAre32Bits ()
 
V8_EXPORT length_ (0)
 
 ExternalOneByteStringResourceImpl (const char *data, size_t length)
 
const char * data () const
 
size_t length () const
 
template<class T >
V8_INLINE void PerformCastCheck (T *data)
 

Variables

const int kApiPointerSize = sizeof(void*)
 
const int kApiDoubleSize = sizeof(double)
 
const int kApiIntSize = sizeof(int)
 
const int kApiInt64Size = sizeof(int64_t)
 
const int kHeapObjectTag = 1
 
const int kWeakHeapObjectTag = 3
 
const int kHeapObjectTagSize = 2
 
const intptr_t kHeapObjectTagMask = (1 << kHeapObjectTagSize) - 1
 
const int kSmiTag = 0
 
const int kSmiTagSize = 1
 
const intptr_t kSmiTagMask = (1 << kSmiTagSize) - 1
 
const int kSmiShiftSize = PlatformSmiTagging::kSmiShiftSize
 
const int kSmiValueSize = PlatformSmiTagging::kSmiValueSize
 
const int kSmiMinValue = (static_cast<unsigned int>(-1)) << (kSmiValueSize - 1)
 
const int kSmiMaxValue = -(kSmiMinValue + 1)
 
V8_EXPORT ExternalOneByteStringResourceImpl
 

Macro Definition Documentation

◆ COMMA

#define COMMA   ,

Definition at line 4327 of file v8.h.

◆ TYPE_CHECK

#define TYPE_CHECK (   T,
 
)
Value:
while (false) { \
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
}

Definition at line 266 of file v8.h.

◆ V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT

#define V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT   2

Definition at line 4530 of file v8.h.

◆ V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT

#define V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT   2

Definition at line 4726 of file v8.h.

◆ V8_DECL_INTRINSIC

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

Definition at line 5319 of file v8.h.

◆ V8_EXPORT

#define V8_EXPORT

Definition at line 56 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)

Definition at line 5310 of file v8.h.

◆ V8_PROMISE_INTERNAL_FIELD_COUNT

#define V8_PROMISE_INTERNAL_FIELD_COUNT   0

Definition at line 4140 of file v8.h.