46 StackFrame::return_address_location_resolver_ =
NULL;
54 : limit_(frame->
fp()), handler_(handler) {
56 ASSERT(frame->sp() <= handler->address());
59 StackHandler*
handler()
const {
return handler_; }
62 return handler_ ==
NULL || handler_->address() > limit_;
66 handler_ = handler_->next();
71 StackHandler* handler_;
78 #define INITIALIZE_SINGLETON(type, field) field##_(this),
79 StackFrameIteratorBase::StackFrameIteratorBase(Isolate* isolate,
80 bool can_access_heap_objects)
84 can_access_heap_objects_(can_access_heap_objects) {
86 #undef INITIALIZE_SINGLETON
89 StackFrameIterator::StackFrameIterator(
Isolate* isolate)
90 : StackFrameIteratorBase(isolate,
true) {
96 : StackFrameIteratorBase(isolate,
true) {
107 StackFrame::State state;
111 StackHandlerIterator it(frame_, handler_);
112 while (!it.done()) it.Advance();
113 handler_ = it.handler();
116 frame_ = SingletonFor(type, &state);
124 void StackFrameIterator::Reset(ThreadLocalTop* top) {
125 StackFrame::State state;
129 if (SingletonFor(type) ==
NULL)
return;
130 frame_ = SingletonFor(type, &state);
135 StackFrame::State* state) {
139 result->state_ = *state;
145 #define FRAME_TYPE_CASE(type, field) \
146 case StackFrame::type: result = &field##_; break;
156 #undef FRAME_TYPE_CASE
163 JavaScriptFrameIterator::JavaScriptFrameIterator(
164 Isolate* isolate, StackFrame::Id
id)
165 : iterator_(isolate) {
168 if (
frame()->
id() ==
id)
return;
173 void JavaScriptFrameIterator::Advance() {
176 }
while (!iterator_.done() && !iterator_.frame()->is_java_script());
180 void JavaScriptFrameIterator::AdvanceToArgumentsFrame() {
181 if (!frame()->has_adapted_arguments())
return;
183 ASSERT(iterator_.frame()->is_arguments_adaptor());
191 : JavaScriptFrameIterator(isolate) {
192 if (!done() && !IsValidFrame())
Advance();
198 JavaScriptFrameIterator::Advance();
200 if (IsValidFrame())
return;
205 bool StackTraceFrameIterator::IsValidFrame() {
206 if (!frame()->
function()->IsJSFunction())
return false;
207 Object* script = frame()->function()->shared()->script();
209 return (script->IsScript() &&
220 : StackFrameIteratorBase(isolate,
false),
222 high_bound_(js_entry_sp),
224 external_callback_scope_(isolate->external_callback_scope()) {
225 StackFrame::State state;
228 if (IsValidTop(top)) {
230 top_frame_type_ = type;
231 }
else if (IsValidStackAddress(fp)) {
235 state.pc_address = StackFrame::ResolveReturnAddressLocation(
244 if (IsValidStackAddress(frame_marker)) {
245 type = StackFrame::ComputeType(
this, &state);
246 top_frame_type_ = type;
250 type = StackFrame::JAVA_SCRIPT;
257 if (SingletonFor(type) ==
NULL)
return;
258 frame_ = SingletonFor(type, &state);
259 if (frame_ ==
NULL)
return;
263 if (frame_ !=
NULL && !frame_->is_exit() &&
264 external_callback_scope_ !=
NULL &&
265 external_callback_scope_->scope_address() < frame_->fp()) {
268 external_callback_scope_ = external_callback_scope_->previous();
273 bool SafeStackFrameIterator::IsValidTop(ThreadLocalTop* top)
const {
275 if (!IsValidExitFrame(c_entry_fp))
return false;
278 if (handler ==
NULL)
return false;
280 return c_entry_fp < handler;
284 void SafeStackFrameIterator::AdvanceOneFrame() {
287 Address last_sp = last_frame->sp(), last_fp = last_frame->fp();
289 if (!IsValidFrame(last_frame) || !IsValidCaller(last_frame)) {
295 StackFrame::State state;
297 frame_ = SingletonFor(type, &state);
298 if (frame_ ==
NULL)
return;
301 if (frame_->sp() < last_sp || frame_->fp() < last_fp) {
307 bool SafeStackFrameIterator::IsValidFrame(
StackFrame* frame)
const {
308 return IsValidStackAddress(frame->sp()) && IsValidStackAddress(frame->fp());
312 bool SafeStackFrameIterator::IsValidCaller(
StackFrame* frame) {
313 StackFrame::State state;
314 if (frame->is_entry() || frame->is_entry_construct()) {
320 if (!IsValidExitFrame(caller_fp))
return false;
321 }
else if (frame->is_arguments_adaptor()) {
325 Object* number_of_args =
reinterpret_cast<ArgumentsAdaptorFrame*
>(
frame)->
327 if (!number_of_args->IsSmi()) {
331 frame->ComputeCallerState(&state);
332 return IsValidStackAddress(state.sp) && IsValidStackAddress(state.fp) &&
333 SingletonFor(frame->GetCallerState(&state)) !=
NULL;
337 bool SafeStackFrameIterator::IsValidExitFrame(
Address fp)
const {
338 if (!IsValidStackAddress(fp))
return false;
340 if (!IsValidStackAddress(sp))
return false;
341 StackFrame::State state;
343 if (!IsValidStackAddress(reinterpret_cast<Address>(state.pc_address))) {
346 return *state.pc_address !=
NULL;
354 if (frame_->is_java_script())
return;
355 if (frame_->is_exit() && external_callback_scope_) {
361 if (external_callback_scope_->scope_address() < frame_->fp()) {
363 external_callback_scope_->callback_address();
364 if (*callback_address !=
NULL) {
365 frame_->state_.pc_address = callback_address;
367 external_callback_scope_ = external_callback_scope_->previous();
369 external_callback_scope_->scope_address() > frame_->fp());
380 Code* StackFrame::GetSafepointData(
Isolate* isolate,
382 SafepointEntry* safepoint_entry,
383 unsigned* stack_slots) {
397 *stack_slots = code->stack_slots();
402 bool StackFrame::HasHandler()
const {
403 StackHandlerIterator it(
this, top_handler());
409 static bool GcSafeCodeContains(HeapObject*
object,
Address addr);
413 void StackFrame::IteratePc(ObjectVisitor* v,
417 ASSERT(GcSafeCodeContains(holder, pc));
418 unsigned pc_offset =
static_cast<unsigned>(pc - holder->instruction_start());
420 v->VisitPointer(&code);
421 if (code != holder) {
422 holder =
reinterpret_cast<Code*
>(
code);
423 pc = holder->instruction_start() + pc_offset;
429 void StackFrame::SetReturnAddressLocationResolver(
431 ASSERT(return_address_location_resolver_ ==
NULL);
432 return_address_location_resolver_ = resolver;
436 StackFrame::Type StackFrame::ComputeType(
const StackFrameIteratorBase* iterator,
447 if (!marker->IsSmi()) {
452 if (!iterator->can_access_heap_objects_)
return JAVA_SCRIPT;
453 Code::Kind kind = GetContainingCode(iterator->isolate(),
454 *(state->pc_address))->kind();
455 ASSERT(kind == Code::FUNCTION || kind == Code::OPTIMIZED_FUNCTION);
456 return (kind == Code::OPTIMIZED_FUNCTION) ? OPTIMIZED : JAVA_SCRIPT;
463 bool StackFrame::can_access_heap_objects()
const {
464 return iterator_->can_access_heap_objects_;
470 ComputeCallerState(state);
471 return ComputeType(iterator_, state);
475 Address StackFrame::UnpaddedFP()
const {
476 #if V8_TARGET_ARCH_IA32
477 if (!is_optimized())
return fp();
490 return isolate()->
heap()->js_entry_code();
494 void EntryFrame::ComputeCallerState(State* state)
const {
495 GetCallerState(state);
513 return isolate()->
heap()->js_construct_entry_code();
528 void ExitFrame::ComputeCallerState(State* state)
const {
530 state->sp = caller_sp();
532 state->pc_address = ResolveReturnAddressLocation(
534 if (FLAG_enable_ool_constant_pool) {
535 state->constant_pool_address =
reinterpret_cast<Address*
>(
549 IteratePc(v, pc_address(), LookupCode());
551 if (FLAG_enable_ool_constant_pool) {
563 if (fp == 0)
return NONE;
579 state->pc_address = ResolveReturnAddressLocation(
581 state->constant_pool_address =
610 return static_cast<int>((base - limit) / kPointerSize);
615 state->sp = caller_sp();
617 state->pc_address = ResolveReturnAddressLocation(
619 state->constant_pool_address =
632 for (StackHandlerIterator it(
this, top_handler()); !it.done(); it.Advance()) {
633 if (it.handler()->includes(address))
return true;
642 ASSERT(can_access_heap_objects());
645 unsigned stack_slots = 0;
646 SafepointEntry safepoint_entry;
647 Code* code = StackFrame::GetSafepointData(
648 isolate(),
pc(), &safepoint_entry, &stack_slots);
657 if (safepoint_entry.argument_count() > 0) {
658 v->VisitPointers(parameters_base,
659 parameters_base + safepoint_entry.argument_count());
660 parameters_base += safepoint_entry.argument_count();
664 if (safepoint_entry.has_doubles()) {
672 if (safepoint_entry.HasRegisters()) {
674 if (safepoint_entry.HasRegisterAt(i)) {
675 int reg_stack_index = MacroAssembler::SafepointRegisterStackIndex(i);
676 v->VisitPointer(parameters_base + reg_stack_index);
684 uint8_t* safepoint_bits = safepoint_entry.bits();
688 v->VisitPointers(parameters_base, parameters_limit);
691 for (
unsigned index = 0; index < stack_slots; index++) {
694 if ((safepoint_bits[byte_index] & (1
U << bit_index)) != 0) {
695 v->VisitPointer(parameters_limit + index);
700 IteratePc(v, pc_address(), code);
707 v->VisitPointers(fixed_base, fixed_limit);
734 StackHandlerIterator it(
this, top_handler());
768 return function()->
code();
773 ASSERT(can_access_heap_objects() &&
776 return function()->shared()->formal_parameter_count();
786 ASSERT(functions->length() == 0);
787 functions->
Add(
function());
792 ASSERT(functions->length() == 0);
793 Code* code_pointer = LookupCode();
794 int offset =
static_cast<int>(
pc() - code_pointer->address());
800 functions->
Add(summary);
807 bool print_line_number) {
811 JavaScriptFrameIterator it(isolate);
813 if (it.frame()->is_java_script()) {
823 PrintF(
"+%d", code_offset);
825 if (print_line_number) {
828 Object* maybe_script = shared->script();
829 if (maybe_script->IsScript()) {
832 Object* script_name_raw = script->name();
833 if (script_name_raw->IsString()) {
838 PrintF(file,
" at %s:%d", c_script_name.get(), line);
840 PrintF(file,
" at <unknown>:%d", line);
843 PrintF(file,
" at <unknown>:<unknown>");
854 for (
int i = 0; i < length; i++) {
868 int* stack_handler_index)
const {
869 int operands_count = store->
length();
875 StackHandlerIterator it(
this, top_handler());
876 int i = operands_count - 1;
877 *stack_handler_index = -1;
878 for (; !it.done(); it.Advance()) {
879 StackHandler* handler = it.handler();
887 handler->Unwind(isolate(), store, next_stack_handler_index,
888 *stack_handler_index);
889 *stack_handler_index = next_stack_handler_index;
894 for (; i >= 0; i--) {
901 int stack_handler_index) {
902 int operands_count = store->
length();
905 while (i <= stack_handler_index) {
906 if (i < stack_handler_index) {
919 StackHandler *handler =
921 stack_handler_index = handler->Rewind(isolate(), store, i,
fp());
926 for (; i < operands_count; i++) {
935 receiver_->ShortPrint();
937 function_->shared()->DebugName()->ShortPrint();
940 if (code_->kind() == Code::FUNCTION)
PrintF(
" NON-OPT");
941 if (code_->kind() == Code::OPTIMIZED_FUNCTION)
PrintF(
" OPT");
942 PrintF(
"\npc: %d\n", offset_);
946 JSFunction* OptimizedFrame::LiteralAt(FixedArray* literal_array,
948 if (literal_id == Translation::kSelfLiteralId) {
957 ASSERT(frames->length() == 0);
960 int deopt_index = Safepoint::kNoDeoptimizationIndex;
962 FixedArray* literal_array = data->LiteralArray();
969 if (deopt_index == Safepoint::kNoDeoptimizationIndex) {
974 TranslationIterator it(data->TranslationByteArray(),
975 data->TranslationIndex(deopt_index)->value());
977 ASSERT(opcode == Translation::BEGIN);
979 int jsframe_count = it.Next();
984 int i = jsframe_count;
987 if (opcode == Translation::JS_FRAME) {
990 JSFunction*
function = LiteralAt(literal_array, it.Next());
997 ASSERT(opcode == Translation::STACK_SLOT ||
998 opcode == Translation::LITERAL ||
999 opcode == Translation::CAPTURED_OBJECT ||
1000 opcode == Translation::DUPLICATED_OBJECT);
1001 int index = it.Next();
1005 if (opcode == Translation::LITERAL) {
1006 receiver = data->LiteralArray()->
get(index);
1007 }
else if (opcode == Translation::STACK_SLOT) {
1018 int parameter_index = index + parameter_count;
1019 receiver = (parameter_index == -1)
1028 receiver = isolate()->
heap()->undefined_value();
1031 Code* code =
function->shared()->code();
1037 unsigned pc_offset =
1041 FrameSummary summary(receiver,
function, code, pc_offset, is_constructor);
1042 frames->
Add(summary);
1043 is_constructor =
false;
1044 }
else if (opcode == Translation::CONSTRUCT_STUB_FRAME) {
1046 it.Skip(Translation::NumberOfOperandsFor(opcode));
1048 is_constructor =
true;
1051 it.Skip(Translation::NumberOfOperandsFor(opcode));
1070 GcSafeFindCodeForInnerPointer(
pc());
1073 ASSERT(code->
kind() == Code::OPTIMIZED_FUNCTION);
1076 *deopt_index = safepoint_entry.deoptimization_index();
1077 ASSERT(*deopt_index != Safepoint::kNoDeoptimizationIndex);
1086 int deopt_index = Safepoint::kNoDeoptimizationIndex;
1089 TranslationIterator it(data->TranslationByteArray(),
1090 data->TranslationIndex(deopt_index)->value());
1092 ASSERT(opcode == Translation::BEGIN);
1095 int jsframe_count = it.Next();
1096 return jsframe_count;
1101 ASSERT(functions->length() == 0);
1104 int deopt_index = Safepoint::kNoDeoptimizationIndex;
1106 FixedArray* literal_array = data->LiteralArray();
1108 TranslationIterator it(data->TranslationByteArray(),
1109 data->TranslationIndex(deopt_index)->value());
1111 ASSERT(opcode == Translation::BEGIN);
1113 int jsframe_count = it.Next();
1117 while (jsframe_count > 0) {
1119 if (opcode == Translation::JS_FRAME) {
1122 JSFunction*
function = LiteralAt(literal_array, it.Next());
1124 functions->
Add(
function);
1127 it.Skip(Translation::NumberOfOperandsFor(opcode));
1152 Builtins::kArgumentsAdaptorTrampoline);
1160 return reinterpret_cast<Code*
>(
code);
1167 accumulator->
Add((mode == OVERVIEW) ?
"%5d: " :
"[%d]: ", index);
1179 PrintIndex(accumulator, mode, index);
1192 Object* script_obj = shared->script();
1193 if (script_obj->IsScript()) {
1195 accumulator->
Add(
" [");
1199 if (code !=
NULL && code->
kind() == Code::FUNCTION &&
1203 accumulator->
Add(
":%d", line);
1205 int function_start_pos = shared->start_position();
1207 accumulator->
Add(
":~%d", line);
1210 accumulator->
Add(
"] ");
1213 accumulator->
Add(
"(this=%o", receiver);
1217 for (
int i = 0; i < parameters_count; i++) {
1218 accumulator->
Add(
",");
1222 if (i < scope_info->ParameterCount()) {
1223 accumulator->
PrintName(scope_info->ParameterName(i));
1224 accumulator->
Add(
"=");
1229 accumulator->
Add(
")");
1230 if (mode == OVERVIEW) {
1231 accumulator->
Add(
"\n");
1234 if (is_optimized()) {
1235 accumulator->
Add(
" {\n// optimized frame\n}\n");
1238 accumulator->
Add(
" {\n");
1241 int stack_locals_count = scope_info->StackLocalCount();
1242 int heap_locals_count = scope_info->ContextLocalCount();
1246 if (stack_locals_count > 0) {
1247 accumulator->
Add(
" // stack-allocated locals\n");
1249 for (
int i = 0; i < stack_locals_count; i++) {
1250 accumulator->
Add(
" var ");
1251 accumulator->
PrintName(scope_info->StackLocalName(i));
1252 accumulator->
Add(
" = ");
1253 if (i < expressions_count) {
1256 accumulator->
Add(
"// no expression found - inconsistent frame?");
1258 accumulator->
Add(
"\n");
1268 if (heap_locals_count > 0) {
1269 accumulator->
Add(
" // heap-allocated locals\n");
1271 for (
int i = 0; i < heap_locals_count; i++) {
1272 accumulator->
Add(
" var ");
1273 accumulator->
PrintName(scope_info->ContextLocalName(i));
1274 accumulator->
Add(
" = ");
1275 if (context !=
NULL) {
1276 if (i < context->length()) {
1280 "// warning: missing context slot - inconsistent frame?");
1283 accumulator->
Add(
"// warning: no context found - inconsistent frame?");
1285 accumulator->
Add(
"\n");
1289 int expressions_start = stack_locals_count;
1290 if (expressions_start < expressions_count) {
1291 accumulator->
Add(
" // expression stack (top to bottom)\n");
1293 for (
int i = expressions_count - 1; i >= expressions_start; i--) {
1299 if (FLAG_max_stack_trace_source_length != 0 && code !=
NULL) {
1301 accumulator->
Add(
"--------- s o u r c e c o d e ---------\n");
1302 shared->
SourceCodePrint(accumulator, FLAG_max_stack_trace_source_length);
1303 accumulator->
Add(
"\n-----------------------------------------\n");
1306 accumulator->
Add(
"}\n\n");
1316 expected =
function->shared()->formal_parameter_count();
1318 PrintIndex(accumulator, mode, index);
1319 accumulator->
Add(
"arguments adaptor frame: %d->%d", actual, expected);
1320 if (mode == OVERVIEW) {
1321 accumulator->
Add(
"\n");
1324 accumulator->
Add(
" {\n");
1327 if (actual > 0) accumulator->
Add(
" // actual arguments\n");
1328 for (
int i = 0; i < actual; i++) {
1330 if (expected != -1 && i >= expected) {
1331 accumulator->
Add(
" // not passed to callee");
1333 accumulator->
Add(
"\n");
1336 accumulator->
Add(
"}\n\n");
1341 StackHandlerIterator it(
this, top_handler());
1343 StackHandler* handler = it.handler();
1344 ASSERT(handler->is_js_entry());
1345 handler->Iterate(v, LookupCode());
1352 IteratePc(v, pc_address(), LookupCode());
1360 for (StackHandlerIterator it(
this, top_handler()); !it.done(); it.Advance()) {
1361 StackHandler* handler = it.handler();
1365 const Address address = handler->address();
1366 v->VisitPointers(base, reinterpret_cast<Object**>(address));
1369 handler->Iterate(v, LookupCode());
1371 v->VisitPointers(base, limit);
1377 IteratePc(v, pc_address(), LookupCode());
1385 IteratePc(v, pc_address(), LookupCode());
1393 v->VisitPointers(base, limit);
1397 v->VisitPointers(base, limit);
1398 IteratePc(v, pc_address(), LookupCode());
1410 FindCodeInCache(&trampoline, isolate());
1416 FindCodeInCache(&trampoline, isolate());
1431 for (
int i = 0; i <= n; i++) {
1432 while (!iterator_.frame()->is_java_script()) iterator_.Advance();
1434 iterator_.Advance();
1444 static Map* GcSafeMapOfCodeSpaceObject(HeapObject*
object) {
1445 MapWord map_word =
object->
map_word();
1446 return map_word.IsForwardingAddress() ?
1447 map_word.ToForwardingAddress()->map() : map_word.ToMap();
1451 static int GcSafeSizeOfCodeSpaceObject(HeapObject*
object) {
1452 return object->SizeFromMap(GcSafeMapOfCodeSpaceObject(
object));
1457 static bool GcSafeCodeContains(HeapObject* code,
Address addr) {
1458 Map*
map = GcSafeMapOfCodeSpaceObject(code);
1459 ASSERT(map == code->GetHeap()->code_map());
1460 Address start = code->address();
1461 Address end = code->address() + code->SizeFromMap(map);
1462 return start <= addr && addr < end;
1469 Code* code =
reinterpret_cast<Code*
>(object);
1470 ASSERT(code !=
NULL && GcSafeCodeContains(code, inner_pointer));
1480 if (large_page !=
NULL) {
1494 if (addr == top && addr != limit) {
1500 int obj_size = GcSafeSizeOfCodeSpaceObject(obj);
1501 Address next_addr = addr + obj_size;
1502 if (next_addr > inner_pointer)
return GcSafeCastToCode(obj, inner_pointer);
1510 isolate_->
counters()->pc_to_code()->Increment();
1513 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(inner_pointer)),
1514 v8::internal::kZeroHashSeed);
1515 uint32_t index = hash & (kInnerPointerToCodeCacheSize - 1);
1517 if (entry->inner_pointer == inner_pointer) {
1518 isolate_->
counters()->pc_to_code_cached()->Increment();
1526 entry->safepoint_entry.Reset();
1527 entry->inner_pointer = inner_pointer;
1536 void StackHandler::Unwind(
Isolate* isolate,
1539 int previous_handler_offset)
const {
1548 array->
set(offset + 1, *code_address());
1550 array->
set(offset + 3, *context_address());
1557 int StackHandler::Rewind(
Isolate* isolate,
1564 Smi* prev_handler_offset =
Smi::cast(array->get(offset));
1565 Code* code =
Code::cast(array->get(offset + 1));
1566 Smi* smi_index =
Smi::cast(array->get(offset + 2));
1567 Object* context = array->get(offset + 3);
1568 Smi* smi_kind =
Smi::cast(array->get(offset + 4));
1570 unsigned state = KindField::encode(static_cast<Kind>(smi_kind->value())) |
1571 IndexField::encode(static_cast<unsigned>(smi_index->value()));
1574 *isolate->handler_address();
1581 *isolate->handler_address() = address();
1583 return prev_handler_offset->value();
1604 caller_saved_code_data.
reg_code[i++] = r;
1612 return caller_saved_code_data.
reg_code[n];
1616 #define DEFINE_WRAPPER(type, field) \
1617 class field##_Wrapper : public ZoneObject { \
1619 field##_Wrapper(const field& original) : frame_(original) { \
1624 #undef DEFINE_WRAPPER
1627 #define FRAME_TYPE_CASE(type, field) \
1628 case StackFrame::type: { \
1629 field##_Wrapper* wrapper = \
1630 new(zone) field##_Wrapper(*(reinterpret_cast<field*>(frame))); \
1631 return &wrapper->frame_; \
1634 switch (frame->type()) {
1638 #undef FRAME_TYPE_CASE
1646 StackFrame* frame = AllocateFrameCopy(it.frame(), zone);
1647 list.
Add(frame, zone);
virtual int GetNumberOfIncomingArguments() const
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter NULL
virtual Address GetCallerStackPointer() const
static const int kFPOffset
Code * builtin(Name name)
virtual Code * unchecked_code() const
static DeoptimizationOutputData * cast(Object *obj)
static Object *& Object_at(Address addr)
static void FillState(Address fp, Address sp, State *state)
virtual Address GetCallerStackPointer() const
static const int kStateOffset
void set(int index, Object *value)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths true
int GetArgumentsLength() const
void PrintF(const char *format,...)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf map
Code * GcSafeCastToCode(HeapObject *object, Address inner_pointer)
static String * cast(Object *obj)
static const int kCodeOffset
#define FRAME_TYPE_CASE(type, field)
void SourceCodePrint(StringStream *accumulator, int max_length)
static Smi * FromInt(int value)
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 Address ComputeConstantPoolAddress(Address fp)
Address GetParameterSlot(int index) const
static bool IsArgumentsAdaptorFrame(Address fp)
Address GetExpressionAddress(int n) const
void PrintSecurityTokenIfChanged(Object *function)
void RestoreOperandStack(FixedArray *store, int stack_handler_index)
void SaveOperandStack(FixedArray *store, int *stack_handler_index) const
kSerializedDataOffset Object
Address caller_fp() const
TypeImpl< ZoneTypeConfig > Type
Vector< StackFrame * > CreateStackMap(Isolate *isolate, Zone *zone)
static ScopeInfo * Empty(Isolate *isolate)
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]
StackFrameIterator(Isolate *isolate)
#define ASSERT(condition)
const RegList kJSCallerSaved
#define ASSERT_GE(v1, v2)
static const int kContextOffset
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)
static const int kNextOffset
static int NumAllocatableRegisters()
static const int kCallerFPOffset
virtual void ComputeCallerState(State *state) const
int ComputeParametersCount() const
static Code * cast(Object *obj)
const int kAlignmentPaddingPushed
Object * FindCodeObject(Address a)
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 CountSetBits(uint64_t value, int width)
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
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization 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 VFP3 instructions if available enable use of NEON instructions if 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 d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long mode(MIPS only)") DEFINE_string(expose_natives_as
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths true
virtual Address GetCallerStackPointer() const
DeoptimizationInputData * GetDeoptimizationData(int *deopt_index)
bool IsConstructor() const
LargePage * FindPage(Address a)
STATIC_ASSERT(sizeof(CPURegister)==sizeof(Register))
static Address c_entry_fp(ThreadLocalTop *thread)
StackFrame * frame() const
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 void PrintTop(Isolate *isolate, FILE *file, bool print_args, bool print_line_number)
static Address & Address_at(Address addr)
int ComputeOperandsCount() const
uintptr_t(* ReturnAddressLocationResolver)(uintptr_t return_addr_location)
void SetParameterValue(int index, Object *value) const
static int32_t & int32_at(Address addr)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra code(assertions) for debugging") DEFINE_bool(code_comments
static const int kCallerSPOffset
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)
#define ASSERT_LE(v1, v2)
virtual void Summarize(List< FrameSummary > *frames)
static const int kMarkerOffset
virtual void Iterate(ObjectVisitor *v) const
static Address ComputeStackPointer(Address fp)
virtual Code * unchecked_code() const
virtual Address GetCallerStackPointer() const
static const int kLastObjectOffset
static const int kExpressionsOffset
static int GetOutputInfo(DeoptimizationOutputData *data, BailoutId node_id, SharedFunctionInfo *shared)
static JavaScriptFrame * cast(StackFrame *frame)
LargeObjectSpace * lo_space()
StackTraceFrameIterator(Isolate *isolate)
virtual void Iterate(ObjectVisitor *v) const
static const int kSPOffset
virtual void Iterate(ObjectVisitor *v) const
virtual Code * unchecked_code() const
virtual void SetCallerFp(Address caller_fp)
static const int kCallerSPDisplacement
virtual Code * unchecked_code() const
void PrintName(FILE *out=stdout)
virtual int GetNumberOfIncomingArguments() const
InnerPointerToCodeCache * inner_pointer_to_code_cache()
void IterateCompiledFrame(ObjectVisitor *v) const
void SetUpJSCallerSavedCodeData()
uint32_t ComputeIntegerHash(uint32_t key, uint32_t seed)
static const int kCallerFPOffset
InnerPointerToCodeCacheEntry * GetCacheEntry(Address inner_pointer)
static const int kContextOffset
virtual void GetFunctions(List< JSFunction * > *functions)
const int kNumSafepointRegisters
void PrintName(Object *o)
static const int kFunctionOffset
Object *& constant_pool_slot() const
Object * GetOperand(int index) const
virtual int GetNumberOfIncomingArguments() const
virtual void Iterate(ObjectVisitor *v) const
static const int kHeaderSize
void ShortPrint(FILE *out=stdout)
virtual Address GetCallerStackPointer() const
#define ASSERT_EQ(v1, v2)
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
static bool IsConstructFrame(Address fp)
StackFrame * frame() const
void Print(const v8::FunctionCallbackInfo< v8::Value > &args)
JSCallerSavedCodeData caller_saved_code_data
void Add(const T &element, AllocationPolicy allocator=AllocationPolicy())
static const int kFirstRegisterParameterFrameOffset
SafepointEntry safepoint_entry
Address GetOperandSlot(int index) const
static unsigned decode(uint32_tvalue)
StackHandlerIterator(const StackFrame *frame, StackHandler *handler)
static uintptr_t & uintptr_at(Address addr)
static const int kCodeOffset
static const int kSlotCount
#define DEFINE_WRAPPER(type, field)
#define INITIALIZE_SINGLETON(type, field)
Code * GcSafeFindCodeForInnerPointer(Address inner_pointer)
virtual void SetCallerFp(Address caller_fp)
SafeStackFrameIterator(Isolate *isolate, Address fp, Address sp, Address js_entry_sp)
ThreadLocalTop * thread_local_top()
virtual void Iterate(ObjectVisitor *v) const
Object * GetParameter(int index) const
static const int kConstantPoolOffset
bool has_adapted_arguments() const
Address * handler_address()
Address StartFor(Address addr)
JSFunction * function() const
static const int kCodeOffset
virtual Address GetCallerStackPointer() const
virtual Code * unchecked_code() const
static JSFunction * cast(Object *obj)