50 static inline Address* ResolveReturnAddressLocation(
Address* pc_address) {
51 if (return_address_location_resolver ==
NULL) {
54 return reinterpret_cast<Address*
>(
55 return_address_location_resolver(
56 reinterpret_cast<uintptr_t>(pc_address)));
66 : limit_(frame->
fp()), handler_(handler) {
68 ASSERT(frame->sp() <= handler->address());
71 StackHandler*
handler()
const {
return handler_; }
74 return handler_ ==
NULL || handler_->address() > limit_;
78 handler_ = handler_->next();
83 StackHandler* handler_;
90 #define INITIALIZE_SINGLETON(type, field) field##_(this),
91 StackFrameIterator::StackFrameIterator()
92 : isolate_(Isolate::Current()),
95 thread_(isolate_->thread_local_top()),
96 fp_(
NULL), sp_(
NULL), advance_(&StackFrameIterator::AdvanceWithHandler) {
99 StackFrameIterator::StackFrameIterator(Isolate* isolate)
103 thread_(isolate_->thread_local_top()),
104 fp_(
NULL), sp_(
NULL), advance_(&StackFrameIterator::AdvanceWithHandler) {
107 StackFrameIterator::StackFrameIterator(Isolate* isolate, ThreadLocalTop* t)
110 frame_(
NULL), handler_(
NULL), thread_(t),
111 fp_(
NULL), sp_(
NULL), advance_(&StackFrameIterator::AdvanceWithHandler) {
114 StackFrameIterator::StackFrameIterator(Isolate* isolate,
119 thread_(use_top ? isolate_->thread_local_top() :
NULL),
120 fp_(use_top ?
NULL : fp), sp_(sp),
121 advance_(use_top ? &StackFrameIterator::AdvanceWithHandler :
122 &StackFrameIterator::AdvanceWithoutHandler) {
123 if (use_top || fp !=
NULL) {
128 #undef INITIALIZE_SINGLETON
131 void StackFrameIterator::AdvanceWithHandler() {
137 StackFrame::State state;
138 StackFrame::Type type = frame_->GetCallerState(&state);
141 StackHandlerIterator it(frame_, handler_);
142 while (!it.done()) it.Advance();
143 handler_ = it.handler();
146 frame_ = SingletonFor(type, &state);
154 void StackFrameIterator::AdvanceWithoutHandler() {
157 StackFrame::State state;
158 StackFrame::Type type = frame_->GetCallerState(&state);
159 frame_ = SingletonFor(type, &state);
163 void StackFrameIterator::Reset() {
164 StackFrame::State state;
165 StackFrame::Type type;
166 if (thread_ !=
NULL) {
167 type = ExitFrame::GetStateForFramePointer(
168 Isolate::c_entry_fp(thread_), &state);
169 handler_ = StackHandler::FromAddress(
170 Isolate::handler(thread_));
175 state.pc_address = ResolveReturnAddressLocation(
176 reinterpret_cast<Address*>(StandardFrame::ComputePCAddress(fp_)));
177 type = StackFrame::ComputeType(isolate(), &state);
179 if (SingletonFor(type) ==
NULL)
return;
180 frame_ = SingletonFor(type, &state);
184 StackFrame* StackFrameIterator::SingletonFor(StackFrame::Type type,
185 StackFrame::State* state) {
189 result->state_ = *state;
194 StackFrame* StackFrameIterator::SingletonFor(StackFrame::Type type) {
195 #define FRAME_TYPE_CASE(type, field) \
196 case StackFrame::type: result = &field##_; break;
206 #undef FRAME_TYPE_CASE
213 StackTraceFrameIterator::StackTraceFrameIterator() {
214 if (!done() && !IsValidFrame()) Advance();
218 StackTraceFrameIterator::StackTraceFrameIterator(
Isolate* isolate)
220 if (!done() && !IsValidFrame())
Advance();
226 JavaScriptFrameIterator::Advance();
228 if (IsValidFrame())
return;
232 bool StackTraceFrameIterator::IsValidFrame() {
233 if (!frame()->
function()->IsJSFunction())
return false;
236 return (script->IsScript() &&
244 bool SafeStackFrameIterator::ExitFrameValidator::IsValidFP(
Address fp) {
245 if (!validator_.IsValid(fp))
return false;
247 if (!validator_.IsValid(sp))
return false;
248 StackFrame::State state;
250 if (!validator_.IsValid(reinterpret_cast<Address>(state.pc_address))) {
253 return *state.pc_address !=
NULL;
257 SafeStackFrameIterator::ActiveCountMaintainer::ActiveCountMaintainer(
259 : isolate_(isolate) {
260 isolate_->set_safe_stack_iterator_counter(
261 isolate_->safe_stack_iterator_counter() + 1);
265 SafeStackFrameIterator::ActiveCountMaintainer::~ActiveCountMaintainer() {
266 isolate_->set_safe_stack_iterator_counter(
267 isolate_->safe_stack_iterator_counter() - 1);
271 SafeStackFrameIterator::SafeStackFrameIterator(
274 maintainer_(isolate),
275 stack_validator_(low_bound, high_bound),
276 is_valid_top_(IsValidTop(isolate, low_bound, high_bound)),
277 is_valid_fp_(IsWithinBounds(low_bound, high_bound, fp)),
278 is_working_iterator_(is_valid_top_ || is_valid_fp_),
279 iteration_done_(!is_working_iterator_),
280 iterator_(isolate, is_valid_top_, is_valid_fp_ ? fp :
NULL, sp) {
283 bool SafeStackFrameIterator::is_active(Isolate* isolate) {
284 return isolate->safe_stack_iterator_counter() > 0;
288 bool SafeStackFrameIterator::IsValidTop(Isolate* isolate,
290 ThreadLocalTop* top = isolate->thread_local_top();
292 ExitFrameValidator validator(low_bound, high_bound);
293 if (!validator.IsValidFP(fp))
return false;
298 void SafeStackFrameIterator::Advance() {
299 ASSERT(is_working_iterator_);
302 Address last_sp = last_frame->sp(), last_fp = last_frame->fp();
304 iteration_done_ = !IsValidFrame(last_frame) ||
305 !CanIterateHandles(last_frame, iterator_.handler()) ||
306 !IsValidCaller(last_frame);
307 if (iteration_done_)
return;
310 if (iterator_.done())
return;
313 iteration_done_ = prev_frame->sp() < last_sp || prev_frame->fp() < last_fp;
317 bool SafeStackFrameIterator::CanIterateHandles(
StackFrame* frame,
318 StackHandler* handler) {
322 return !is_valid_top_ || (frame->sp() <= handler->address());
326 bool SafeStackFrameIterator::IsValidFrame(
StackFrame* frame)
const {
327 return IsValidStackAddress(frame->sp()) && IsValidStackAddress(frame->fp());
331 bool SafeStackFrameIterator::IsValidCaller(
StackFrame* frame) {
332 StackFrame::State state;
333 if (frame->is_entry() || frame->is_entry_construct()) {
339 ExitFrameValidator validator(stack_validator_);
340 if (!validator.IsValidFP(caller_fp))
return false;
341 }
else if (frame->is_arguments_adaptor()) {
345 Object* number_of_args =
reinterpret_cast<ArgumentsAdaptorFrame*
>(frame)->
347 if (!number_of_args->IsSmi()) {
351 frame->ComputeCallerState(&state);
352 return IsValidStackAddress(state.sp) && IsValidStackAddress(state.fp) &&
353 iterator_.SingletonFor(frame->GetCallerState(&state)) !=
NULL;
357 void SafeStackFrameIterator::Reset() {
358 if (is_working_iterator_) {
360 iteration_done_ =
false;
372 if (!done() && !frame()->is_java_script())
Advance();
378 SafeJavaScriptFrameIterator::Advance();
380 if (frame()->is_java_script())
return;
385 Code* StackFrame::GetSafepointData(
Isolate* isolate,
387 SafepointEntry* safepoint_entry,
388 unsigned* stack_slots) {
402 *stack_slots = code->stack_slots();
407 bool StackFrame::HasHandler()
const {
408 StackHandlerIterator it(
this, top_handler());
414 static bool GcSafeCodeContains(HeapObject*
object,
Address addr);
418 void StackFrame::IteratePc(ObjectVisitor* v,
422 ASSERT(GcSafeCodeContains(holder, pc));
423 unsigned pc_offset =
static_cast<unsigned>(pc - holder->instruction_start());
425 v->VisitPointer(&code);
426 if (code != holder) {
427 holder =
reinterpret_cast<Code*
>(
code);
428 pc = holder->instruction_start() + pc_offset;
434 void StackFrame::SetReturnAddressLocationResolver(
436 ASSERT(return_address_location_resolver ==
NULL);
437 return_address_location_resolver = resolver;
441 StackFrame::Type StackFrame::ComputeType(Isolate* isolate, State* state) {
451 if (!marker->IsSmi()) {
456 if (SafeStackFrameIterator::is_active(isolate))
return JAVA_SCRIPT;
457 Code::Kind kind = GetContainingCode(isolate, *(state->pc_address))->kind();
458 ASSERT(kind == Code::FUNCTION || kind == Code::OPTIMIZED_FUNCTION);
459 return (kind == Code::OPTIMIZED_FUNCTION) ? OPTIMIZED : JAVA_SCRIPT;
466 StackFrame::Type StackFrame::GetCallerState(State* state)
const {
467 ComputeCallerState(state);
468 return ComputeType(isolate(), state);
472 Address StackFrame::UnpaddedFP()
const {
473 #if defined(V8_TARGET_ARCH_IA32)
474 if (!is_optimized())
return fp();
487 return HEAP->raw_unchecked_js_entry_code();
491 void EntryFrame::ComputeCallerState(State* state)
const {
492 GetCallerState(state);
502 StackFrame::Type EntryFrame::GetCallerState(State* state)
const {
510 return HEAP->raw_unchecked_js_construct_entry_code();
525 void ExitFrame::ComputeCallerState(State* state)
const {
527 state->sp = caller_sp();
529 state->pc_address = ResolveReturnAddressLocation(
542 IteratePc(v, pc_address(), LookupCode());
553 if (fp == 0)
return NONE;
564 state->pc_address = ResolveReturnAddressLocation(
593 return static_cast<int>((base - limit) / kPointerSize);
598 state->sp = caller_sp();
600 state->pc_address = ResolveReturnAddressLocation(
613 for (StackHandlerIterator it(
this, top_handler()); !it.done(); it.Advance()) {
614 if (it.handler()->includes(address))
return true;
623 StackHandlerIterator it(
this, top_handler());
629 ASSERT(!SafeStackFrameIterator::is_active(isolate()));
632 unsigned stack_slots = 0;
633 SafepointEntry safepoint_entry;
634 Code* code = StackFrame::GetSafepointData(
635 isolate(),
pc(), &safepoint_entry, &stack_slots);
644 if (safepoint_entry.argument_count() > 0) {
645 v->VisitPointers(parameters_base,
646 parameters_base + safepoint_entry.argument_count());
647 parameters_base += safepoint_entry.argument_count();
651 if (safepoint_entry.has_doubles()) {
657 if (safepoint_entry.HasRegisters()) {
659 if (safepoint_entry.HasRegisterAt(i)) {
660 int reg_stack_index = MacroAssembler::SafepointRegisterStackIndex(i);
661 v->VisitPointer(parameters_base + reg_stack_index);
669 uint8_t* safepoint_bits = safepoint_entry.bits();
673 v->VisitPointers(parameters_base, parameters_limit);
676 for (
unsigned index = 0; index < stack_slots; index++) {
679 if ((safepoint_bits[byte_index] & (1
U << bit_index)) != 0) {
680 v->VisitPointer(parameters_limit + index);
688 v->VisitPointers(fixed_base, fixed_limit);
691 IteratePc(v, pc_address(), code);
717 return function->unchecked_code();
722 ASSERT(!SafeStackFrameIterator::is_active(isolate()) &&
726 return function->shared()->formal_parameter_count();
736 ASSERT(functions->length() == 0);
742 ASSERT(functions->length() == 0);
743 Code* code_pointer = LookupCode();
744 int offset =
static_cast<int>(
pc() - code_pointer->address());
750 functions->
Add(summary);
756 bool print_line_number) {
762 if (it.frame()->is_java_script()) {
767 if (maybe_fun->IsJSFunction()) {
774 PrintF(
"+%d", code_offset);
776 if (print_line_number) {
778 v8::internal::Isolate::Current()->heap()->FindCodeObject(pc));
780 Object* maybe_script = shared->script();
781 if (maybe_script->IsScript()) {
784 Object* script_name_raw = script->name();
785 if (script_name_raw->IsString()) {
790 PrintF(file,
" at %s:%d", *c_script_name, line);
792 PrintF(file,
" at <unknown>:%d", line);
795 PrintF(file,
" at <unknown>:<unknown>");
809 for (
int i = 0; i < length; i++) {
824 receiver_->ShortPrint();
826 function_->shared()->DebugName()->ShortPrint();
829 if (code_->kind() == Code::FUNCTION)
PrintF(
" NON-OPT");
830 if (code_->kind() == Code::OPTIMIZED_FUNCTION)
PrintF(
" OPT");
831 PrintF(
"\npc: %d\n", offset_);
835 JSFunction* OptimizedFrame::LiteralAt(FixedArray* literal_array,
837 if (literal_id == Translation::kSelfLiteralId) {
846 ASSERT(frames->length() == 0);
849 int deopt_index = Safepoint::kNoDeoptimizationIndex;
851 FixedArray* literal_array = data->LiteralArray();
858 if (deopt_index == Safepoint::kNoDeoptimizationIndex) {
863 TranslationIterator it(data->TranslationByteArray(),
864 data->TranslationIndex(deopt_index)->value());
866 ASSERT(opcode == Translation::BEGIN);
868 int jsframe_count = it.Next();
873 int i = jsframe_count;
876 if (opcode == Translation::JS_FRAME) {
879 JSFunction*
function = LiteralAt(literal_array, it.Next());
886 ASSERT(opcode == Translation::STACK_SLOT ||
887 opcode == Translation::LITERAL);
888 int index = it.Next();
892 if (opcode == Translation::LITERAL) {
893 receiver = data->LiteralArray()->
get(index);
905 int parameter_index = index + parameter_count;
906 receiver = (parameter_index == -1)
912 Code* code =
function->shared()->code();
922 FrameSummary summary(receiver,
function, code, pc_offset, is_constructor);
923 frames->
Add(summary);
924 is_constructor =
false;
925 }
else if (opcode == Translation::CONSTRUCT_STUB_FRAME) {
927 it.Skip(Translation::NumberOfOperandsFor(opcode));
929 is_constructor =
true;
932 it.Skip(Translation::NumberOfOperandsFor(opcode));
950 code = isolate()->inner_pointer_to_code_cache()->
951 GcSafeFindCodeForInnerPointer(
pc());
954 ASSERT(code->
kind() == Code::OPTIMIZED_FUNCTION);
957 *deopt_index = safepoint_entry.deoptimization_index();
958 ASSERT(*deopt_index != Safepoint::kNoDeoptimizationIndex);
967 int deopt_index = Safepoint::kNoDeoptimizationIndex;
970 TranslationIterator it(data->TranslationByteArray(),
971 data->TranslationIndex(deopt_index)->value());
973 ASSERT(opcode == Translation::BEGIN);
976 int jsframe_count = it.Next();
977 return jsframe_count;
982 ASSERT(functions->length() == 0);
985 int deopt_index = Safepoint::kNoDeoptimizationIndex;
987 FixedArray* literal_array = data->LiteralArray();
989 TranslationIterator it(data->TranslationByteArray(),
990 data->TranslationIndex(deopt_index)->value());
992 ASSERT(opcode == Translation::BEGIN);
994 int jsframe_count = it.Next();
998 while (jsframe_count > 0) {
1000 if (opcode == Translation::JS_FRAME) {
1003 JSFunction*
function = LiteralAt(literal_array, it.Next());
1005 functions->
Add(
function);
1008 it.Skip(Translation::NumberOfOperandsFor(opcode));
1032 return isolate()->builtins()->builtin(
1033 Builtins::kArgumentsAdaptorTrampoline);
1041 return reinterpret_cast<Code*
>(
code);
1048 accumulator->
Add((mode == OVERVIEW) ?
"%5d: " :
"[%d]: ", index);
1057 Object*
function = this->
function();
1060 PrintIndex(accumulator, mode, index);
1074 Object* script_obj = shared->script();
1075 if (script_obj->IsScript()) {
1077 accumulator->
Add(
" [");
1081 if (code !=
NULL && code->
kind() == Code::FUNCTION &&
1085 accumulator->
Add(
":%d", line);
1087 int function_start_pos = shared->start_position();
1089 accumulator->
Add(
":~%d", line);
1092 accumulator->
Add(
"] ");
1096 accumulator->
Add(
"(this=%o", receiver);
1100 for (
int i = 0; i < parameters_count; i++) {
1101 accumulator->
Add(
",");
1105 if (i < scope_info->ParameterCount()) {
1106 accumulator->
PrintName(scope_info->ParameterName(i));
1107 accumulator->
Add(
"=");
1112 accumulator->
Add(
")");
1113 if (mode == OVERVIEW) {
1114 accumulator->
Add(
"\n");
1117 if (is_optimized()) {
1118 accumulator->
Add(
" {\n// optimized frame\n}\n");
1121 accumulator->
Add(
" {\n");
1124 int stack_locals_count = scope_info->StackLocalCount();
1125 int heap_locals_count = scope_info->ContextLocalCount();
1129 if (stack_locals_count > 0) {
1130 accumulator->
Add(
" // stack-allocated locals\n");
1132 for (
int i = 0; i < stack_locals_count; i++) {
1133 accumulator->
Add(
" var ");
1134 accumulator->
PrintName(scope_info->StackLocalName(i));
1135 accumulator->
Add(
" = ");
1136 if (i < expressions_count) {
1139 accumulator->
Add(
"// no expression found - inconsistent frame?");
1141 accumulator->
Add(
"\n");
1151 if (heap_locals_count > 0) {
1152 accumulator->
Add(
" // heap-allocated locals\n");
1154 for (
int i = 0; i < heap_locals_count; i++) {
1155 accumulator->
Add(
" var ");
1156 accumulator->
PrintName(scope_info->ContextLocalName(i));
1157 accumulator->
Add(
" = ");
1158 if (context !=
NULL) {
1159 if (i < context->length()) {
1163 "// warning: missing context slot - inconsistent frame?");
1166 accumulator->
Add(
"// warning: no context found - inconsistent frame?");
1168 accumulator->
Add(
"\n");
1172 int expressions_start = stack_locals_count;
1173 if (expressions_start < expressions_count) {
1174 accumulator->
Add(
" // expression stack (top to bottom)\n");
1176 for (
int i = expressions_count - 1; i >= expressions_start; i--) {
1182 if (FLAG_max_stack_trace_source_length != 0 && code !=
NULL) {
1184 accumulator->
Add(
"--------- s o u r c e c o d e ---------\n");
1185 shared->
SourceCodePrint(accumulator, FLAG_max_stack_trace_source_length);
1186 accumulator->
Add(
"\n-----------------------------------------\n");
1189 accumulator->
Add(
"}\n\n");
1198 Object*
function = this->
function();
1203 PrintIndex(accumulator, mode, index);
1204 accumulator->
Add(
"arguments adaptor frame: %d->%d", actual, expected);
1205 if (mode == OVERVIEW) {
1206 accumulator->
Add(
"\n");
1209 accumulator->
Add(
" {\n");
1212 if (actual > 0) accumulator->
Add(
" // actual arguments\n");
1213 for (
int i = 0; i < actual; i++) {
1215 if (expected != -1 && i >= expected) {
1216 accumulator->
Add(
" // not passed to callee");
1218 accumulator->
Add(
"\n");
1221 accumulator->
Add(
"}\n\n");
1226 StackHandlerIterator it(
this, top_handler());
1228 StackHandler* handler = it.handler();
1229 ASSERT(handler->is_js_entry());
1230 handler->Iterate(v, LookupCode());
1237 IteratePc(v, pc_address(), LookupCode());
1245 for (StackHandlerIterator it(
this, top_handler()); !it.done(); it.Advance()) {
1246 StackHandler* handler = it.handler();
1250 const Address address = handler->address();
1251 v->VisitPointers(base, reinterpret_cast<Object**>(address));
1254 handler->Iterate(v, LookupCode());
1256 v->VisitPointers(base, limit);
1262 IteratePc(v, pc_address(), LookupCode());
1270 IteratePc(v, pc_address(), LookupCode());
1279 for (
int i = 0; i <= n; i++) {
1280 while (!iterator_.frame()->is_java_script()) iterator_.Advance();
1282 iterator_.Advance();
1292 static Map* GcSafeMapOfCodeSpaceObject(HeapObject*
object) {
1293 MapWord map_word =
object->
map_word();
1294 return map_word.IsForwardingAddress() ?
1295 map_word.ToForwardingAddress()->map() : map_word.ToMap();
1299 static int GcSafeSizeOfCodeSpaceObject(HeapObject*
object) {
1300 return object->SizeFromMap(GcSafeMapOfCodeSpaceObject(
object));
1305 static bool GcSafeCodeContains(HeapObject* code,
Address addr) {
1306 Map* map = GcSafeMapOfCodeSpaceObject(code);
1307 ASSERT(map == code->GetHeap()->code_map());
1308 Address start = code->address();
1309 Address end = code->address() + code->SizeFromMap(map);
1310 return start <= addr && addr < end;
1317 Code* code =
reinterpret_cast<Code*
>(object);
1318 ASSERT(code !=
NULL && GcSafeCodeContains(code, inner_pointer));
1328 if (large_page !=
NULL) {
1342 if (addr == top && addr != limit) {
1348 int obj_size = GcSafeSizeOfCodeSpaceObject(obj);
1349 Address next_addr = addr + obj_size;
1350 if (next_addr > inner_pointer)
return GcSafeCastToCode(obj, inner_pointer);
1358 isolate_->
counters()->pc_to_code()->Increment();
1361 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(inner_pointer)),
1362 v8::internal::kZeroHashSeed);
1363 uint32_t index = hash & (kInnerPointerToCodeCacheSize - 1);
1365 if (entry->inner_pointer == inner_pointer) {
1366 isolate_->
counters()->pc_to_code_cached()->Increment();
1374 entry->safepoint_entry.Reset();
1375 entry->inner_pointer = inner_pointer;
1384 return CompilerIntrinsics::CountSetBits(reglist);
1398 caller_saved_code_data.
reg_code[i++] = r;
1405 return caller_saved_code_data.
reg_code[n];
1409 #define DEFINE_WRAPPER(type, field) \
1410 class field##_Wrapper : public ZoneObject { \
1412 field##_Wrapper(const field& original) : frame_(original) { \
1417 #undef DEFINE_WRAPPER
1420 #define FRAME_TYPE_CASE(type, field) \
1421 case StackFrame::type: { \
1422 field##_Wrapper* wrapper = \
1423 new(zone) field##_Wrapper(*(reinterpret_cast<field*>(frame))); \
1424 return &wrapper->frame_; \
1427 switch (frame->type()) {
1431 #undef FRAME_TYPE_CASE
1437 for (StackFrameIterator it; !it.done(); it.Advance()) {
1438 StackFrame* frame = AllocateFrameCopy(it.frame(), zone);
1439 list.
Add(frame, zone);
virtual int GetNumberOfIncomingArguments() const
static const int kCallerFPOffset
static DeoptimizationOutputData * cast(Object *obj)
Object * function() const
static Object *& Object_at(Address addr)
static void FillState(Address fp, Address sp, State *state)
virtual Address GetCallerStackPointer() const
int GetArgumentsLength() const
void PrintF(const char *format,...)
Code * GcSafeCastToCode(HeapObject *object, Address inner_pointer)
static String * cast(Object *obj)
#define FRAME_TYPE_CASE(type, field)
void SourceCodePrint(StringStream *accumulator, int max_length)
static Type GetStateForFramePointer(Address fp, State *state)
virtual int GetInlineCount()
virtual Code * unchecked_code() const
int NumRegs(RegList reglist)
static MemoryChunk * FromAddress(Address a)
static bool IsArgumentsAdaptorFrame(Address fp)
Address GetExpressionAddress(int n) const
void PrintSecurityTokenIfChanged(Object *function)
Address caller_fp() const
static const int kNumAllocatableRegisters
virtual void Summarize(List< FrameSummary > *frames)
Object * GetExpression(int index) const
virtual void SetCallerFp(Address caller_fp)
const int kBitsPerByteLog2
static Address handler(ThreadLocalTop *thread)
Object *& code_slot() const
int reg_code[kNumJSCallerSaved]
static const int kCallerSPOffset
#define ASSERT(condition)
v8::Handle< v8::Value > Print(const v8::Arguments &args)
const RegList kJSCallerSaved
int ComputeExpressionsCount() const
static Script * cast(Object *obj)
int SourcePosition(Address pc)
virtual Code * unchecked_code() const
void IterateExpressions(ObjectVisitor *v) const
static Context * cast(Object *context)
Vector< StackFrame * > CreateStackMap(Zone *zone)
virtual void ComputeCallerState(State *state) const
int ComputeParametersCount() const
static Code * cast(Object *obj)
const int kAlignmentPaddingPushed
virtual void GetFunctions(List< JSFunction * > *functions)
static Smi * cast(Object *object)
#define STACK_FRAME_TYPE_LIST(V)
void Add(Vector< const char > format, Vector< FmtElm > elms)
int JSCallerSavedCode(int n)
SmartArrayPointer< char > ToCString(AllowNullsFlag allow_nulls, RobustnessFlag robustness_flag, int offset, int length, int *length_output=0)
virtual void Iterate(ObjectVisitor *v) const
Object * receiver() const
virtual Code * unchecked_code() const
HANDLE HANDLE LPSTACKFRAME64 StackFrame
static const int kCallerPCOffset
virtual Address GetCallerStackPointer() const
static void PrintTop(FILE *file, bool print_args, bool print_line_number)
DeoptimizationInputData * GetDeoptimizationData(int *deopt_index)
bool IsConstructor() const
LargePage * FindPage(Address a)
static Address c_entry_fp(ThreadLocalTop *thread)
virtual void Iterate(ObjectVisitor *v) const
StackHandler * handler() const
static Address ComputePCAddress(Address fp)
static const int kCallerFPOffset
Vector< T > ToVector() const
byte * instruction_start()
static Address & Address_at(Address addr)
uintptr_t(* ReturnAddressLocationResolver)(uintptr_t return_addr_location)
static int32_t & int32_at(Address addr)
static const int kExpressionsOffset
static unsigned decode(uint32_t value)
static const int kDynamicAlignmentStateOffset
virtual void Print(StringStream *accumulator, PrintMode mode, int index) const
const int kNumJSCallerSaved
SafepointEntry GetSafepointEntry(Address pc)
int GetScriptLineNumberSafe(Handle< Script > script, int code_pos)
virtual void Summarize(List< FrameSummary > *frames)
JavaScriptFrameIteratorTemp< SafeStackFrameIterator > SafeJavaScriptFrameIterator
virtual Code * unchecked_code() const
static int GetOutputInfo(DeoptimizationOutputData *data, BailoutId node_id, SharedFunctionInfo *shared)
static JavaScriptFrame * cast(StackFrame *frame)
LargeObjectSpace * lo_space()
virtual void Iterate(ObjectVisitor *v) const
static ScopeInfo * Empty()
virtual void Iterate(ObjectVisitor *v) const
SafeStackTraceFrameIterator(Isolate *isolate, Address fp, Address sp, Address low_bound, Address high_bound)
virtual void SetCallerFp(Address caller_fp)
static const int kCallerSPDisplacement
virtual Code * unchecked_code() const
virtual int GetNumberOfIncomingArguments() const
InnerPointerToCodeCache * inner_pointer_to_code_cache()
static Address ComputeStackPointer(Address fp)
void SetUpJSCallerSavedCodeData()
uint32_t ComputeIntegerHash(uint32_t key, uint32_t seed)
JavaScriptFrameIteratorTemp< StackFrameIterator > JavaScriptFrameIterator
static const int kCallerFPOffset
InnerPointerToCodeCacheEntry * GetCacheEntry(Address inner_pointer)
virtual void GetFunctions(List< JSFunction * > *functions)
const int kNumSafepointRegisters
void PrintName(Object *o)
static const int kContextOffset
static const int kFunctionOffset
virtual void Iterate(ObjectVisitor *v) const
static const int kHeaderSize
virtual Address GetCallerStackPointer() const
void PrintFunction(Object *function, Object *receiver, Code **code)
bool IsExpressionInsideHandler(int n) const
static HeapObject * FromAddress(Address address)
virtual void Print(StringStream *accumulator, PrintMode mode, int index) const
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination use dead code elimination trace on stack replacement optimize closures cache optimized code for closures functions with arguments object loop weight for representation inference allow uint32 values on optimize frames if they are used only in safe operations track parallel recompilation enable all profiler experiments number of stack frames inspected by the profiler call recompile stub directly when self optimizing trigger profiler ticks based on counting instead of timing weight back edges by jump distance for interrupt triggering percentage of ICs that must have type info to allow optimization watch_ic_patching retry_self_opt interrupt_at_exit extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of SAHF instruction if enable use of VFP3 instructions if available this implies enabling ARMv7 and VFP2 enable use of VFP2 instructions if available enable use of SDIV and UDIV instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of MIPS FPU instructions if NULL
static bool IsConstructFrame(Address fp)
JSCallerSavedCodeData caller_saved_code_data
void Add(const T &element, AllocationPolicy allocator=AllocationPolicy())
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination use dead code elimination trace on stack replacement optimize closures cache optimized code for closures functions with arguments object loop weight for representation inference allow uint32 values on optimize frames if they are used only in safe operations track parallel recompilation enable all profiler experiments number of stack frames inspected by the profiler call recompile stub directly when self optimizing trigger profiler ticks based on counting instead of timing weight back edges by jump distance for interrupt triggering percentage of ICs that must have type info to allow optimization watch_ic_patching retry_self_opt interrupt_at_exit extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of SAHF instruction if enable use of VFP3 instructions if available this implies enabling ARMv7 and VFP2 enable use of VFP2 instructions if available enable use of SDIV and UDIV instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of MIPS FPU instructions if NULL
SafepointEntry safepoint_entry
StackHandlerIterator(const StackFrame *frame, StackHandler *handler)
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination use dead code elimination trace on stack replacement optimize closures cache optimized code for closures functions with arguments object loop weight for representation inference allow uint32 values on optimize frames if they are used only in safe operations track parallel recompilation enable all profiler experiments number of stack frames inspected by the profiler call recompile stub directly when self optimizing trigger profiler ticks based on counting instead of timing weight back edges by jump distance for interrupt triggering percentage of ICs that must have type info to allow optimization watch_ic_patching retry_self_opt interrupt_at_exit extra verbose compilation tracing generate extra code(assertions) for debugging") DEFINE_bool(code_comments
static const int kCodeOffset
#define DEFINE_WRAPPER(type, field)
#define INITIALIZE_SINGLETON(type, field)
static const int kMarkerOffset
Code * GcSafeFindCodeForInnerPointer(Address inner_pointer)
virtual void SetCallerFp(Address caller_fp)
Object * GetParameter(int index) const
bool has_adapted_arguments() const
Address StartFor(Address addr)
static const int kCodeOffset
virtual Address GetCallerStackPointer() const
virtual Code * unchecked_code() const
static JSFunction * cast(Object *obj)