23 StackFrame::return_address_location_resolver_ =
NULL;
31 : limit_(frame->
fp()), handler_(handler) {
33 DCHECK(frame->sp() <= handler->address());
36 StackHandler*
handler()
const {
return handler_; }
39 return handler_ ==
NULL || handler_->address() > limit_;
43 handler_ = handler_->next();
55 #define INITIALIZE_SINGLETON(type, field) field##_(this),
56 StackFrameIteratorBase::StackFrameIteratorBase(Isolate* isolate,
57 bool can_access_heap_objects)
61 can_access_heap_objects_(can_access_heap_objects) {
63 #undef INITIALIZE_SINGLETON
66 StackFrameIterator::StackFrameIterator(
Isolate* isolate)
84 StackFrame::State state;
88 StackHandlerIterator it(frame_, handler_);
89 while (!it.done()) it.Advance();
90 handler_ = it.handler();
93 frame_ = SingletonFor(type, &state);
102 StackFrame::State state;
106 if (SingletonFor(type) ==
NULL)
return;
107 frame_ = SingletonFor(type, &state);
112 StackFrame::State* state) {
116 result->state_ = *state;
122 #define FRAME_TYPE_CASE(type, field) \
123 case StackFrame::type: result = &field##_; break;
133 #undef FRAME_TYPE_CASE
140 JavaScriptFrameIterator::JavaScriptFrameIterator(
141 Isolate* isolate, StackFrame::Id
id)
142 : iterator_(isolate) {
145 if (
frame()->
id() ==
id)
return;
150 void JavaScriptFrameIterator::Advance() {
153 }
while (!iterator_.done() && !iterator_.frame()->is_java_script());
157 void JavaScriptFrameIterator::AdvanceToArgumentsFrame() {
158 if (!frame()->has_adapted_arguments())
return;
160 DCHECK(iterator_.frame()->is_arguments_adaptor());
168 : JavaScriptFrameIterator(isolate) {
175 JavaScriptFrameIterator::Advance();
183 if (!frame()->
function()->IsJSFunction())
return false;
184 Object* script = frame()->function()->shared()->script();
186 return (script->IsScript() &&
199 high_bound_(js_entry_sp),
201 external_callback_scope_(isolate->external_callback_scope()) {
202 StackFrame::State state;
212 state.pc_address = StackFrame::ResolveReturnAddressLocation(
222 type = StackFrame::ComputeType(
this, &state);
227 type = StackFrame::JAVA_SCRIPT;
234 if (SingletonFor(type) ==
NULL)
return;
235 frame_ = SingletonFor(type, &state);
236 if (frame_ ==
NULL)
return;
240 if (frame_ !=
NULL && !frame_->is_exit() &&
255 if (handler ==
NULL)
return false;
257 return c_entry_fp < handler;
264 Address last_sp = last_frame->sp(), last_fp = last_frame->fp();
272 StackFrame::State state;
274 frame_ = SingletonFor(type, &state);
275 if (frame_ ==
NULL)
return;
278 if (frame_->sp() < last_sp || frame_->fp() < last_fp) {
290 StackFrame::State state;
291 if (
frame->is_entry() ||
frame->is_entry_construct()) {
298 }
else if (
frame->is_arguments_adaptor()) {
304 if (!number_of_args->IsSmi()) {
308 frame->ComputeCallerState(&state);
310 SingletonFor(
frame->GetCallerState(&state)) !=
NULL;
318 StackFrame::State state;
323 return *state.pc_address !=
NULL;
331 if (frame_->is_java_script())
return;
341 if (*callback_address !=
NULL) {
342 frame_->state_.pc_address = callback_address;
357 Code* StackFrame::GetSafepointData(
Isolate* isolate,
359 SafepointEntry* safepoint_entry,
360 unsigned* stack_slots) {
372 Code* code = entry->
code;
374 *stack_slots = code->stack_slots();
379 bool StackFrame::HasHandler()
const {
380 StackHandlerIterator it(
this, top_handler());
386 static bool GcSafeCodeContains(HeapObject*
object,
Address addr);
390 void StackFrame::IteratePc(ObjectVisitor* v,
394 DCHECK(GcSafeCodeContains(holder,
pc));
395 unsigned pc_offset =
static_cast<unsigned>(
pc - holder->instruction_start());
397 v->VisitPointer(&code);
398 if (code != holder) {
399 holder =
reinterpret_cast<Code*
>(code);
400 pc = holder->instruction_start() + pc_offset;
406 void StackFrame::SetReturnAddressLocationResolver(
408 DCHECK(return_address_location_resolver_ ==
NULL);
409 return_address_location_resolver_ = resolver;
424 if (!marker->IsSmi()) {
429 if (!iterator->can_access_heap_objects_)
return JAVA_SCRIPT;
430 Code::Kind kind = GetContainingCode(iterator->isolate(),
431 *(state->pc_address))->kind();
432 DCHECK(kind == Code::FUNCTION || kind == Code::OPTIMIZED_FUNCTION);
433 return (kind == Code::OPTIMIZED_FUNCTION) ? OPTIMIZED : JAVA_SCRIPT;
440 bool StackFrame::can_access_heap_objects()
const {
441 return iterator_->can_access_heap_objects_;
447 ComputeCallerState(state);
448 return ComputeType(iterator_, state);
452 Address StackFrame::UnpaddedFP()
const {
453 #if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87
454 if (!is_optimized())
return fp();
467 return isolate()->
heap()->js_entry_code();
490 return isolate()->
heap()->js_construct_entry_code();
507 state->sp = caller_sp();
509 state->pc_address = ResolveReturnAddressLocation(
511 if (FLAG_enable_ool_constant_pool) {
512 state->constant_pool_address =
reinterpret_cast<Address*
>(
526 IteratePc(v, pc_address(), LookupCode());
528 if (FLAG_enable_ool_constant_pool) {
556 state->pc_address = ResolveReturnAddressLocation(
558 state->constant_pool_address =
592 state->sp = caller_sp();
594 state->pc_address = ResolveReturnAddressLocation(
596 state->constant_pool_address =
609 for (StackHandlerIterator it(
this, top_handler()); !it.done(); it.Advance()) {
610 if (it.handler()->includes(address))
return true;
619 DCHECK(can_access_heap_objects());
622 unsigned stack_slots = 0;
623 SafepointEntry safepoint_entry;
624 Code* code = StackFrame::GetSafepointData(
625 isolate(),
pc(), &safepoint_entry, &stack_slots);
634 if (safepoint_entry.argument_count() > 0) {
635 v->VisitPointers(parameters_base,
636 parameters_base + safepoint_entry.argument_count());
637 parameters_base += safepoint_entry.argument_count();
641 if (safepoint_entry.has_doubles()) {
643 DCHECK(!isolate()->serializer_enabled());
649 if (safepoint_entry.HasRegisters()) {
651 if (safepoint_entry.HasRegisterAt(
i)) {
653 v->VisitPointer(parameters_base + reg_stack_index);
661 uint8_t* safepoint_bits = safepoint_entry.bits();
665 v->VisitPointers(parameters_base, parameters_limit);
668 for (
unsigned index = 0; index < stack_slots; index++) {
671 if ((safepoint_bits[byte_index] & (1U << bit_index)) != 0) {
672 v->VisitPointer(parameters_limit + index);
677 IteratePc(v, pc_address(), code);
684 v->VisitPointers(fixed_base, fixed_limit);
711 StackHandlerIterator it(
this, top_handler());
745 return function()->code();
750 DCHECK(can_access_heap_objects() &&
753 return function()->shared()->formal_parameter_count();
763 DCHECK(functions->length() == 0);
764 functions->
Add(
function());
769 DCHECK(functions->length() == 0);
770 Code* code_pointer = LookupCode();
771 int offset =
static_cast<int>(
pc() - code_pointer->
address());
777 functions->
Add(summary);
783 bool print_line_number) {
785 function->PrintName(
file);
788 if (print_line_number) {
791 Object* maybe_script = shared->script();
792 if (maybe_script->IsScript()) {
793 Script* script = Script::cast(maybe_script);
795 Object* script_name_raw = script->name();
796 if (script_name_raw->IsString()) {
797 String* script_name = String::cast(script->name());
812 bool print_line_number) {
815 JavaScriptFrameIterator it(isolate);
817 if (it.frame()->is_java_script()) {
821 frame->pc(),
file, print_line_number);
829 for (
int i = 0;
i < length;
i++) {
843 int* stack_handler_index)
const {
844 int operands_count = store->
length();
850 StackHandlerIterator it(
this, top_handler());
851 int i = operands_count - 1;
852 *stack_handler_index = -1;
853 for (; !it.done(); it.Advance()) {
854 StackHandler* handler = it.handler();
862 handler->Unwind(isolate(), store, next_stack_handler_index,
863 *stack_handler_index);
864 *stack_handler_index = next_stack_handler_index;
869 for (;
i >= 0;
i--) {
876 int stack_handler_index) {
877 int operands_count = store->
length();
880 while (
i <= stack_handler_index) {
881 if (
i < stack_handler_index) {
894 StackHandler *handler =
896 stack_handler_index = handler->Rewind(isolate(), store,
i,
fp());
901 for (;
i < operands_count;
i++) {
908 void FrameSummary::Print() {
910 receiver_->ShortPrint();
912 function_->shared()->DebugName()->ShortPrint();
915 if (code_->kind() == Code::FUNCTION)
PrintF(
" NON-OPT");
916 if (code_->kind() == Code::OPTIMIZED_FUNCTION)
PrintF(
" OPT");
917 PrintF(
"\npc: %d\n", offset_);
923 if (literal_id == Translation::kSelfLiteralId) {
927 return JSFunction::cast(literal_array->
get(literal_id));
932 DCHECK(frames->length() == 0);
937 if (LookupCode()->is_turbofanned() && !FLAG_turbo_deoptimization) {
941 int deopt_index = Safepoint::kNoDeoptimizationIndex;
943 FixedArray* literal_array = data->LiteralArray();
950 DCHECK(deopt_index != Safepoint::kNoDeoptimizationIndex);
952 TranslationIterator it(data->TranslationByteArray(),
953 data->TranslationIndex(deopt_index)->value());
955 DCHECK(opcode == Translation::BEGIN);
957 int jsframe_count = it.Next();
962 int i = jsframe_count;
976 int index = it.Next();
980 if (opcode == Translation::LITERAL) {
982 }
else if (opcode == Translation::STACK_SLOT) {
993 int parameter_index = index + parameter_count;
1007 Code* code =
function->shared()->code();
1009 DeoptimizationOutputData::cast(code->deoptimization_data());
1013 unsigned pc_offset =
1017 FrameSummary summary(
receiver,
function, code, pc_offset, is_constructor);
1018 frames->
Add(summary);
1019 is_constructor =
false;
1020 }
else if (opcode == Translation::CONSTRUCT_STUB_FRAME) {
1022 it.Skip(Translation::NumberOfOperandsFor(opcode));
1024 is_constructor =
true;
1027 it.Skip(Translation::NumberOfOperandsFor(opcode));
1046 GcSafeFindCodeForInnerPointer(
pc());
1049 DCHECK(code->
kind() == Code::OPTIMIZED_FUNCTION);
1052 *deopt_index = safepoint_entry.deoptimization_index();
1053 DCHECK(*deopt_index != Safepoint::kNoDeoptimizationIndex);
1055 return DeoptimizationInputData::cast(code->deoptimization_data());
1064 if (LookupCode()->is_turbofanned() && !FLAG_turbo_deoptimization) {
1068 int deopt_index = Safepoint::kNoDeoptimizationIndex;
1071 TranslationIterator it(data->TranslationByteArray(),
1072 data->TranslationIndex(deopt_index)->value());
1074 DCHECK(opcode == Translation::BEGIN);
1077 int jsframe_count = it.Next();
1078 return jsframe_count;
1083 DCHECK(functions->length() == 0);
1088 if (LookupCode()->is_turbofanned() && !FLAG_turbo_deoptimization) {
1092 int deopt_index = Safepoint::kNoDeoptimizationIndex;
1094 FixedArray* literal_array = data->LiteralArray();
1096 TranslationIterator it(data->TranslationByteArray(),
1097 data->TranslationIndex(deopt_index)->value());
1099 DCHECK(opcode == Translation::BEGIN);
1101 int jsframe_count = it.Next();
1105 while (jsframe_count > 0) {
1112 functions->
Add(
function);
1115 it.Skip(Translation::NumberOfOperandsFor(opcode));
1140 Builtins::kArgumentsAdaptorTrampoline);
1148 return reinterpret_cast<Code*
>(code);
1152 void StackFrame::PrintIndex(StringStream* accumulator,
1155 accumulator->Add((
mode == OVERVIEW) ?
"%5d: " :
"[%d]: ", index);
1166 accumulator->PrintSecurityTokenIfChanged(
function);
1167 PrintIndex(accumulator,
mode, index);
1170 accumulator->PrintFunction(
function,
receiver, &code);
1177 ScopeInfo* scope_info = shared->scope_info();
1178 Object* script_obj = shared->script();
1179 if (script_obj->IsScript()) {
1180 Script* script = Script::cast(script_obj);
1181 accumulator->Add(
" [");
1182 accumulator->PrintName(script->name());
1185 if (code !=
NULL && code->
kind() == Code::FUNCTION &&
1189 accumulator->Add(
":%d", line);
1193 accumulator->Add(
":~%d", line);
1196 accumulator->Add(
"] ");
1199 accumulator->Add(
"(this=%o",
receiver);
1203 for (
int i = 0;
i < parameters_count;
i++) {
1204 accumulator->Add(
",");
1208 if (i < scope_info->ParameterCount()) {
1210 accumulator->Add(
"=");
1215 accumulator->Add(
")");
1216 if (
mode == OVERVIEW) {
1217 accumulator->Add(
"\n");
1220 if (is_optimized()) {
1221 accumulator->Add(
" {\n// optimized frame\n}\n");
1224 accumulator->Add(
" {\n");
1227 int stack_locals_count = scope_info->StackLocalCount();
1228 int heap_locals_count = scope_info->ContextLocalCount();
1232 if (stack_locals_count > 0) {
1233 accumulator->Add(
" // stack-allocated locals\n");
1235 for (
int i = 0;
i < stack_locals_count;
i++) {
1236 accumulator->Add(
" var ");
1238 accumulator->Add(
" = ");
1239 if (
i < expressions_count) {
1242 accumulator->Add(
"// no expression found - inconsistent frame?");
1244 accumulator->Add(
"\n");
1258 if (heap_locals_count > 0) {
1259 accumulator->Add(
" // heap-allocated locals\n");
1261 for (
int i = 0;
i < heap_locals_count;
i++) {
1262 accumulator->Add(
" var ");
1264 accumulator->Add(
" = ");
1267 if (index < context->length()) {
1268 accumulator->Add(
"%o",
context->get(index));
1271 "// warning: missing context slot - inconsistent frame?");
1274 accumulator->Add(
"// warning: no context found - inconsistent frame?");
1276 accumulator->Add(
"\n");
1280 int expressions_start = stack_locals_count;
1281 if (expressions_start < expressions_count) {
1282 accumulator->Add(
" // expression stack (top to bottom)\n");
1284 for (
int i = expressions_count - 1;
i >= expressions_start;
i--) {
1290 if (FLAG_max_stack_trace_source_length != 0 && code !=
NULL) {
1293 os <<
"--------- s o u r c e c o d e ---------\n"
1294 <<
SourceCodeOf(shared, FLAG_max_stack_trace_source_length)
1295 <<
"\n-----------------------------------------\n";
1296 accumulator->Add(os.
c_str());
1299 accumulator->Add(
"}\n\n");
1309 expected =
function->shared()->formal_parameter_count();
1311 PrintIndex(accumulator,
mode, index);
1312 accumulator->Add(
"arguments adaptor frame: %d->%d", actual, expected);
1313 if (
mode == OVERVIEW) {
1314 accumulator->Add(
"\n");
1317 accumulator->Add(
" {\n");
1320 if (actual > 0) accumulator->Add(
" // actual arguments\n");
1321 for (
int i = 0;
i < actual;
i++) {
1323 if (expected != -1 &&
i >= expected) {
1324 accumulator->Add(
" // not passed to callee");
1326 accumulator->Add(
"\n");
1329 accumulator->Add(
"}\n\n");
1334 StackHandlerIterator it(
this, top_handler());
1336 StackHandler* handler = it.handler();
1337 DCHECK(handler->is_js_entry());
1338 handler->Iterate(v, LookupCode());
1345 IteratePc(v, pc_address(), LookupCode());
1353 for (StackHandlerIterator it(
this, top_handler()); !it.done(); it.Advance()) {
1354 StackHandler* handler = it.handler();
1358 const Address address = handler->address();
1359 v->VisitPointers(base,
reinterpret_cast<Object**
>(address));
1362 handler->Iterate(v, LookupCode());
1364 v->VisitPointers(base, limit);
1370 IteratePc(v, pc_address(), LookupCode());
1378 IteratePc(v, pc_address(), LookupCode());
1386 v->VisitPointers(base, limit);
1390 v->VisitPointers(base, limit);
1391 IteratePc(v, pc_address(), LookupCode());
1403 FindCodeInCache(&trampoline);
1409 FindCodeInCache(&trampoline);
1424 for (
int i = 0;
i <= n;
i++) {
1425 while (!iterator_.frame()->is_java_script()) iterator_.Advance();
1427 iterator_.Advance();
1438 MapWord map_word =
object->
map_word();
1439 return map_word.IsForwardingAddress() ?
1440 map_word.ToForwardingAddress()->map() : map_word.ToMap();
1450 static bool GcSafeCodeContains(HeapObject* code,
Address addr) {
1452 DCHECK(
map == code->GetHeap()->code_map());
1453 Address start = code->address();
1454 Address end = code->address() + code->SizeFromMap(
map);
1455 return start <= addr && addr < end;
1462 Code* code =
reinterpret_cast<Code*
>(object);
1463 DCHECK(code !=
NULL && GcSafeCodeContains(code, inner_pointer));
1473 if (large_page !=
NULL) {
1487 if (addr == top && addr != limit) {
1494 Address next_addr = addr + obj_size;
1495 if (next_addr > inner_pointer)
return GcSafeCastToCode(obj, inner_pointer);
1510 if (entry->inner_pointer == inner_pointer) {
1519 entry->safepoint_entry.Reset();
1520 entry->inner_pointer = inner_pointer;
1529 void StackHandler::Unwind(
Isolate* isolate,
1532 int previous_handler_offset)
const {
1541 array->
set(offset + 1, *code_address());
1543 array->
set(offset + 3, *context_address());
1550 int StackHandler::Rewind(
Isolate* isolate,
1557 Smi* prev_handler_offset = Smi::cast(array->get(offset));
1558 Code* code = Code::cast(array->get(offset + 1));
1559 Smi* smi_index = Smi::cast(array->get(offset + 2));
1560 Object* context = array->get(offset + 3);
1561 Smi* smi_kind = Smi::cast(array->get(offset + 4));
1563 unsigned state = KindField::encode(
static_cast<Kind
>(smi_kind->value())) |
1564 IndexField::encode(
static_cast<unsigned>(smi_index->value()));
1567 *isolate->handler_address();
1574 *isolate->handler_address() = address();
1576 return prev_handler_offset->value();
1607 #define DEFINE_WRAPPER(type, field) \
1608 class field##_Wrapper : public ZoneObject { \
1610 field##_Wrapper(const field& original) : frame_(original) { \
1615 #undef DEFINE_WRAPPER
1618 #define FRAME_TYPE_CASE(type, field) \
1619 case StackFrame::type: { \
1620 field##_Wrapper* wrapper = \
1621 new(zone) field##_Wrapper(*(reinterpret_cast<field*>(frame))); \
1622 return &wrapper->frame_; \
1625 switch (frame->type()) {
1629 #undef FRAME_TYPE_CASE
1638 list.
Add(frame, zone);
Isolate represents an isolated instance of the V8 engine.
A JavaScript object (ECMA-262, 4.3.3)
A single JavaScript stack frame.
virtual int GetNumberOfIncomingArguments() const
virtual Code * unchecked_code() const
virtual Address GetCallerStackPointer() const
virtual void Print(StringStream *accumulator, PrintMode mode, int index) const
StackHandler * handler() const
StackHandlerIterator(const StackFrame *frame, StackHandler *handler)
Code * builtin(Name name)
SafepointEntry GetSafepointEntry(Address pc)
byte * instruction_start()
static const int kHeaderSize
int SourcePosition(Address pc)
static Context * cast(Object *context)
static int GetOutputInfo(DeoptimizationOutputData *data, BailoutId node_id, SharedFunctionInfo *shared)
virtual Code * unchecked_code() const
static const int kCallerFPOffset
virtual void Iterate(ObjectVisitor *v) const
virtual void SetCallerFp(Address caller_fp)
virtual void ComputeCallerState(State *state) const
virtual Code * unchecked_code() const
virtual Type GetCallerState(State *state) const
static const int kSPOffset
static const int kCallerSPDisplacement
static const int kCallerPCOffset
static const int kCodeOffset
static const int kConstantPoolOffset
static const int kCallerFPOffset
virtual void ComputeCallerState(State *state) const
static void FillState(Address fp, Address sp, State *state)
static Address ComputeStackPointer(Address fp)
virtual void SetCallerFp(Address caller_fp)
virtual Address GetCallerStackPointer() const
virtual Code * unchecked_code() const
Object *& constant_pool_slot() const
static Type GetStateForFramePointer(Address fp, State *state)
virtual void Iterate(ObjectVisitor *v) const
Object *& code_slot() const
void set(int index, Object *value)
static HeapObject * FromAddress(Address address)
LargeObjectSpace * lo_space()
Code * GcSafeFindCodeForInnerPointer(Address inner_pointer)
InnerPointerToCodeCacheEntry * GetCacheEntry(Address inner_pointer)
InnerPointerToCodeCacheEntry * cache(int index)
Code * GcSafeCastToCode(HeapObject *object, Address inner_pointer)
static const int kInnerPointerToCodeCacheSize
static const int kCodeOffset
virtual void Iterate(ObjectVisitor *v) const
virtual Code * unchecked_code() const
virtual Address GetCallerStackPointer() const
static Address c_entry_fp(ThreadLocalTop *thread)
Object * FindCodeObject(Address a)
InnerPointerToCodeCache * inner_pointer_to_code_cache()
ThreadLocalTop * thread_local_top()
static Address handler(ThreadLocalTop *thread)
Address * handler_address()
static const int kDynamicAlignmentStateOffset
static const int kFunctionOffset
virtual int GetNumberOfIncomingArguments() const
virtual int GetInlineCount()
void SetParameterValue(int index, Object *value) const
void RestoreOperandStack(FixedArray *store, int stack_handler_index)
Object * receiver() const
bool IsConstructor() const
virtual void GetFunctions(List< JSFunction * > *functions)
bool has_adapted_arguments() const
static void PrintTop(Isolate *isolate, FILE *file, bool print_args, bool print_line_number)
Address GetParameterSlot(int index) const
virtual void Summarize(List< FrameSummary > *frames)
Address GetOperandSlot(int index) const
int GetArgumentsLength() const
int ComputeOperandsCount() const
virtual void Print(StringStream *accumulator, PrintMode mode, int index) const
Object * GetParameter(int index) const
virtual Code * unchecked_code() const
Object * GetOperand(int index) const
static JavaScriptFrame * cast(StackFrame *frame)
JSFunction * function() const
void SaveOperandStack(FixedArray *store, int *stack_handler_index) const
static void PrintFunctionAndOffset(JSFunction *function, Code *code, Address pc, FILE *file, bool print_line_number)
virtual void Iterate(ObjectVisitor *v) const
int ComputeParametersCount() const
virtual Address GetCallerStackPointer() const
LargePage * FindPage(Address a)
void Add(const T &element, AllocationPolicy allocator=AllocationPolicy())
Vector< T > ToVector() const
static int SafepointRegisterStackIndex(int reg_code)
static MemoryChunk * FromAddress(Address a)
static Object *& Object_at(Address addr)
static Address & Address_at(Address addr)
static uintptr_t & uintptr_at(Address addr)
static int32_t & int32_at(Address addr)
const char * c_str() const
void ShortPrint(FILE *out=stdout)
DeoptimizationInputData * GetDeoptimizationData(int *deopt_index)
virtual int GetInlineCount()
virtual void Summarize(List< FrameSummary > *frames)
virtual void GetFunctions(List< JSFunction * > *functions)
virtual void Iterate(ObjectVisitor *v) const
JSFunction * LiteralAt(FixedArray *literal_array, int literal_id)
StackFrame::Type top_frame_type_
ExternalCallbackScope * external_callback_scope_
bool IsValidTop(ThreadLocalTop *top) const
bool IsValidFrame(StackFrame *frame) const
bool IsValidStackAddress(Address addr) const
StackFrame * frame() const
bool IsValidCaller(StackFrame *frame)
bool IsValidExitFrame(Address fp) const
SafeStackFrameIterator(Isolate *isolate, Address fp, Address sp, Address js_entry_sp)
String * ContextLocalName(int var)
String * ParameterName(int var)
String * StackLocalName(int var)
static int GetLineNumber(Handle< Script > script, int code_pos)
int start_position() const
Address StartFor(Address addr)
static Smi * FromInt(int value)
StackFrame * frame() const
void Reset(ThreadLocalTop *top)
StackFrameIterator(Isolate *isolate)
static const int kFPOffset
static const int kCodeOffset
static const int kContextOffset
static const int kNextOffset
static const int kSlotCount
static const int kStateOffset
StackTraceFrameIterator(Isolate *isolate)
static const int kContextOffset
static const int kExpressionsOffset
static const int kCallerSPOffset
static const int kLastObjectOffset
static const int kMarkerOffset
static const int kCallerFPOffset
Address GetExpressionAddress(int n) const
static Address ComputeConstantPoolAddress(Address fp)
static bool IsArgumentsAdaptorFrame(Address fp)
Address caller_fp() const
void IterateExpressions(ObjectVisitor *v) const
void IterateCompiledFrame(ObjectVisitor *v) const
virtual void ComputeCallerState(State *state) const
bool IsExpressionInsideHandler(int n) const
Object * GetExpression(int index) const
virtual void SetCallerFp(Address caller_fp)
int ComputeExpressionsCount() const
static Address ComputePCAddress(Address fp)
static bool IsConstructFrame(Address fp)
SmartArrayPointer< char > ToCString(AllowNullsFlag allow_nulls, RobustnessFlag robustness_flag, int offset, int length, int *length_output=0)
static const int kFirstRegisterParameterFrameOffset
virtual void Iterate(ObjectVisitor *v) const
virtual Address GetCallerStackPointer() const
virtual Code * unchecked_code() const
virtual int GetNumberOfIncomingArguments() const
virtual Address GetCallerStackPointer() const
virtual void Iterate(ObjectVisitor *v) const
virtual Code * unchecked_code() 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 map
enable harmony numeric enable harmony object literal extensions true
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 DEFINE_WRAPPER(type, field)
#define FRAME_TYPE_CASE(type, field)
#define INITIALIZE_SINGLETON(type, field)
#define STACK_FRAME_TYPE_LIST(V)
#define DCHECK_LE(v1, v2)
#define DCHECK_GE(v1, v2)
#define DCHECK(condition)
#define DCHECK_EQ(v1, v2)
uint32_t CountPopulation32(uint32_t value)
bool IsPowerOfTwo32(uint32_t value)
JSCallerSavedCodeData caller_saved_code_data
const int kAlignmentPaddingPushed
const RegList kJSCallerSaved
TypeImpl< ZoneTypeConfig > Type
int JSCallerSavedCode(int n)
const int kNumSafepointRegisters
static const uint32_t kZeroHashSeed
@ NOT_JS_FUNCTION_STUB_MODE
kSerializedDataOffset Object
@ ROBUST_STRING_TRAVERSAL
int NumRegs(RegList reglist)
const int kBitsPerByteLog2
void PrintF(const char *format,...)
Vector< StackFrame * > CreateStackMap(Isolate *isolate, Zone *zone)
uint32_t ComputeIntegerHash(uint32_t key, uint32_t seed)
static StackFrame * AllocateFrameCopy(StackFrame *frame, Zone *zone)
const int kNumJSCallerSaved
STATIC_ASSERT(sizeof(CPURegister)==sizeof(Register))
static int GcSafeSizeOfCodeSpaceObject(HeapObject *object)
static Map * GcSafeMapOfCodeSpaceObject(HeapObject *object)
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...
static int NumAllocatableRegisters()
SafepointEntry safepoint_entry
int reg_code[kNumJSCallerSaved]