15 #if V8_TARGET_ARCH_ARM64
31 class ExternalCallbackScope;
91 static const int kKindWidth = 2;
93 static const int kIndexWidth = 32 - kKindWidth;
101 inline StackHandler*
next()
const;
119 int previous_handler_offset)
const;
136 #define STACK_FRAME_TYPE_LIST(V) \
137 V(ENTRY, EntryFrame) \
138 V(ENTRY_CONSTRUCT, EntryConstructFrame) \
140 V(JAVA_SCRIPT, JavaScriptFrame) \
141 V(OPTIMIZED, OptimizedFrame) \
143 V(STUB_FAILURE_TRAMPOLINE, StubFailureTrampolineFrame) \
144 V(INTERNAL, InternalFrame) \
145 V(CONSTRUCT, ConstructFrame) \
146 V(ARGUMENTS_ADAPTOR, ArgumentsAdaptorFrame)
177 #define DECLARE_TYPE(type, ignore) type,
200 INNER_JSENTRY_FRAME = 0,
201 OUTERMOST_JSENTRY_FRAME = 1
206 constant_pool_address(
NULL) { }
216 this->state_ = original.state_;
217 this->iterator_ =
NULL;
218 this->isolate_ = original.isolate_;
224 bool is_exit()
const {
return type() == EXIT; }
229 return type() == STUB_FAILURE_TRAMPOLINE;
235 Type type = this->type();
236 return (type == JAVA_SCRIPT) || (type == OPTIMIZED);
254 *constant_pool_address() =
reinterpret_cast<Address>(constant_pool);
265 return state_.constant_pool_address;
292 SafepointEntry* safepoint_entry,
293 unsigned* stack_slots);
310 virtual void Print(StringStream* accumulator,
335 bool can_access_heap_objects()
const;
351 static const intptr_t kIsolateTag = 1;
355 friend class StackHandlerIterator;
368 virtual Code* unchecked_code()
const;
374 DCHECK(frame->is_entry());
377 virtual void SetCallerFp(
Address caller_fp);
388 virtual void ComputeCallerState(
State* state)
const;
389 virtual Type GetCallerState(
State* state)
const;
397 virtual Type type()
const {
return ENTRY_CONSTRUCT; }
399 virtual Code* unchecked_code()
const;
402 DCHECK(frame->is_entry_construct());
419 virtual Code* unchecked_code()
const;
421 Object*& code_slot()
const;
427 virtual void SetCallerFp(
Address caller_fp);
444 virtual Address GetCallerStackPointer()
const;
447 virtual void ComputeCallerState(
State* state)
const;
459 inline Object* context()
const;
462 inline Object* GetExpression(
int index)
const;
463 inline void SetExpression(
int index,
Object* value);
464 int ComputeExpressionsCount()
const;
467 virtual void SetCallerFp(
Address caller_fp);
470 DCHECK(frame->is_standard());
477 virtual void ComputeCallerState(
State* state)
const;
480 inline Address caller_fp()
const;
481 inline Address caller_pc()
const;
496 Address GetExpressionAddress(
int n)
const;
501 bool IsExpressionInsideHandler(
int n)
const;
505 static inline bool IsArgumentsAdaptorFrame(
Address fp);
509 static inline bool IsConstructFrame(
Address fp);
527 : receiver_(receiver, function->GetIsolate()),
531 is_constructor_(is_constructor) { }
556 inline Object* receiver()
const;
557 inline void set_receiver(
Object* value);
560 inline Address GetParameterSlot(
int index)
const;
561 inline Object* GetParameter(
int index)
const;
563 return GetNumberOfIncomingArguments();
567 inline Address GetOperandSlot(
int index)
const;
568 inline Object* GetOperand(
int index)
const;
569 inline int ComputeOperandsCount()
const;
572 void SaveOperandStack(
FixedArray* store,
int* stack_handler_index)
const;
573 void RestoreOperandStack(
FixedArray* store,
int stack_handler_index);
576 void SetParameterValue(
int index,
Object* value)
const;
579 bool IsConstructor()
const;
584 inline bool has_adapted_arguments()
const;
585 int GetArgumentsLength()
const;
591 virtual void Print(StringStream* accumulator,
596 virtual Code* unchecked_code()
const;
613 DCHECK(frame->is_java_script());
617 static void PrintFunctionAndOffset(
JSFunction*
function,
Code* code,
619 bool print_line_number);
621 static void PrintTop(
Isolate* isolate, FILE*
file,
bool print_args,
622 bool print_line_number);
627 virtual Address GetCallerStackPointer()
const;
629 virtual int GetNumberOfIncomingArguments()
const;
636 inline Object* function_slot_object()
const;
650 virtual Code* unchecked_code()
const;
655 virtual Address GetCallerStackPointer()
const;
657 virtual int GetNumberOfIncomingArguments()
const;
670 virtual int GetInlineCount();
699 virtual Code* unchecked_code()
const;
702 DCHECK(frame->is_arguments_adaptor());
707 virtual void Print(StringStream* accumulator,
714 virtual int GetNumberOfIncomingArguments()
const;
716 virtual Address GetCallerStackPointer()
const;
731 virtual Code* unchecked_code()
const;
734 DCHECK(frame->is_internal());
741 virtual Address GetCallerStackPointer()
const;
752 static const int kFirstRegisterParameterFrameOffset =
755 static const int kCallerStackParameterCountFrameOffset =
758 virtual Type type()
const {
return STUB_FAILURE_TRAMPOLINE; }
762 virtual Code* unchecked_code()
const;
775 virtual Address GetCallerStackPointer()
const;
789 DCHECK(frame->is_construct());
812 #define DECLARE_SINGLETON(ignore, type) type type##_;
814 #undef DECLARE_SINGLETON
816 StackHandler* handler_;
850 void Reset(ThreadLocalTop* top);
866 bool done()
const {
return iterator_.done(); }
905 void AdvanceOneFrame();
908 return low_bound_ <= addr && addr <= high_bound_;
913 bool IsValidTop(ThreadLocalTop* top)
const;
A single JavaScript stack frame.
static ArgumentsAdaptorFrame * cast(StackFrame *frame)
virtual Type type() const
StackFrame(StackFrameIteratorBase *iterator)
static void SetReturnAddressLocationResolver(ReturnAddressLocationResolver resolver)
StackHandler * top_handler() const
static Code * GetSafepointData(Isolate *isolate, Address pc, SafepointEntry *safepoint_entry, unsigned *stack_slots)
bool is_construct() const
bool is_arguments_adaptor() const
Isolate * isolate() const
JavaScriptFrame * FindJavaScriptFrame(int n)
Address * constant_pool_address() const
Address caller_sp() const
STATIC_ASSERT(LAST_KIND<(1<< kKindWidth))
virtual Code * unchecked_code() const =0
bool is_optimized() const
virtual void Print(StringStream *accumulator, PrintMode mode, int index) const
void operator=(const StackFrame &original)
JavaScriptFrame * frame() const
static Type ComputeType(const StackFrameIteratorBase *iterator, State *state)
static Address * ResolveReturnAddressLocation(Address *pc_address)
DISALLOW_COPY_AND_ASSIGN(StackFrameIteratorBase)
void set_constant_pool(ConstantPoolArray *constant_pool)
int Rewind(Isolate *isolate, FixedArray *array, int offset, Address fp)
bool includes(Address address) const
static void IteratePc(ObjectVisitor *v, Address *pc_address, Code *holder)
void SetFp(Address slot, Address fp)
Address UnpaddedFP() const
JavaScriptFrameIterator(Isolate *isolate)
Handle< Object > receiver()
virtual void Iterate(ObjectVisitor *v) const =0
virtual Type type() const =0
void Unwind(Isolate *isolate, FixedArray *array, int offset, int previous_handler_offset) const
StackHandler * handler() const
bool is_java_script() const
JavaScriptFrameIterator(Isolate *isolate, ThreadLocalTop *top)
StackFrameIteratorBase(Isolate *isolate, bool can_access_heap_objects)
virtual void SetCallerFp(Address caller_fp)=0
JavaScriptFrameIterator(Isolate *isolate, StackFrame::Id id)
bool is_entry_construct() const
StackHandler * next() const
DISALLOW_IMPLICIT_CONSTRUCTORS(StackHandler)
static void PrintIndex(StringStream *accumulator, PrintMode mode, int index)
Handle< Object > receiver_
FrameSummary(Object *receiver, JSFunction *function, Code *code, int offset, bool is_constructor)
virtual bool is_standard() const
Code * LookupCode() const
Object ** context_address() const
StackFrame(const StackFrame &original)
void UpdateFp(Address fp)
void AdvanceToArgumentsFrame()
void Iterate(ObjectVisitor *v, Code *holder) const
Object ** constant_pool_address() const
static Code * GetContainingCode(Isolate *isolate, Address pc)
const bool can_access_heap_objects_
Object ** code_address() const
StackFrame * SingletonFor(StackFrame::Type type, StackFrame::State *state)
static ReturnAddressLocationResolver return_address_location_resolver_
StackFrame * SingletonFor(StackFrame::Type type)
Handle< JSFunction > function_
StackFrameLocator(Isolate *isolate)
static StackHandler * FromAddress(Address address)
Address constant_pool() const
virtual void ComputeCallerState(State *state) const =0
bool is_stub_failure_trampoline() const
virtual Address GetCallerStackPointer() const =0
Address * pc_address() const
const StackFrameIteratorBase * iterator_
virtual Type GetCallerState(State *state) const
static ConstructFrame * cast(StackFrame *frame)
virtual Type type() const
virtual Type type() const
static EntryConstructFrame * cast(StackFrame *frame)
static EntryFrame * cast(StackFrame *frame)
virtual Type type() const
virtual Address GetCallerStackPointer() const
static ExitFrame * cast(StackFrame *frame)
virtual Type type() const
Object *& constant_pool_slot() const
Code * GcSafeFindCodeForInnerPointer(Address inner_pointer)
InnerPointerToCodeCacheEntry * GetCacheEntry(Address inner_pointer)
InnerPointerToCodeCache(Isolate *isolate)
InnerPointerToCodeCacheEntry cache_[kInnerPointerToCodeCacheSize]
DISALLOW_COPY_AND_ASSIGN(InnerPointerToCodeCache)
InnerPointerToCodeCacheEntry * cache(int index)
Code * GcSafeCastToCode(HeapObject *object, Address inner_pointer)
static const int kInnerPointerToCodeCacheSize
virtual Type type() const
static InternalFrame * cast(StackFrame *frame)
virtual int GetInlineCount()
static Register context_register()
static JavaScriptFrame * cast(StackFrame *frame)
virtual Type type() const
static Register fp_register()
void IterateArguments(ObjectVisitor *v) const
int ComputeParametersCount() const
static Register constant_pool_pointer_register()
virtual Type type() const
StackFrame::Type top_frame_type_
ExternalCallbackScope * external_callback_scope_
bool IsValidStackAddress(Address addr) const
const Address high_bound_
StackFrame::Type top_frame_type() const
StackFrame * frame() const
DISALLOW_COPY_AND_ASSIGN(StackFrameIterator)
static const int kFPOffset
static const int kCodeOffset
static const int kContextOffset
static const int kNextOffset
static const int kSlotCount
static const int kStateOffset
static const int kFixedFrameSizeFromFp
static const int kFixedFrameSize
static const int kContextOffset
static const int kExpressionsOffset
static const int kConstantPoolOffset
static const int kCallerPCOffset
static const int kCallerSPOffset
static const int kLastObjectOffset
static const int kCPSlotSize
static const int kMarkerOffset
static const int kCallerFPOffset
virtual bool is_standard() const
static StandardFrame * cast(StackFrame *frame)
static Register constant_pool_pointer_register()
static Register context_register()
static Register fp_register()
virtual Type type() const
virtual Type type() const
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 mode(MIPS only)") DEFINE_BOOL(enable_always_align_csp
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 A file to write the raw context snapshot bytes Write V8 startup blob file(mksnapshot only)") DEFINE_BOOL(profile_hydrogen_code_stub_compilation
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 DECLARE_TYPE(type, ignore)
#define DECLARE_SINGLETON(ignore, type)
#define STACK_FRAME_TYPE_LIST(V)
#define DCHECK(condition)
TypeImpl< ZoneTypeConfig > Type
int JSCallerSavedCode(int n)
const int kPointerSizeLog2
int NumRegs(RegList reglist)
Vector< StackFrame * > CreateStackMap(Isolate *isolate, Zone *zone)
void SetUpJSCallerSavedCodeData()
Debugger support for the V8 JavaScript engine.
uintptr_t(* ReturnAddressLocationResolver)(uintptr_t return_addr_location)
ReturnAddressLocationResolver is used as a callback function when v8 is resolving the location of a r...
Address * constant_pool_address
SafepointEntry safepoint_entry