51 for (
int i = 0;
i < array_size;
i++) {
138 }
else if (res1 < res2) {
246 for (
int i = 0;
i < len;
i++) {
247 if (
s1->Get(
i + pos1) !=
s2->Get(
i + pos2)) {
273 static int min(
int a,
int b) {
274 return a < b ? a : b;
285 int common_prefix_len;
286 int common_suffix_len;
289 common_prefix_len = 0;
290 int prefix_limit =
min(len1, len2);
291 while (common_prefix_len < prefix_limit &&
292 input->
Equals(common_prefix_len, common_prefix_len)) {
296 common_suffix_len = 0;
297 int suffix_limit =
min(len1 - common_prefix_len, len2 - common_prefix_len);
299 while (common_suffix_len < suffix_limit &&
300 input->
Equals(len1 - common_suffix_len - 1,
301 len2 - common_suffix_len - 1)) {
306 if (common_prefix_len > 0 || common_suffix_len > 0) {
307 int new_len1 = len1 - common_suffix_len - common_prefix_len;
308 int new_len2 = len2 - common_suffix_len - common_prefix_len;
330 void WriteChunk(
int char_pos1,
int char_pos2,
int char_len1,
int char_len2) {
387 int offset1,
int offset2)
391 void AddChunk(
int pos1,
int pos2,
int len1,
int len2) {
438 return Smi::cast(
ends_array_->get(index))->value() + 1;
468 int len1 = line_end1 - line_start1;
469 int len2 = line_end2 - line_start2;
509 void AddChunk(
int line_pos1,
int line_pos2,
int line_len1,
int line_len2) {
523 s2_, char_pos2, char_len2);
584 Isolate* isolate =
object->GetIsolate();
588 result->set_value(*
object);
595 Object* shared = jsValue->value();
596 CHECK(shared->IsSharedFunctionInfo());
602 Object* length = array->length();
603 CHECK(length->IsSmi());
604 return Smi::cast(length)->value();
647 CHECK(raw_result->IsCode());
655 if (element->IsJSValue()) {
710 fun->end_position(), fun->parameter_count(),
711 fun->materialized_literal_count(),
743 if (!shared->IsSharedFunctionInfo()) {
765 int scope_info_length = 0;
770 Scope* current_scope = scope;
771 while (current_scope !=
NULL) {
779 for (
int i = 0;
i < context_list.length();
i++) {
782 context_list[
i]->
name());
799 return scope_info_list;
845 Isolate* isolate = script->GetIsolate();
850 script->set_source(*source);
851 isolate->set_active_function_info_listener(&listener);
873 if (exception->IsJSObject() && !message_location.
script().is_null()) {
876 Factory* factory = isolate->
factory();
898 isolate->set_active_function_info_listener(
NULL);
899 script->set_source(*original_source);
901 if (rethrow_exception.
is_null()) {
910 Isolate* isolate = array->GetIsolate();
913 for (
int i = 0;
i < len;
i++) {
915 SharedFunctionInfo::cast(
919 info_wrapper.
SetProperties(name_handle, info->start_position(),
920 info->end_position(), info);
936 for (
Object** p = start; p < end; p++) {
954 rinfo->set_target_address(substitution_entry);
976 Heap* heap = original->GetHeap();
977 HeapIterator iterator(heap);
990 for (
HeapObject* obj = iterator.next(); obj !=
NULL; obj = iterator.next()) {
991 obj->Iterate(&visitor);
1007 if (new_literal_count > 0) {
1010 int old_literal_count = shared_info->num_literals();
1012 if (old_literal_count == new_literal_count) {
1023 for (
int i = 0;
i < function_instances->length();
i++) {
1027 isolate->
factory()->NewFixedArray(new_literal_count);
1028 if (new_literal_count > 0) {
1030 if (old_literals->length() >
1040 fun->set_literals(*new_literals);
1043 shared_info->set_num_literals(new_literal_count);
1050 template<
typename Visitor>
1053 HeapIterator iterator(shared_info->GetHeap());
1055 obj = iterator.next()) {
1056 if (obj->IsJSFunction()) {
1057 JSFunction*
function = JSFunction::cast(obj);
1058 if (function->shared() == *shared_info) {
1059 visitor->visit(
function);
1070 count_visitor.
count = 0;
1120 return code->
kind() == Code::FUNCTION;
1128 if (function->code()->kind() != Code::OPTIMIZED_FUNCTION)
return false;
1131 DeoptimizationInputData::cast(function->code()->deoptimization_data());
1133 if (data == function->
GetIsolate()->
heap()->empty_fixed_array()) {
1139 int inlined_count = data->InlinedFunctionCount()->value();
1140 for (
int i = 0;
i < inlined_count; ++
i) {
1142 if (inlined->shared() == candidate)
return true;
1163 DCHECK(function->code()->kind() == Code::OPTIMIZED_FUNCTION);
1167 function->code()->set_marked_for_deoptimization(
true);
1190 Isolate* isolate = new_compile_info_array->GetIsolate();
1201 if (code_scope_info->IsFixedArray()) {
1202 shared_info->set_scope_info(ScopeInfo::cast(*code_scope_info));
1204 shared_info->DisableOptimization(kLiveEdit);
1211 if (shared_info->debug_info()->IsDebugInfo()) {
1215 debug_info->set_original_code(*new_original_code);
1220 shared_info->set_start_position(start_position);
1221 shared_info->set_end_position(end_position);
1225 shared_info->set_construct_stub(
1238 shared_info_array->GetIsolate()->compilation_cache()->Remove(shared_info);
1246 CHECK(script_handle->IsScript() || script_handle->IsUndefined());
1247 shared_info->set_script(*script_handle);
1249 function_wrapper->GetIsolate()->compilation_cache()->Remove(shared_info);
1264 int position_diff = 0;
1266 Isolate* isolate = position_change_array->GetIsolate();
1268 for (
int i = 0;
i < array_len;
i += 3) {
1271 isolate, position_change_array,
i).ToHandleChecked();
1272 CHECK(element->IsSmi());
1274 if (original_position < chunk_start) {
1278 isolate, position_change_array,
i + 1).ToHandleChecked();
1279 CHECK(element->IsSmi());
1282 DCHECK(original_position >= chunk_end);
1284 isolate, position_change_array,
i + 2).ToHandleChecked();
1285 CHECK(element->IsSmi());
1287 position_diff = chunk_changed_end - chunk_end;
1290 return original_position + position_diff;
1331 int new_buffer_size;
1333 new_buffer_size = 4 *
KB;
1344 byte* new_buffer = NewArray<byte>(new_buffer_size);
1347 int curently_used_size =
1349 MemMove(new_buffer + new_buffer_size - curently_used_size,
1353 new_buffer + new_buffer_size - curently_used_size,
1375 Isolate* isolate = code->GetIsolate();
1378 code->instruction_start());
1384 int position =
static_cast<int>(rinfo->
data());
1386 position_change_array);
1387 if (position != new_position) {
1389 buffer_writer.
Write(&info_copy);
1394 buffer_writer.
Write(it.rinfo());
1401 if (buffer.
length() == code->relocation_size()) {
1420 int old_function_start = info->start_position();
1422 position_change_array);
1424 position_change_array);
1425 int new_function_token_pos =
1428 info->set_start_position(new_function_start);
1429 info->set_end_position(new_function_end);
1430 info->set_function_token_position(new_function_token_pos);
1435 position_change_array);
1436 if (*patched_code != info->code()) {
1449 Isolate* isolate = original->GetIsolate();
1451 Handle<String> original_source(String::cast(original->source()));
1454 copy->set_name(original->name());
1455 copy->set_line_offset(original->line_offset());
1456 copy->set_column_offset(original->column_offset());
1457 copy->set_type(original->type());
1458 copy->set_context_data(original->context_data());
1459 copy->set_eval_from_shared(original->eval_from_shared());
1460 copy->set_eval_from_instructions_offset(
1461 original->eval_from_instructions_offset());
1464 copy->set_flags(original->flags());
1474 Isolate* isolate = original_script->GetIsolate();
1476 if (old_script_name->IsString()) {
1478 old_script->set_name(String::cast(*old_script_name));
1479 old_script_object = old_script;
1482 old_script_object = isolate->
factory()->null_value();
1485 original_script->set_source(*new_source);
1488 original_script->set_line_ends(isolate->
heap()->undefined_value());
1490 return old_script_object;
1509 if (it.rinfo()->target_object() == *orig_shared) {
1510 it.rinfo()->set_target_object(*subst_shared);
1523 if (!frame->is_java_script())
return false;
1527 Isolate* isolate = shared_info_array->GetIsolate();
1529 for (
int i = 0;
i < len;
i++) {
1537 if (function->shared() == *shared ||
IsInlined(*
function, *shared)) {
1552 Isolate::kHandlerAddress));
1554 while (*pointer_address < top_frame->
sp()) {
1557 Address* above_frame_address = pointer_address;
1558 while (*pointer_address < bottom_frame->
fp()) {
1561 bool change = *above_frame_address != *pointer_address;
1562 *above_frame_address = *pointer_address;
1582 DCHECK(bottom_js_frame->is_java_script());
1604 int top_frame_index,
1605 int bottom_js_frame_index,
1607 Object*** restarter_frame_function_pointer) {
1609 return "Stack manipulations are not supported in this architecture.";
1612 StackFrame* pre_top_frame = frames[top_frame_index - 1];
1613 StackFrame* top_frame = frames[top_frame_index];
1614 StackFrame* bottom_js_frame = frames[bottom_js_frame_index];
1616 DCHECK(bottom_js_frame->is_java_script());
1619 Isolate* isolate = bottom_js_frame->isolate();
1620 Code* pre_top_frame_code = pre_top_frame->LookupCode();
1621 bool frame_has_padding =
true;
1626 }
else if (pre_top_frame_code ==
1630 }
else if (pre_top_frame_code ==
1633 pre_top_frame = frames[top_frame_index - 2];
1634 top_frame = frames[top_frame_index - 1];
1636 frame_has_padding =
false;
1637 }
else if (pre_top_frame_code ==
1641 CodeStub::GetMajorKey(pre_top_frame_code) == CodeStub::CEntry) {
1648 frame_has_padding =
false;
1652 DCHECK(frames[top_frame_index - 2]->LookupCode() ==
1654 pre_top_frame = frames[top_frame_index - 3];
1655 top_frame = frames[top_frame_index - 2];
1657 frame_has_padding =
false;
1659 return "Unknown structure of stack above changing function";
1662 Address unused_stack_top = top_frame->sp();
1664 Address unused_stack_bottom = bottom_js_frame->fp()
1667 Address* top_frame_pc_address = top_frame->pc_address();
1672 if (unused_stack_top > unused_stack_bottom) {
1673 if (frame_has_padding) {
1674 int shortage_bytes =
1675 static_cast<int>(unused_stack_top - unused_stack_bottom);
1677 Address padding_start = pre_top_frame->fp() -
1680 Address padding_pointer = padding_start;
1685 int padding_counter =
1688 return "Not enough space for frame dropper frame "
1689 "(even with padding frame)";
1694 StackFrame* pre_pre_frame = frames[top_frame_index - 2];
1700 pre_top_frame->UpdateFp(pre_top_frame->fp() - shortage_bytes);
1701 pre_pre_frame->SetCallerFp(pre_top_frame->fp());
1702 unused_stack_top -= shortage_bytes;
1707 return "Not enough space for frame dropper frame";
1718 *top_frame_pc_address = code->entry();
1719 pre_top_frame->SetCallerFp(bottom_js_frame->fp());
1721 *restarter_frame_function_pointer =
1724 DCHECK((**restarter_frame_function_pointer)->IsJSFunction());
1726 for (
Address a = unused_stack_top;
1727 a < unused_stack_bottom;
1758 template<
typename TARGET>
1768 int top_frame_index = -1;
1769 int frame_index = 0;
1770 for (; frame_index < frames.
length(); frame_index++) {
1773 top_frame_index = frame_index;
1776 if (target.MatchActivation(
1780 return "Debugger mark-up on stack is not found";
1784 if (top_frame_index == -1) {
1786 return target.GetNotFoundMessage();
1789 bool target_frame_found =
false;
1790 int bottom_js_frame_index = top_frame_index;
1791 bool non_droppable_frame_found =
false;
1794 for (; frame_index < frames.
length(); frame_index++) {
1796 if (frame->is_exit()) {
1797 non_droppable_frame_found =
true;
1801 if (frame->is_java_script() &&
1803 non_droppable_frame_found =
true;
1807 if (target.MatchActivation(
1809 target_frame_found =
true;
1810 bottom_js_frame_index = frame_index;
1814 if (non_droppable_frame_found) {
1818 for (; frame_index < frames.
length(); frame_index++) {
1820 if (frame->is_java_script()) {
1821 if (target.MatchActivation(frame, non_droppable_reason)) {
1834 if (!target_frame_found) {
1836 return target.GetNotFoundMessage();
1840 Object** restarter_frame_function_pointer =
NULL;
1841 const char* error_message =
DropFrames(frames, top_frame_index,
1842 bottom_js_frame_index, &drop_mode,
1843 &restarter_frame_function_pointer);
1845 if (error_message !=
NULL) {
1846 return error_message;
1850 StackFrame::Id new_id = StackFrame::NO_ID;
1851 for (
int i = bottom_js_frame_index + 1;
i < frames.
length();
i++) {
1852 if (frames[
i]->type() == StackFrame::JAVA_SCRIPT) {
1853 new_id = frames[
i]->id();
1858 new_id, drop_mode, restarter_frame_function_pointer);
1870 shared_info_array->GetIsolate(), target, do_drop);
1875 Isolate* isolate = shared_info_array->GetIsolate();
1879 for (
int i = 0;
i < array_len;
i++) {
1895 Isolate* isolate = shared_info_array->GetIsolate();
1896 bool found_suspended_activations =
false;
1903 HeapIterator iterator(heap);
1905 while ((obj = iterator.next()) !=
NULL) {
1906 if (!obj->IsJSGeneratorObject())
continue;
1913 for (
int i = 0;
i < len;
i++) {
1919 if (gen->function()->shared() == *shared) {
1921 found_suspended_activations =
true;
1926 return found_suspended_activations;
1957 Isolate* isolate = shared_info_array->GetIsolate();
1960 DCHECK(shared_info_array->HasFastElements());
1962 FixedArray::cast(shared_info_array->elements()));
1969 for (
int i = 0;
i < len;
i++) {
1986 &inactive_threads_checker);
1992 const char* error_message =
1994 if (error_message !=
NULL) {
1997 isolate->
factory()->NewStringFromAsciiChecked(error_message);
2014 if (frame->fp() ==
m_frame->fp()) {
2021 return "Failed to found requested frame";
2038 frame->isolate(), target,
true);
2039 if (result !=
NULL) {
2043 return "Function is blocked under native code";
2046 return "Function is blocked under a generator activation";
2053 FunctionLiteral* fun)
2054 : isolate_(isolate) {
2055 if (
isolate_->active_function_info_listener() !=
NULL) {
2056 isolate_->active_function_info_listener()->FunctionStarted(fun);
2062 if (
isolate_->active_function_info_listener() !=
NULL) {
2063 isolate_->active_function_info_listener()->FunctionDone();
2071 if (
isolate_->active_function_info_listener() !=
NULL) {
2072 isolate_->active_function_info_listener()->FunctionInfo(info, lit->scope(),
2079 isolate_->active_function_info_listener()->FunctionCode(code);
2084 return isolate->active_function_info_listener() !=
NULL;
A single JavaScript stack frame.
An external exception handler.
void SetVerbose(bool value)
Set verbosity of the external exception handler.
Code * builtin(Name name)
static Code * GetCodeFromTargetAddress(Address address)
bool is_inline_cache_stub()
byte * instruction_start()
static Object * GetObjectFromEntryAddress(Address location_of_address)
virtual void AddChunk(int pos1, int pos2, int len1, int len2)=0
static void CalculateDifference(Input *input, Output *result_writer)
void WriteChunk(int char_pos1, int char_pos2, int char_len1, int char_len2)
CompareOutputArrayWriter(Isolate *isolate)
Handle< JSArray > GetResult()
void Remove(Handle< SharedFunctionInfo > function_info)
static void CompileForLiveEdit(Handle< Script > script)
LiveEdit::FrameDropMode frame_drop_mode_
Address after_break_target_
ThreadLocal thread_local_
StackFrame::Id break_frame_id()
void OnAfterCompile(Handle< Script > script)
void FramesHaveBeenDropped(StackFrame::Id new_break_frame_id, LiveEdit::FrameDropMode mode, Object **restarter_frame_function_pointer)
static void VisitAllOptimizedFunctions(Isolate *isolate, OptimizedFunctionVisitor *visitor)
static void DeoptimizeMarkedCode(Isolate *isolate)
SharedFunctionInfo * shared_info_
virtual void VisitFunction(JSFunction *function)
virtual void LeaveContext(Context *context)
DependentFunctionMarker(SharedFunctionInfo *shared_info)
virtual void EnterContext(Context *context)
ResultWriter(Comparator::Output *chunk_writer)
Comparator::Output * chunk_writer_
void StaticAssertHolder()
Differencer(Comparator::Input *input)
static const int kDirectionSizeBits
int get_value4(int i1, int i2)
Comparator::Input * input_
void SaveResult(Comparator::Output *chunk_writer)
@ MAX_DIRECTION_FLAG_VALUE
int CompareUpToTail(int pos1, int pos2)
void set_value4_and_dir(int i1, int i2, int value4, Direction dir)
static const int kEmptyCellValue
int & get_cell(int i1, int i2)
Direction get_direction(int i1, int i2)
static const int kDirectionMask
int current_parent_index_
Handle< Object > SerializeFunctionScope(Scope *scope, Zone *zone)
void FunctionInfo(Handle< SharedFunctionInfo > shared, Scope *scope, Zone *zone)
FunctionInfoListener(Isolate *isolate)
void FunctionCode(Handle< Code > function_code)
Isolate * isolate() const
Handle< JSArray > result_
void FunctionStarted(FunctionLiteral *fun)
Handle< JSArray > GetResult()
static const int kParamNumOffset_
static const int kParentIndexOffset_
static const int kSlotNumOffset_
static const int kSharedFunctionInfoOffset_
Handle< Object > GetCodeScopeInfo()
static const int kFunctionNameOffset_
static const int kCodeOffset_
static const int kStartPositionOffset_
void SetInitialProperties(Handle< String > name, int start_position, int end_position, int param_num, int literal_count, int slot_count, int parent_index)
void SetSharedFunctionInfo(Handle< SharedFunctionInfo > info)
static const int kCodeScopeInfoOffset_
static const int kLiteralNumOffset_
void SetFunctionScopeInfo(Handle< Object > scope_info_array)
Handle< TypeFeedbackVector > GetFeedbackVector()
void SetFunctionCode(Handle< Code > function_code, Handle< HeapObject > code_scope_info)
static const int kEndPositionOffset_
Handle< Code > GetFunctionCode()
static Handle< T > cast(Handle< S > that)
Isolate * GetIsolate() const
void IterateRoots(ObjectVisitor *v, VisitMode mode)
bool InNewSpace(Object *object)
bool HasBlockedFunctions()
void VisitThread(Isolate *isolate, ThreadLocalTop *top)
Handle< JSArray > shared_info_array_
bool has_blocked_functions_
Handle< JSArray > result_
InactiveThreadActivationsChecker(Handle< JSArray > shared_info_array, Handle< JSArray > result)
static const int kCodeOffset
void clear_pending_message()
Object * pending_exception()
Object * Throw(Object *exception, MessageLocation *location=NULL)
MessageLocation GetMessageLocation()
ThreadManager * thread_manager()
void clear_pending_exception()
CompilationCache * compilation_cache()
bool has_pending_exception()
static FunctionInfoWrapper cast(Object *object)
void SetField(int field_position, Handle< Object > value)
Isolate * isolate() const
static FunctionInfoWrapper Create(Isolate *isolate)
void SetSmiValueField(int field_position, int value)
Handle< JSArray > GetJSArray()
Handle< Object > GetField(int field_position)
static const int kLiteralNativeContextIndex
static const int kLiteralsPrefixSize
static Context * NativeContextFromLiterals(FixedArray *literals)
static MUST_USE_RESULT MaybeHandle< Object > SetElement(Handle< JSObject > object, uint32_t index, Handle< Object > value, PropertyAttributes attributes, StrictMode strict_mode, bool check_prototype=true, SetPropertyMode set_mode=SET_PROPERTY)
static Handle< FixedArray > EnsureWritableFastElements(Handle< JSObject > object)
static const int kFunctionOffset
static JavaScriptFrame * cast(StackFrame *frame)
JSFunction * function() const
Handle< FixedArray > ends_array_
int GetLineStart(int index)
int GetLineEnd(int index)
int GetPosAfterNewLine(int index)
LineEndsWrapper(Handle< String > string)
void Sort(int(*cmp)(const T *x, const T *y))
void visit(JSFunction *fun)
Handle< FixedArray > m_output
void visit(JSFunction *fun)
CollectVisitor(Handle< FixedArray > output)
void visit(JSFunction *fun)
static void IterateJSFunctions(Handle< SharedFunctionInfo > shared_info, Visitor *visitor)
static void PatchLiterals(FunctionInfoWrapper *compile_info_wrapper, Handle< SharedFunctionInfo > shared_info, Isolate *isolate)
static Handle< FixedArray > CollectJSFunctions(Handle< SharedFunctionInfo > shared_info, Isolate *isolate)
LiveEditFunctionTracker(Isolate *isolate, FunctionLiteral *fun)
void RecordRootFunctionInfo(Handle< Code > code)
static bool IsActive(Isolate *isolate)
void RecordFunctionInfo(Handle< SharedFunctionInfo > info, FunctionLiteral *lit, Zone *zone)
~LiveEditFunctionTracker()
static const int kFramePaddingValue
static const bool kFrameDropperSupported
FunctionPatchabilityStatus
@ FUNCTION_REPLACED_ON_ACTIVE_STACK
@ FUNCTION_BLOCKED_UNDER_NATIVE_CODE
@ FUNCTION_AVAILABLE_FOR_PATCH
@ FUNCTION_BLOCKED_UNDER_GENERATOR
@ FUNCTION_BLOCKED_ON_OTHER_STACK
@ FUNCTION_BLOCKED_ACTIVE_GENERATOR
@ FUNCTION_BLOCKED_ON_ACTIVE_STACK
static const char * RestartFrame(JavaScriptFrame *frame)
static bool FindActiveGenerators(Handle< FixedArray > shared_info_array, Handle< FixedArray > result, int len)
static Handle< JSArray > CheckAndDropActivations(Handle< JSArray > shared_info_array, bool do_drop)
static MUST_USE_RESULT MaybeHandle< JSArray > GatherCompileInfo(Handle< Script > script, Handle< String > source)
static void ReplaceRefToNestedFunction(Handle< JSValue > parent_function_shared, Handle< JSValue > orig_function_shared, Handle< JSValue > subst_function_shared)
static void ReplaceFunctionCode(Handle< JSArray > new_compile_info_array, Handle< JSArray > shared_info_array)
@ FRAME_DROPPED_IN_RETURN_CALL
@ FRAME_DROPPED_IN_IC_CALL
@ FRAME_DROPPED_IN_DEBUG_SLOT_CALL
@ FRAME_DROPPED_IN_DIRECT_CALL
static bool SetAfterBreakTarget(Debug *debug)
static Handle< Object > ChangeScriptSource(Handle< Script > original_script, Handle< String > new_source, Handle< Object > old_script_name)
static void InitializeThreadLocal(Debug *debug)
static void WrapSharedFunctionInfos(Handle< JSArray > array)
static void PatchFunctionPositions(Handle< JSArray > shared_info_array, Handle< JSArray > position_change_array)
static void FunctionSourceUpdated(Handle< JSArray > shared_info_array)
static Handle< JSArray > CompareStrings(Handle< String > s1, Handle< String > s2)
static void SetFunctionScript(Handle< JSValue > function_wrapper, Handle< Object > script_handle)
static const int kFrameDropperFrameSize
Defines layout of a stack frame that supports padding.
static Object *& Object_at(Address addr)
static Address & Address_at(Address addr)
Handle< Script > script() const
const char * GetNotFoundMessage() const
bool MatchActivation(StackFrame *frame, LiveEdit::FunctionPatchabilityStatus status)
MultipleFunctionTarget(Handle< JSArray > shared_info_array, Handle< JSArray > result)
Handle< JSArray > m_result
Handle< JSArray > m_shared_info_array
static MUST_USE_RESULT MaybeHandle< Object > GetElement(Isolate *isolate, Handle< Object > object, uint32_t index)
static MUST_USE_RESULT MaybeHandle< Object > SetProperty(Handle< Object > object, Handle< Name > key, Handle< Object > value, StrictMode strict_mode, StoreFromKeyed store_mode=MAY_BE_STORE_FROM_KEYED)
void Write(const RelocInfo *rinfo)
RelocInfoWriter reloc_info_writer_
RelocInfoBuffer(int buffer_initial_capicity, byte *pc)
Vector< byte > GetResult()
static const int kMaximalBufferSize
static const int kBufferGap
static bool IsPosition(Mode mode)
static bool IsCodeTarget(Mode mode)
static bool IsRealRelocMode(Mode mode)
virtual void VisitCodeEntry(Address entry)
virtual void VisitDebugTarget(RelocInfo *rinfo)
ReplacingVisitor(Code *original, Code *substitution)
virtual void VisitCodeTarget(RelocInfo *rinfo)
virtual void VisitPointers(Object **start, Object **end)
int ContextLocalCount() const
Scope * outer_scope() const
void CollectStackAndContextLocals(ZoneList< Variable * > *stack_locals, ZoneList< Variable * > *context_locals)
int StackLocalCount() const
@ COMPILATION_STATE_INITIAL
static Handle< JSObject > GetWrapper(Handle< Script > script)
Handle< SharedFunctionInfo > GetInfo()
static const int kEndPositionOffset_
static const int kFunctionNameOffset_
static const int kSharedInfoOffset_
void SetProperties(Handle< String > name, int start_position, int end_position, Handle< SharedFunctionInfo > info)
static const int kStartPositionOffset_
static Smi * FromInt(int value)
static const int kContextOffset
static const int kMarkerOffset
static Handle< String > Flatten(Handle< String > string, PretenureFlag pretenure=NOT_TENURED)
virtual void SetSubrange1(int offset, int len)=0
virtual void SetSubrange2(int offset, int len)=0
void IterateArchivedThreads(ThreadVisitor *v)
TokenizingLineArrayCompareOutput(LineEndsWrapper line_ends1, LineEndsWrapper line_ends2, Handle< String > s1, Handle< String > s2)
void AddChunk(int line_pos1, int line_pos2, int line_len1, int line_len2)
LineEndsWrapper line_ends2_
static const int CHUNK_LEN_LIMIT
void SetSubrange1(int offset, int len)
LineEndsWrapper line_ends1_
Handle< JSArray > GetResult()
CompareOutputArrayWriter array_writer_
void SetSubrange2(int offset, int len)
void AddChunk(int pos1, int pos2, int len1, int len2)
TokensCompareOutput(CompareOutputArrayWriter *array_writer, int offset1, int offset2)
CompareOutputArrayWriter * array_writer_
static void FatalProcessOutOfMemory(const char *location, bool take_snapshot=false)
static int CompareIndex(Variable *const *v, Variable *const *w)
enable harmony numeric enable harmony object literal extensions Optimize object size
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 name
enable harmony numeric literals(0o77, 0b11)") DEFINE_BOOL(harmony_object_literals
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 NULL
#define CHECK_EQ(expected, value)
#define DCHECK_LE(v1, v2)
#define DCHECK(condition)
static const char * DropActivationsInActiveThreadImpl(Isolate *isolate, TARGET &target, bool do_drop)
void DeleteArray(T *array)
static int TranslatePosition(int original_position, Handle< JSArray > position_change_array)
static bool FixTryCatchHandler(StackFrame *top_frame, StackFrame *bottom_frame)
static bool IsJSFunctionCode(Code *code)
static int min(int a, int b)
static const char * DropActivationsInActiveThread(Handle< JSArray > shared_info_array, Handle< JSArray > result, bool do_drop)
static int GetArrayLength(Handle< JSArray > array)
static const char * DropFrames(Vector< StackFrame * > frames, int top_frame_index, int bottom_js_frame_index, LiveEdit::FrameDropMode *mode, Object ***restarter_frame_function_pointer)
void MemMove(void *dest, const void *src, size_t size)
static bool CompareSubstrings(Handle< String > s1, int pos1, Handle< String > s2, int pos2, int len)
static Handle< SharedFunctionInfo > UnwrapSharedFunctionInfoFromJSValue(Handle< JSValue > jsValue)
static bool IsInlined(JSFunction *function, SharedFunctionInfo *candidate)
static Handle< Object > UnwrapJSValue(Handle< JSValue > jsValue)
static Handle< Code > PatchPositionsInCode(Handle< Code > code, Handle< JSArray > position_change_array)
static Object ** SetUpFrameDropperFrame(StackFrame *bottom_js_frame, Handle< Code > code)
static Handle< Script > CreateScriptCopy(Handle< Script > original)
static void NarrowDownInput(SubrangableInput *input, SubrangableOutput *output)
static void DeoptimizeDependentFunctions(SharedFunctionInfo *function_info)
static void ReplaceCodeObject(Handle< Code > original, Handle< Code > substitution)
Vector< StackFrame * > CreateStackMap(Isolate *isolate, Zone *zone)
STATIC_ASSERT(sizeof(CPURegister)==sizeof(Register))
const uint32_t kMaxUInt32
static Handle< JSValue > WrapInJSValue(Handle< HeapObject > object)
static bool CheckActivation(Handle< JSArray > shared_info_array, Handle< JSArray > result, StackFrame *frame, LiveEdit::FunctionPatchabilityStatus status)
void MemCopy(void *dest, const void *src, size_t size)
void SetElementSloppy(Handle< JSObject > object, uint32_t index, Handle< Object > value)
Debugger support for the V8 JavaScript engine.
#define STATIC_CHAR_VECTOR(x)