V8 Project
v8.h File Reference
#include "v8stdint.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.

Classes

class  v8::UniqueId
 General purpose unique identifier. More...
 
class  v8::Handle< T >
 An object reference managed by the v8 garbage collector. More...
 
class  v8::Local< T >
 A light-weight stack-allocated object handle. More...
 
class  v8::Eternal< T >
 
class  v8::WeakCallbackData< T, P >
 
class  v8::PersistentBase< T >
 An object reference that is independent of any handle scope. More...
 
class  v8::NonCopyablePersistentTraits< T >
 Default traits for Persistent. More...
 
struct  v8::CopyablePersistentTraits< T >
 Helper class traits to allow copying and assignment of Persistent. More...
 
class  v8::Persistent< T, M >
 A PersistentBase which allows copy and assignment. More...
 
class  v8::UniquePersistent< T >
 A PersistentBase which has move semantics. More...
 
struct  v8::UniquePersistent< T >::RValue
 
class  v8::HandleScope
 A stack-allocated class that governs a number of local handles. More...
 
class  v8::EscapableHandleScope
 A HandleScope which first allocates a handle in the current scope which will be later filled with the escape value. More...
 
struct  v8::Maybe< T >
 A simple Maybe type, representing an object which may or may not have a value. More...
 
class  v8::Data
 The superclass of values and API object templates. More...
 
class  v8::ScriptOrigin
 The origin, within a file, of a script. More...
 
class  v8::UnboundScript
 A compiled JavaScript script, not yet tied to a Context. More...
 
class  v8::Script
 A compiled JavaScript script, tied to a Context which was active when the script was compiled. More...
 
class  v8::ScriptCompiler
 For compiling scripts. More...
 
struct  v8::ScriptCompiler::CachedData
 Compilation data that the embedder can cache and pass back to speed up future compilations. More...
 
class  v8::ScriptCompiler::Source
 Source code which can be then compiled to a UnboundScript or Script. More...
 
class  v8::ScriptCompiler::ExternalSourceStream
 For streaming incomplete script data to V8. More...
 
class  v8::ScriptCompiler::StreamedSource
 Source code which can be streamed into V8 in pieces. More...
 
class  v8::ScriptCompiler::ScriptStreamingTask
 A streaming task which the embedder must run on a background thread to stream scripts into V8. More...
 
class  v8::Message
 An error message. More...
 
class  v8::StackTrace
 Representation of a JavaScript stack trace. More...
 
class  v8::StackFrame
 A single JavaScript stack frame. More...
 
class  v8::JSON
 A JSON Parser. More...
 
class  v8::Value
 The superclass of all JavaScript values and objects. More...
 
class  v8::Primitive
 The superclass of primitive values. More...
 
class  v8::Boolean
 A primitive boolean value (ECMA-262, 4.3.14). More...
 
class  v8::Name
 A superclass for symbols and strings. More...
 
class  v8::String
 A JavaScript string value (ECMA-262, 4.3.17). More...
 
class  v8::String::ExternalStringResourceBase
 
class  v8::String::ExternalStringResource
 An ExternalStringResource is a wrapper around a two-byte string buffer that resides outside V8's heap. More...
 
class  v8::String::ExternalOneByteStringResource
 An ExternalOneByteStringResource is a wrapper around an one-byte string buffer that resides outside V8's heap. More...
 
class  v8::String::Utf8Value
 Converts an object to a UTF-8-encoded character array. More...
 
class  v8::String::Value
 Converts an object to a two-byte string. More...
 
class  v8::Symbol
 A JavaScript symbol (ECMA-262 edition 6) More...
 
class  v8::Private
 A private symbol. More...
 
class  v8::Number
 A JavaScript number value (ECMA-262, 4.3.20) More...
 
class  v8::Integer
 A JavaScript value representing a signed integer. More...
 
class  v8::Int32
 A JavaScript value representing a 32-bit signed integer. More...
 
class  v8::Uint32
 A JavaScript value representing a 32-bit unsigned integer. More...
 
class  v8::Object
 A JavaScript object (ECMA-262, 4.3.3) More...
 
class  v8::Array
 An instance of the built-in array constructor (ECMA-262, 15.4.2). More...
 
class  v8::ReturnValue< T >
 
class  v8::FunctionCallbackInfo< T >
 The argument information given to function call callbacks. More...
 
class  v8::PropertyCallbackInfo< T >
 The information passed to a property callback about the context of the property access. More...
 
class  v8::Function
 A JavaScript function object (ECMA-262, 15.3). More...
 
class  v8::Promise
 An instance of the built-in Promise constructor (ES6 draft). More...
 
class  v8::Promise::Resolver
 
class  v8::ArrayBuffer
 An instance of the built-in ArrayBuffer constructor (ES6 draft 15.13.5). More...
 
class  v8::ArrayBuffer::Allocator
 Allocator that V8 uses to allocate |ArrayBuffer|'s memory. More...
 
class  v8::ArrayBuffer::Contents
 The contents of an |ArrayBuffer|. More...
 
class  v8::ArrayBufferView
 A base class for an instance of one of "views" over ArrayBuffer, including TypedArrays and DataView (ES6 draft 15.13). More...
 
class  v8::TypedArray
 A base class for an instance of TypedArray series of constructors (ES6 draft 15.13.6). More...
 
class  v8::Uint8Array
 An instance of Uint8Array constructor (ES6 draft 15.13.6). More...
 
class  v8::Uint8ClampedArray
 An instance of Uint8ClampedArray constructor (ES6 draft 15.13.6). More...
 
class  v8::Int8Array
 An instance of Int8Array constructor (ES6 draft 15.13.6). More...
 
class  v8::Uint16Array
 An instance of Uint16Array constructor (ES6 draft 15.13.6). More...
 
class  v8::Int16Array
 An instance of Int16Array constructor (ES6 draft 15.13.6). More...
 
class  v8::Uint32Array
 An instance of Uint32Array constructor (ES6 draft 15.13.6). More...
 
class  v8::Int32Array
 An instance of Int32Array constructor (ES6 draft 15.13.6). More...
 
class  v8::Float32Array
 An instance of Float32Array constructor (ES6 draft 15.13.6). More...
 
class  v8::Float64Array
 An instance of Float64Array constructor (ES6 draft 15.13.6). More...
 
class  v8::DataView
 An instance of DataView constructor (ES6 draft 15.13.7). More...
 
class  v8::Date
 An instance of the built-in Date constructor (ECMA-262, 15.9). More...
 
class  v8::NumberObject
 A Number object (ECMA-262, 4.3.21). More...
 
class  v8::BooleanObject
 A Boolean object (ECMA-262, 4.3.15). More...
 
class  v8::StringObject
 A String object (ECMA-262, 4.3.18). More...
 
class  v8::SymbolObject
 A Symbol object (ECMA-262 edition 6). More...
 
class  v8::RegExp
 An instance of the built-in RegExp constructor (ECMA-262, 15.10). More...
 
class  v8::External
 A JavaScript value that wraps a C++ void*. More...
 
class  v8::Template
 The superclass of object and function templates. More...
 
class  v8::FunctionTemplate
 A FunctionTemplate is used to create functions at runtime. More...
 
class  v8::ObjectTemplate
 An ObjectTemplate is used to create objects at runtime. More...
 
class  v8::Signature
 A Signature specifies which receivers and arguments are valid parameters to a function. More...
 
class  v8::AccessorSignature
 An AccessorSignature specifies which receivers are valid parameters to an accessor callback. More...
 
class  v8::DeclaredAccessorDescriptor
 
class  v8::ObjectOperationDescriptor
 
class  v8::RawOperationDescriptor
 
class  v8::TypeSwitch
 A utility for determining the type of objects based on the template they were constructed from. More...
 
class  v8::ExternalOneByteStringResourceImpl
 
class  v8::Extension
 Ignore. More...
 
class  v8::ResourceConstraints
 A set of constraints that specifies the limits of the runtime's memory use. More...
 
class  v8::Exception
 Create new error objects by calling the corresponding error object constructor with the message. More...
 
class  v8::HeapStatistics
 Collection of V8 heap information. More...
 
struct  v8::JitCodeEvent
 A JIT code event is issued each time code is added, moved or removed. More...
 
struct  v8::JitCodeEvent::name_t
 
struct  v8::JitCodeEvent::line_info_t
 
class  v8::Isolate
 Isolate represents an isolated instance of the V8 engine. More...
 
struct  v8::Isolate::CreateParams
 Initial configuration parameters for a new Isolate. More...
 
class  v8::Isolate::Scope
 Stack-allocated class which sets the isolate for all operations executed within a local scope. More...
 
class  v8::Isolate::DisallowJavascriptExecutionScope
 Assert that no Javascript code is invoked. More...
 
class  v8::Isolate::AllowJavascriptExecutionScope
 Introduce exception to DisallowJavascriptExecutionScope. More...
 
class  v8::Isolate::SuppressMicrotaskExecutionScope
 Do not run microtasks while this scope is active, even if microtasks are automatically executed otherwise. More...
 
class  v8::StartupData
 
class  v8::StartupDataDecompressor
 A helper class for driving V8 startup data decompression. More...
 
class  v8::ExternalResourceVisitor
 Interface for iterating through all external resources in the heap. More...
 
class  v8::PersistentHandleVisitor
 Interface for iterating through all the persistent handles in the heap. More...
 
class  v8::V8
 Container class for static utility functions. More...
 
class  v8::TryCatch
 An external exception handler. More...
 
class  v8::ExtensionConfiguration
 A container for extension names. More...
 
class  v8::Context
 A sandboxed execution context with its own set of built-in objects and functions. More...
 
class  v8::Context::Scope
 Stack-allocated class which sets the execution context for all operations executed within a local scope. More...
 
class  v8::Unlocker
 Multiple threads in V8 are allowed, but only one thread at a time is allowed to use any given V8 isolate, see the comments in the Isolate class. More...
 
class  v8::Locker
 
struct  v8::internal::SmiTagging< 4 >
 
struct  v8::internal::SmiTagging< 8 >
 
class  v8::internal::Internals
 This class exports constants and functionality from within v8 that is necessary to implement inline functions in the v8 api. More...
 

Namespaces

 v8
 Debugger support for the V8 JavaScript engine.
 
 v8::internal
 

Macros

#define V8_EXPORT
 
#define TYPE_CHECK(T, S)
 
#define V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT   2
 
#define V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT   2
 

Typedefs

typedef void(* v8::AccessorGetterCallback) (Local< String > property, const PropertyCallbackInfo< Value > &info)
 Accessor[Getter|Setter] are used as callback functions when setting|getting a particular property. More...
 
typedef void(* v8::AccessorNameGetterCallback) (Local< Name > property, const PropertyCallbackInfo< Value > &info)
 
typedef void(* v8::AccessorSetterCallback) (Local< String > property, Local< Value > value, const PropertyCallbackInfo< void > &info)
 
typedef void(* v8::AccessorNameSetterCallback) (Local< Name > property, Local< Value > value, const PropertyCallbackInfo< void > &info)
 
typedef void(* v8::FunctionCallback) (const FunctionCallbackInfo< Value > &info)
 
typedef void(* v8::NamedPropertyGetterCallback) (Local< String > property, const PropertyCallbackInfo< Value > &info)
 NamedProperty[Getter|Setter] are used as interceptors on object. More...
 
typedef void(* v8::NamedPropertySetterCallback) (Local< String > property, Local< Value > value, const PropertyCallbackInfo< Value > &info)
 Returns the value if the setter intercepts the request. More...
 
typedef void(* v8::NamedPropertyQueryCallback) (Local< String > property, const PropertyCallbackInfo< Integer > &info)
 Returns a non-empty handle if the interceptor intercepts the request. More...
 
typedef void(* v8::NamedPropertyDeleterCallback) (Local< String > property, const PropertyCallbackInfo< Boolean > &info)
 Returns a non-empty handle if the deleter intercepts the request. More...
 
typedef void(* v8::NamedPropertyEnumeratorCallback) (const PropertyCallbackInfo< Array > &info)
 Returns an array containing the names of the properties the named property getter intercepts. More...
 
typedef void(* v8::IndexedPropertyGetterCallback) (uint32_t index, const PropertyCallbackInfo< Value > &info)
 Returns the value of the property if the getter intercepts the request. More...
 
typedef void(* v8::IndexedPropertySetterCallback) (uint32_t index, Local< Value > value, const PropertyCallbackInfo< Value > &info)
 Returns the value if the setter intercepts the request. More...
 
typedef void(* v8::IndexedPropertyQueryCallback) (uint32_t index, const PropertyCallbackInfo< Integer > &info)
 Returns a non-empty handle if the interceptor intercepts the request. More...
 
typedef void(* v8::IndexedPropertyDeleterCallback) (uint32_t index, const PropertyCallbackInfo< Boolean > &info)
 Returns a non-empty handle if the deleter intercepts the request. More...
 
typedef void(* v8::IndexedPropertyEnumeratorCallback) (const PropertyCallbackInfo< Array > &info)
 Returns an array containing the indices of the properties the indexed property getter intercepts. More...
 
typedef bool(* v8::NamedSecurityCallback) (Local< Object > host, Local< Value > key, AccessType type, Local< Value > data)
 Returns true if cross-context access should be allowed to the named property with the given key on the host object. More...
 
typedef bool(* v8::IndexedSecurityCallback) (Local< Object > host, uint32_t index, AccessType type, Local< Value > data)
 Returns true if cross-context access should be allowed to the indexed property with the given index on the host object. More...
 
typedef void(* v8::FatalErrorCallback) (const char *location, const char *message)
 
typedef void(* v8::MessageCallback) (Handle< Message > message, Handle< Value > error)
 
typedef void(* v8::LogEventCallback) (const char *name, int event)
 
typedef int *(* v8::CounterLookupCallback) (const char *name)
 
typedef void *(* v8::CreateHistogramCallback) (const char *name, int min, int max, size_t buckets)
 
typedef void(* v8::AddHistogramSampleCallback) (void *histogram, int sample)
 
typedef void(* v8::MemoryAllocationCallback) (ObjectSpace space, AllocationAction action, int size)
 
typedef void(* v8::CallCompletedCallback) ()
 
typedef void(* v8::MicrotaskCallback) (void *data)
 
typedef void(* v8::FailedAccessCheckCallback) (Local< Object > target, AccessType type, Local< Value > data)
 
typedef bool(* v8::AllowCodeGenerationFromStringsCallback) (Local< Context > context)
 Callback to check if code generation from strings is allowed. More...
 
typedef void(* v8::GCPrologueCallback) (GCType type, GCCallbackFlags flags)
 
typedef void(* v8::GCEpilogueCallback) (GCType type, GCCallbackFlags flags)
 
typedef void(* v8::InterruptCallback) (Isolate *isolate, void *data)
 
typedef void(* v8::FunctionEntryHook) (uintptr_t function, uintptr_t return_addr_location)
 FunctionEntryHook is the type of the profile entry hook called at entry to any generated function when function-level profiling is enabled. More...
 
typedef void(* v8::JitCodeEventHandler) (const JitCodeEvent *event)
 Callback function passed to SetJitCodeEventHandler. More...
 
typedef bool(* v8::EntropySource) (unsigned char *buffer, size_t length)
 EntropySource is used as a callback function when v8 needs a source of entropy. More...
 
typedef uintptr_t(* v8::ReturnAddressLocationResolver) (uintptr_t return_addr_location)
 ReturnAddressLocationResolver is used as a callback function when v8 is resolving the location of a return address on the stack. More...
 
typedef SmiTagging< kApiPointerSize > v8::internal::PlatformSmiTagging
 

Enumerations

enum  v8::PropertyAttribute { v8::None = 0 , v8::ReadOnly = 1 << 0 , v8::DontEnum = 1 << 1 , v8::DontDelete = 1 << 2 }
 
enum  v8::ExternalArrayType {
  v8::kExternalInt8Array = 1 , v8::kExternalUint8Array , v8::kExternalInt16Array , v8::kExternalUint16Array ,
  v8::kExternalInt32Array , v8::kExternalUint32Array , v8::kExternalFloat32Array , v8::kExternalFloat64Array ,
  v8::kExternalUint8ClampedArray , v8::kExternalByteArray = kExternalInt8Array , v8::kExternalUnsignedByteArray = kExternalUint8Array , v8::kExternalShortArray = kExternalInt16Array ,
  v8::kExternalUnsignedShortArray = kExternalUint16Array , v8::kExternalIntArray = kExternalInt32Array , v8::kExternalUnsignedIntArray = kExternalUint32Array , v8::kExternalFloatArray = kExternalFloat32Array ,
  v8::kExternalDoubleArray = kExternalFloat64Array , v8::kExternalPixelArray = kExternalUint8ClampedArray
}
 
enum  v8::AccessControl { v8::DEFAULT = 0 , v8::ALL_CAN_READ = 1 , v8::ALL_CAN_WRITE = 1 << 1 , v8::PROHIBITS_OVERWRITING = 1 << 2 }
 Access control specifications. More...
 
enum  v8::AccessType {
  v8::ACCESS_GET , v8::ACCESS_SET , v8::ACCESS_HAS , v8::ACCESS_DELETE ,
  v8::ACCESS_KEYS
}
 Access type specification. More...
 
enum  v8::DeclaredAccessorDescriptorDataType {
  v8::kDescriptorBoolType , v8::kDescriptorInt8Type , v8::kDescriptorUint8Type , v8::kDescriptorInt16Type ,
  v8::kDescriptorUint16Type , v8::kDescriptorInt32Type , v8::kDescriptorUint32Type , v8::kDescriptorFloatType ,
  v8::kDescriptorDoubleType
}
 
enum  v8::ObjectSpace {
  v8::kObjectSpaceNewSpace = 1 << 0 , v8::kObjectSpaceOldPointerSpace = 1 << 1 , v8::kObjectSpaceOldDataSpace = 1 << 2 , v8::kObjectSpaceCodeSpace = 1 << 3 ,
  v8::kObjectSpaceMapSpace = 1 << 4 , v8::kObjectSpaceLoSpace = 1 << 5 , v8::kObjectSpaceAll
}
 
enum  v8::AllocationAction { v8::kAllocationActionAllocate = 1 << 0 , v8::kAllocationActionFree = 1 << 1 , v8::kAllocationActionAll = kAllocationActionAllocate | kAllocationActionFree }
 
enum  v8::GCType { v8::kGCTypeScavenge = 1 << 0 , v8::kGCTypeMarkSweepCompact = 1 << 1 , v8::kGCTypeAll = kGCTypeScavenge | kGCTypeMarkSweepCompact }
 Applications can register callback functions which will be called before and after a garbage collection. More...
 
enum  v8::GCCallbackFlags { v8::kNoGCCallbackFlags = 0 , v8::kGCCallbackFlagCompacted = 1 << 0 , v8::kGCCallbackFlagConstructRetainedObjectInfos = 1 << 1 , v8::kGCCallbackFlagForced = 1 << 2 }
 
enum  v8::JitCodeEventOptions { v8::kJitCodeEventDefault = 0 , v8::kJitCodeEventEnumExisting = 1 }
 Option flags passed to the SetJitCodeEventHandler function. More...
 

Functions

template<class T >
Maybe< Tv8::maybe (T t)
 
void v8::RegisterExtension (Extension *that)
 
Handle< Primitive > v8::Undefined (Isolate *isolate)
 
Handle< Primitive > v8::Null (Isolate *isolate)
 
Handle< Boolean > v8::True (Isolate *isolate)
 
Handle< Boolean > v8::False (Isolate *isolate)
 
template<int kSmiShiftSize>
internal::Object * v8::internal::IntToSmi (int value)
 
static bool v8::internal::SmiValuesAre31Bits ()
 
static bool v8::internal::SmiValuesAre32Bits ()
 

Variables

const int v8::internal::kApiPointerSize = sizeof(void*)
 
const int v8::internal::kApiIntSize = sizeof(int)
 
const int v8::internal::kApiInt64Size = sizeof(int64_t)
 
const int v8::internal::kHeapObjectTag = 1
 
const int v8::internal::kHeapObjectTagSize = 2
 
const intptr_t v8::internal::kHeapObjectTagMask = (1 << kHeapObjectTagSize) - 1
 
const int v8::internal::kSmiTag = 0
 
const int v8::internal::kSmiTagSize = 1
 
const intptr_t v8::internal::kSmiTagMask = (1 << kSmiTagSize) - 1
 
const int v8::internal::kSmiShiftSize = PlatformSmiTagging::kSmiShiftSize
 
const int v8::internal::kSmiValueSize = PlatformSmiTagging::kSmiValueSize
 

Macro Definition Documentation

◆ TYPE_CHECK

#define TYPE_CHECK (   T,
  S 
)
Value:
while (false) { \
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
}
#define T(name, string, precedence)
Definition: token.cc:25
#define S(x)
Definition: version.cc:55

Definition at line 167 of file v8.h.

◆ V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT

#define V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT   2

Definition at line 2843 of file v8.h.

◆ V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT

#define V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT   2

Definition at line 2965 of file v8.h.

◆ V8_EXPORT

#define V8_EXPORT

Definition at line 53 of file v8.h.