71 : value_(
v8::internal::
Handle<
v8::internal::JSObject>::cast(obj)) { }
75 : value_(
v8::internal::
Handle<
v8::internal::JSObject>(
76 v8::internal::JSObject::cast(obj))) { }
85 return v8::internal::FixedArray::cast(
value()->elements())->get(offset);
91 v8::internal::FixedArray::cast(
value_->elements())->set(offset,
value);
97 return reinterpret_cast<T>(
98 reinterpret_cast<intptr_t
>(
99 v8::internal::Foreign::cast(obj)->foreign_address()));
103 template <
typename T>
107 return isolate->
factory()->NewForeign(
137 #define OPEN_HANDLE_LIST(V) \
138 V(Template, TemplateInfo) \
139 V(FunctionTemplate, FunctionTemplateInfo) \
140 V(ObjectTemplate, ObjectTemplateInfo) \
141 V(Signature, SignatureInfo) \
142 V(AccessorSignature, FunctionTemplateInfo) \
143 V(TypeSwitch, TypeSwitchInfo) \
145 V(RegExp, JSRegExp) \
146 V(Object, JSObject) \
148 V(ArrayBuffer, JSArrayBuffer) \
149 V(ArrayBufferView, JSArrayBufferView) \
150 V(TypedArray, JSTypedArray) \
151 V(Uint8Array, JSTypedArray) \
152 V(Uint8ClampedArray, JSTypedArray) \
153 V(Int8Array, JSTypedArray) \
154 V(Uint16Array, JSTypedArray) \
155 V(Int16Array, JSTypedArray) \
156 V(Uint32Array, JSTypedArray) \
157 V(Int32Array, JSTypedArray) \
158 V(Float32Array, JSTypedArray) \
159 V(Float64Array, JSTypedArray) \
160 V(DataView, JSDataView) \
164 V(Script, JSFunction) \
165 V(UnboundScript, SharedFunctionInfo) \
166 V(Function, JSFunction) \
167 V(Message, JSMessageObject) \
168 V(Context, Context) \
169 V(External, Object) \
170 V(StackTrace, JSArray) \
171 V(StackFrame, JSObject) \
172 V(DeclaredAccessorDescriptor, DeclaredAccessorDescriptor)
178 const char* location,
179 const char* message) {
260 #define DECLARE_OPEN_HANDLE(From, To) \
261 static inline v8::internal::Handle<v8::internal::To> \
262 OpenHandle(const From* that, bool allow_empty_handle = false);
266 #undef DECLARE_OPEN_HANDLE
268 template<
class From,
class To>
271 return Local<To>(
reinterpret_cast<To*
>(obj.location()));
287 template <
class From,
class To>
310 return reinterpret_cast<T*
>(obj.location());
316 return Utils::Convert<v8::internal::Object, T>(obj);
322 #define MAKE_TO_LOCAL(Name, From, To) \
323 Local<v8::To> Utils::Name(v8::internal::Handle<v8::internal::From> obj) { \
324 return Convert<v8::internal::From, v8::To>(obj); \
328 #define MAKE_TO_LOCAL_TYPED_ARRAY(Type, typeName, TYPE, ctype, size) \
329 Local<v8::Type##Array> Utils::ToLocal##Type##Array( \
330 v8::internal::Handle<v8::internal::JSTypedArray> obj) { \
331 DCHECK(obj->type() == kExternal##Type##Array); \
332 return Convert<v8::internal::JSTypedArray, v8::Type##Array>(obj); \
352 MAKE_TO_LOCAL(ToLocal, FunctionTemplateInfo, FunctionTemplate)
355 MAKE_TO_LOCAL(AccessorSignatureToLocal, FunctionTemplateInfo, AccessorSignature)
364 MAKE_TO_LOCAL(ToLocal, DeclaredAccessorDescriptor, DeclaredAccessorDescriptor)
366 #undef MAKE_TO_LOCAL_TYPED_ARRAY
372 #define MAKE_OPEN_HANDLE(From, To) \
373 v8::internal::Handle<v8::internal::To> Utils::OpenHandle( \
374 const v8::From* that, bool allow_empty_handle) { \
375 EXTRA_CHECK(allow_empty_handle || that != NULL); \
376 EXTRA_CHECK(that == NULL || \
377 (*reinterpret_cast<v8::internal::Object* const*>(that))->Is##To()); \
378 return v8::internal::Handle<v8::internal::To>( \
379 reinterpret_cast<v8::internal::To**>(const_cast<v8::From*>(that))); \
384 #undef MAKE_OPEN_HANDLE
385 #undef OPEN_HANDLE_LIST
651 if (block_start <= prev_limit && prev_limit <= block_limit) {
652 #ifdef ENABLE_HANDLE_ZAPPING
653 internal::HandleScope::ZapRange(prev_limit, block_limit);
658 if (prev_limit == block_limit)
break;
662 #ifdef ENABLE_HANDLE_ZAPPING
663 internal::HandleScope::ZapRange(block_start, block_limit);
#define OPEN_HANDLE_LIST(V)
#define DECLARE_OPEN_HANDLE(From, To)
#define MAKE_OPEN_HANDLE(From, To)
#define MAKE_TO_LOCAL_TYPED_ARRAY(Type, typeName, TYPE, ctype, size)
#define MAKE_TO_LOCAL(Name, From, To)
ApiFunction(v8::internal::Address addr)
v8::internal::Address address()
v8::internal::Address addr_
A HandleScope which first allocates a handle in the current scope which will be later filled with the...
Local< T > Escape(Local< T > value)
Pushes the value into the previous scope and returns a handle to it.
The argument information given to function call callbacks.
An object reference managed by the v8 garbage collector.
A light-weight stack-allocated object handle.
void add(v8::internal::Handle< v8::internal::Object > value)
void set(int index, v8::internal::Object *value)
NeanderArray(v8::internal::Isolate *isolate)
v8::internal::Object * get(int index)
v8::internal::Handle< v8::internal::JSObject > value()
v8::internal::Handle< v8::internal::JSObject > value_
v8::internal::Object * get(int index)
v8::internal::Handle< v8::internal::JSObject > value()
NeanderObject(v8::internal::Isolate *isolate, int size)
void set(int index, v8::internal::Object *value)
A PersistentBase which allows copy and assignment.
The information passed to a property callback about the context of the property access.
RegisteredExtension * next()
static void Register(RegisteredExtension *that)
static void UnregisterAll()
RegisteredExtension * next_
RegisteredExtension(Extension *extension)
static RegisteredExtension * first_extension_
static RegisteredExtension * first_extension()
static v8::internal::Handle< v8::internal::Object > OpenPersistent(v8::Persistent< T > *persistent)
static Local< Name > ToLocal(v8::internal::Handle< v8::internal::Name > obj)
static Local< Signature > ToLocal(v8::internal::Handle< v8::internal::SignatureInfo > obj)
static Local< Float32Array > ToLocalFloat32Array(v8::internal::Handle< v8::internal::JSTypedArray > obj)
static bool ApiCheck(bool condition, const char *location, const char *message)
static Local< Function > ToLocal(v8::internal::Handle< v8::internal::JSFunction > obj)
static Local< Uint16Array > ToLocalUint16Array(v8::internal::Handle< v8::internal::JSTypedArray > obj)
static Local< Context > ToLocal(v8::internal::Handle< v8::internal::Context > obj)
static Local< FunctionTemplate > ToFunctionTemplate(NeanderObject obj)
static Local< Uint32Array > ToLocalUint32Array(v8::internal::Handle< v8::internal::JSTypedArray > obj)
static Local< TypedArray > ToLocal(v8::internal::Handle< v8::internal::JSTypedArray > obj)
static Local< String > ToLocal(v8::internal::Handle< v8::internal::String > obj)
static Local< Array > ToLocal(v8::internal::Handle< v8::internal::JSArray > obj)
static Local< DataView > ToLocal(v8::internal::Handle< v8::internal::JSDataView > obj)
static Local< Uint8ClampedArray > ToLocalUint8ClampedArray(v8::internal::Handle< v8::internal::JSTypedArray > obj)
static v8::internal::Handle< To > OpenHandle(v8::Local< From > handle)
static Local< Float64Array > ToLocalFloat64Array(v8::internal::Handle< v8::internal::JSTypedArray > obj)
static Local< DeclaredAccessorDescriptor > ToLocal(v8::internal::Handle< v8::internal::DeclaredAccessorDescriptor > obj)
static Local< AccessorSignature > AccessorSignatureToLocal(v8::internal::Handle< v8::internal::FunctionTemplateInfo > obj)
static Local< ObjectTemplate > ToObjectTemplate(NeanderObject obj)
static Local< TypeSwitch > ToLocal(v8::internal::Handle< v8::internal::TypeSwitchInfo > obj)
static Local< Object > ToLocal(v8::internal::Handle< v8::internal::JSObject > obj)
static Local< Symbol > ToLocal(v8::internal::Handle< v8::internal::Symbol > obj)
static Local< Uint32 > Uint32ToLocal(v8::internal::Handle< v8::internal::Object > obj)
static v8::internal::Handle< v8::internal::Object > OpenPersistent(const v8::Persistent< T > &persistent)
static Local< To > Convert(v8::internal::Handle< From > obj)
static Local< External > ExternalToLocal(v8::internal::Handle< v8::internal::JSObject > obj)
static Local< Int32Array > ToLocalInt32Array(v8::internal::Handle< v8::internal::JSTypedArray > obj)
static Local< Integer > IntegerToLocal(v8::internal::Handle< v8::internal::Object > obj)
static Local< ObjectTemplate > ToLocal(v8::internal::Handle< v8::internal::ObjectTemplateInfo > obj)
static Local< Message > MessageToLocal(v8::internal::Handle< v8::internal::Object > obj)
static Local< StackTrace > StackTraceToLocal(v8::internal::Handle< v8::internal::JSArray > obj)
static Local< Int8Array > ToLocalInt8Array(v8::internal::Handle< v8::internal::JSTypedArray > obj)
static Local< FunctionTemplate > ToLocal(v8::internal::Handle< v8::internal::FunctionTemplateInfo > obj)
static Local< ArrayBuffer > ToLocal(v8::internal::Handle< v8::internal::JSArrayBuffer > obj)
static Local< Int16Array > ToLocalInt16Array(v8::internal::Handle< v8::internal::JSTypedArray > obj)
static Local< ArrayBufferView > ToLocal(v8::internal::Handle< v8::internal::JSArrayBufferView > obj)
static void ReportApiFailure(const char *location, const char *message)
static Local< RegExp > ToLocal(v8::internal::Handle< v8::internal::JSRegExp > obj)
static Local< StackFrame > StackFrameToLocal(v8::internal::Handle< v8::internal::JSObject > obj)
static Local< Value > ToLocal(v8::internal::Handle< v8::internal::Object > obj)
static Local< Uint8Array > ToLocalUint8Array(v8::internal::Handle< v8::internal::JSTypedArray > obj)
static Local< Number > NumberToLocal(v8::internal::Handle< v8::internal::Object > obj)
DeferredHandles * previous_
void Iterate(ObjectVisitor *v)
List< Object ** > blocks_
DeferredHandles(Object **first_block_limit, Isolate *isolate)
Object ** first_block_limit_
List< internal::Object ** > blocks_
void EnterContext(Handle< Context > context)
Handle< Context > LastEnteredContext()
void BeginDeferredScope()
List< Context * > entered_contexts_
DeferredHandles * Detach(Object **prev_limit)
void FreeThreadResources()
char * RestoreThreadHelper(char *from)
DISALLOW_COPY_AND_ASSIGN(HandleScopeImplementer)
internal::Object ** GetSpareOrNewBlock()
List< Context * > saved_contexts_
HandleScopeData handle_scope_data_
Isolate * isolate() const
char * ArchiveThread(char *to)
void DeleteExtensions(internal::Object **prev_limit)
bool LastEnteredContextWas(Handle< Context > context)
void IterateThis(ObjectVisitor *v)
List< internal::Object ** > * blocks()
void Iterate(v8::internal::ObjectVisitor *v)
char * ArchiveThreadHelper(char *to)
HandleScopeImplementer(Isolate *isolate)
void DecrementCallDepth()
void IncrementCallDepth()
char * RestoreThread(char *from)
~HandleScopeImplementer()
Context * RestoreContext()
void ReturnBlock(Object **block)
static int ArchiveSpacePerThread()
void SaveContext(Context *context)
Object ** last_handle_before_deferred_block_
Handle< T > EscapeFrom(v8::EscapableHandleScope *scope)
static Handle< T > null()
void LinkDeferredHandles(DeferredHandles *deferred_handles)
void RecordWrite(Handle< String > string)
bool IsUseCountLow(Address top)
void IncrementUseCount(Address top)
static const int kFreshnessLimit
static const int kUseLimit
static bool IsFreshString(Address string, Address top)
DISALLOW_COPY_AND_ASSIGN(StringTracker)
bool IsFreshUnusedString(Handle< String > string)
static void set_stress_type(v8::Testing::StressType stress_type)
static v8::Testing::StressType stress_type()
static v8::Testing::StressType stress_type_
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in only print modified registers Trace simulator debug messages Implied by trace sim abort randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot A filename with extra code to be included in the A file to write the raw snapshot bytes to(mksnapshot only)") DEFINE_STRING(raw_context_file
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define DCHECK(condition)
#define STATIC_ASSERT(test)
HANDLE HANDLE LPSTACKFRAME64 StackFrame
IN DWORD64 OUT PDWORD64 OUT PIMAGEHLP_SYMBOL64 Symbol
void DeleteArray(T *array)
kSerializedDataOffset Object
Handle< T > handle(T *t, Isolate *isolate)
const int kHandleBlockSize
void InvokeFunctionCallback(const v8::FunctionCallbackInfo< v8::Value > &info, v8::FunctionCallback callback)
void InvokeAccessorGetterCallback(v8::Local< v8::Name > property, const v8::PropertyCallbackInfo< v8::Value > &info, v8::AccessorNameGetterCallback getter)
Debugger support for the V8 JavaScript engine.
v8::internal::Handle< v8::internal::Object > FromCData(v8::internal::Isolate *isolate, T obj)
T ToCData(v8::internal::Object *obj)
void(* AccessorNameGetterCallback)(Local< Name > property, const PropertyCallbackInfo< Value > &info)
T * ToApi(v8::internal::Handle< v8::internal::Object > obj)
void(* FunctionCallback)(const FunctionCallbackInfo< Value > &info)
v8::Local< T > ToApiHandle(v8::internal::Handle< v8::internal::Object > obj)
#define T(name, string, precedence)