7 #if V8_TARGET_ARCH_IA32
21 #ifndef V8_INTERPRETED_REGEXP
79 #define __ ACCESS_MASM(masm_)
83 int registers_to_save,
85 : NativeRegExpMacroAssembler(zone),
86 masm_(new MacroAssembler(zone->isolate(),
NULL, kRegExpCodeSize)),
88 num_registers_(registers_to_save),
89 num_saved_registers_(registers_to_save),
96 __ jmp(&entry_label_);
97 __ bind(&start_label_);
101 RegExpMacroAssemblerIA32::~RegExpMacroAssemblerIA32() {
104 entry_label_.Unuse();
105 start_label_.Unuse();
106 success_label_.Unuse();
107 backtrack_label_.Unuse();
109 check_preempt_label_.Unuse();
110 stack_overflow_label_.Unuse();
114 int RegExpMacroAssemblerIA32::stack_limit_slack() {
115 return RegExpStack::kStackLimitSlack;
119 void RegExpMacroAssemblerIA32::AdvanceCurrentPosition(
int by) {
121 __ add(
edi, Immediate(by * char_size()));
126 void RegExpMacroAssemblerIA32::AdvanceRegister(
int reg,
int by) {
128 DCHECK(reg < num_registers_);
130 __ add(register_location(reg), Immediate(by));
135 void RegExpMacroAssemblerIA32::Backtrack() {
139 __ add(
ebx, Immediate(masm_->CodeObject()));
144 void RegExpMacroAssemblerIA32::Bind(Label* label) {
149 void RegExpMacroAssemblerIA32::CheckCharacter(
uint32_t c, Label* on_equal) {
150 __ cmp(current_character(), c);
151 BranchOrBacktrack(
equal, on_equal);
155 void RegExpMacroAssemblerIA32::CheckCharacterGT(
uc16 limit, Label* on_greater) {
156 __ cmp(current_character(), limit);
157 BranchOrBacktrack(
greater, on_greater);
161 void RegExpMacroAssemblerIA32::CheckAtStart(Label* on_at_start) {
164 __ cmp(Operand(
ebp, kStartIndex), Immediate(0));
165 BranchOrBacktrack(
not_equal, ¬_at_start);
168 __ cmp(
eax, Operand(
ebp, kInputStart));
169 BranchOrBacktrack(
equal, on_at_start);
170 __ bind(¬_at_start);
174 void RegExpMacroAssemblerIA32::CheckNotAtStart(Label* on_not_at_start) {
176 __ cmp(Operand(
ebp, kStartIndex), Immediate(0));
177 BranchOrBacktrack(
not_equal, on_not_at_start);
180 __ cmp(
eax, Operand(
ebp, kInputStart));
181 BranchOrBacktrack(
not_equal, on_not_at_start);
185 void RegExpMacroAssemblerIA32::CheckCharacterLT(
uc16 limit, Label* on_less) {
186 __ cmp(current_character(), limit);
187 BranchOrBacktrack(
less, on_less);
191 void RegExpMacroAssemblerIA32::CheckGreedyLoop(Label* on_equal) {
193 __ cmp(
edi, Operand(backtrack_stackpointer(), 0));
197 __ bind(&fallthrough);
201 void RegExpMacroAssemblerIA32::CheckNotBackReferenceIgnoreCase(
203 Label* on_no_match) {
205 __ mov(
edx, register_location(start_reg));
206 __ mov(
ebx, register_location(start_reg + 1));
212 BranchOrBacktrack(
less, on_no_match);
221 BranchOrBacktrack(
greater, on_no_match);
223 if (mode_ == LATIN1) {
226 Label loop_increment;
229 __ push(backtrack_stackpointer());
239 __ cmpb_al(Operand(
edx, 0));
246 Label convert_capture;
249 __ sub(
ecx, Immediate(224 -
'a'));
250 __ cmp(
ecx, Immediate(254 - 224));
252 __ cmp(
ecx, Immediate(247 - 224));
254 __ bind(&convert_capture);
262 __ bind(&loop_increment);
264 __ add(
edx, Immediate(1));
265 __ add(
edi, Immediate(1));
273 __ pop(backtrack_stackpointer());
279 __ pop(backtrack_stackpointer());
289 __ push(backtrack_stackpointer());
292 static const int argument_count = 4;
293 __ PrepareCallCFunction(argument_count,
ecx);
303 Immediate(ExternalReference::isolate_address(isolate())));
317 AllowExternalCallThatCantCauseGC scope(masm_);
318 ExternalReference compare =
319 ExternalReference::re_case_insensitive_compare_uc16(isolate());
320 __ CallCFunction(compare, argument_count);
324 __ pop(backtrack_stackpointer());
330 BranchOrBacktrack(
zero, on_no_match);
334 __ bind(&fallthrough);
338 void RegExpMacroAssemblerIA32::CheckNotBackReference(
340 Label* on_no_match) {
346 __ mov(
edx, register_location(start_reg));
347 __ mov(
eax, register_location(start_reg + 1));
350 BranchOrBacktrack(
less, on_no_match);
357 BranchOrBacktrack(
greater, on_no_match);
360 __ push(backtrack_stackpointer());
369 if (mode_ == LATIN1) {
371 __ cmpb_al(Operand(
ebx, 0));
375 __ cmpw_ax(Operand(
ebx, 0));
379 __ add(
edx, Immediate(char_size()));
380 __ add(
ebx, Immediate(char_size()));
388 __ pop(backtrack_stackpointer());
396 __ pop(backtrack_stackpointer());
398 __ bind(&fallthrough);
402 void RegExpMacroAssemblerIA32::CheckNotCharacter(
uint32_t c,
403 Label* on_not_equal) {
404 __ cmp(current_character(), c);
405 BranchOrBacktrack(
not_equal, on_not_equal);
409 void RegExpMacroAssemblerIA32::CheckCharacterAfterAnd(
uint32_t c,
413 __ test(current_character(), Immediate(mask));
416 __ and_(
eax, current_character());
419 BranchOrBacktrack(
equal, on_equal);
423 void RegExpMacroAssemblerIA32::CheckNotCharacterAfterAnd(
uint32_t c,
425 Label* on_not_equal) {
427 __ test(current_character(), Immediate(mask));
430 __ and_(
eax, current_character());
433 BranchOrBacktrack(
not_equal, on_not_equal);
437 void RegExpMacroAssemblerIA32::CheckNotCharacterAfterMinusAnd(
441 Label* on_not_equal) {
442 DCHECK(minus < String::kMaxUtf16CodeUnit);
443 __ lea(
eax, Operand(current_character(), -minus));
445 __ test(
eax, Immediate(mask));
450 BranchOrBacktrack(
not_equal, on_not_equal);
454 void RegExpMacroAssemblerIA32::CheckCharacterInRange(
457 Label* on_in_range) {
458 __ lea(
eax, Operand(current_character(), -from));
464 void RegExpMacroAssemblerIA32::CheckCharacterNotInRange(
467 Label* on_not_in_range) {
468 __ lea(
eax, Operand(current_character(), -from));
470 BranchOrBacktrack(
above, on_not_in_range);
474 void RegExpMacroAssemblerIA32::CheckBitInTable(
475 Handle<ByteArray> table,
477 __ mov(
eax, Immediate(table));
478 Register index = current_character();
479 if (mode_ != LATIN1 || kTableMask != String::kMaxOneByteCharCode) {
480 __ mov(
ebx, kTableSize - 1);
481 __ and_(
ebx, current_character());
485 BranchOrBacktrack(
not_equal, on_bit_set);
489 bool RegExpMacroAssemblerIA32::CheckSpecialCharacterClass(
uc16 type,
490 Label* on_no_match) {
496 if (mode_ == LATIN1) {
499 __ cmp(current_character(),
' ');
500 __ j(
equal, &success, Label::kNear);
502 __ lea(
eax, Operand(current_character(), -
'\t'));
503 __ cmp(
eax,
'\r' -
'\t');
506 __ cmp(
eax, 0x00a0 -
'\t');
507 BranchOrBacktrack(
not_equal, on_no_match);
517 __ lea(
eax, Operand(current_character(), -
'0'));
518 __ cmp(
eax,
'9' -
'0');
519 BranchOrBacktrack(
above, on_no_match);
523 __ lea(
eax, Operand(current_character(), -
'0'));
524 __ cmp(
eax,
'9' -
'0');
529 __ mov(
eax, current_character());
530 __ xor_(
eax, Immediate(0x01));
532 __ sub(
eax, Immediate(0x0b));
533 __ cmp(
eax, 0x0c - 0x0b);
539 __ sub(
eax, Immediate(0x2028 - 0x0b));
540 __ cmp(
eax, 0x2029 - 0x2028);
546 if (mode_ != LATIN1) {
548 __ cmp(current_character(), Immediate(
'z'));
549 BranchOrBacktrack(
above, on_no_match);
552 ExternalReference word_map = ExternalReference::re_word_character_map();
553 __ test_b(current_character(),
554 Operand::StaticArray(current_character(),
times_1, word_map));
555 BranchOrBacktrack(
zero, on_no_match);
560 if (mode_ != LATIN1) {
562 __ cmp(current_character(), Immediate(
'z'));
566 ExternalReference word_map = ExternalReference::re_word_character_map();
567 __ test_b(current_character(),
568 Operand::StaticArray(current_character(),
times_1, word_map));
569 BranchOrBacktrack(
not_zero, on_no_match);
570 if (mode_ != LATIN1) {
582 __ mov(
eax, current_character());
583 __ xor_(
eax, Immediate(0x01));
585 __ sub(
eax, Immediate(0x0b));
586 __ cmp(
eax, 0x0c - 0x0b);
587 if (mode_ == LATIN1) {
588 BranchOrBacktrack(
above, on_no_match);
596 __ sub(
eax, Immediate(0x2028 - 0x0b));
598 BranchOrBacktrack(
above, on_no_match);
610 void RegExpMacroAssemblerIA32::Fail() {
613 __ Move(
eax, Immediate(FAILURE));
615 __ jmp(&exit_label_);
619 Handle<HeapObject> RegExpMacroAssemblerIA32::GetCode(Handle<String> source) {
625 __ bind(&entry_label_);
629 FrameScope scope(masm_, StackFrame::MANUAL);
639 __ push(Immediate(0));
640 __ push(Immediate(0));
643 Label stack_limit_hit;
646 ExternalReference stack_limit =
647 ExternalReference::address_of_stack_limit(isolate());
649 __ sub(
ecx, Operand::StaticVariable(stack_limit));
658 __ mov(
eax, EXCEPTION);
661 __ bind(&stack_limit_hit);
662 CallCheckStackGuardState(
ebx);
669 __ mov(
ebx, Operand(
ebp, kStartIndex));
674 __ mov(
esi, Operand(
ebp, kInputEnd));
676 __ mov(
edi, Operand(
ebp, kInputStart));
690 __ mov(Operand(
ebp, kInputStartMinusOne),
eax);
695 const int kPageSize = 4096;
697 for (
int i = num_saved_registers_ + kRegistersPerPage - 1;
699 i += kRegistersPerPage) {
700 __ mov(register_location(
i),
eax);
704 Label load_char_start_regexp, start_regexp;
706 __ cmp(Operand(
ebp, kStartIndex), Immediate(0));
707 __ j(
not_equal, &load_char_start_regexp, Label::kNear);
708 __ mov(current_character(),
'\n');
709 __ jmp(&start_regexp, Label::kNear);
712 __ bind(&load_char_start_regexp);
714 LoadCurrentCharacterUnchecked(-1, 1);
715 __ bind(&start_regexp);
718 if (num_saved_registers_ > 0) {
722 if (num_saved_registers_ > 8) {
723 __ mov(
ecx, kRegisterZero);
731 for (
int i = 0;
i < num_saved_registers_;
i++) {
732 __ mov(register_location(
i),
eax);
738 __ mov(backtrack_stackpointer(), Operand(
ebp, kStackHighEnd));
740 __ jmp(&start_label_);
743 if (success_label_.is_linked()) {
745 __ bind(&success_label_);
746 if (num_saved_registers_ > 0) {
748 __ mov(
ebx, Operand(
ebp, kRegisterOutput));
749 __ mov(
ecx, Operand(
ebp, kInputEnd));
750 __ mov(
edx, Operand(
ebp, kStartIndex));
751 __ sub(
ecx, Operand(
ebp, kInputStart));
757 for (
int i = 0;
i < num_saved_registers_;
i++) {
758 __ mov(
eax, register_location(
i));
759 if (
i == 0 && global_with_zero_length_check()) {
775 __ inc(Operand(
ebp, kSuccessfulCaptures));
778 __ mov(
ecx, Operand(
ebp, kNumOutputRegisters));
779 __ sub(
ecx, Immediate(num_saved_registers_));
781 __ cmp(
ecx, Immediate(num_saved_registers_));
784 __ mov(Operand(
ebp, kNumOutputRegisters),
ecx);
786 __ add(Operand(
ebp, kRegisterOutput),
790 __ mov(
eax, Operand(
ebp, kInputStartMinusOne));
792 if (global_with_zero_length_check()) {
800 __ j(
zero, &exit_label_, Label::kNear);
803 __ add(
edi, Immediate(2));
809 __ jmp(&load_char_start_regexp);
811 __ mov(
eax, Immediate(SUCCESS));
815 __ bind(&exit_label_);
818 __ mov(
eax, Operand(
ebp, kSuccessfulCaptures));
821 __ bind(&return_eax);
823 __ lea(
esp, Operand(
ebp, kBackup_ebx));
833 if (backtrack_label_.is_linked()) {
834 __ bind(&backtrack_label_);
838 Label exit_with_exception;
841 if (check_preempt_label_.is_linked()) {
842 SafeCallTarget(&check_preempt_label_);
844 __ push(backtrack_stackpointer());
847 CallCheckStackGuardState(
ebx);
854 __ pop(backtrack_stackpointer());
856 __ mov(
esi, Operand(
ebp, kInputEnd));
861 if (stack_overflow_label_.is_linked()) {
862 SafeCallTarget(&stack_overflow_label_);
871 static const int num_arguments = 3;
872 __ PrepareCallCFunction(num_arguments,
ebx);
874 Immediate(ExternalReference::isolate_address(isolate())));
875 __ lea(
eax, Operand(
ebp, kStackHighEnd));
878 ExternalReference grow_stack =
879 ExternalReference::re_grow_stack(isolate());
880 __ CallCFunction(grow_stack, num_arguments);
884 __ j(
equal, &exit_with_exception);
886 __ mov(backtrack_stackpointer(),
eax);
893 if (exit_with_exception.is_linked()) {
895 __ bind(&exit_with_exception);
897 __ mov(
eax, EXCEPTION);
902 masm_->GetCode(&code_desc);
904 isolate()->factory()->NewCode(code_desc,
905 Code::ComputeFlags(Code::REGEXP),
906 masm_->CodeObject());
907 PROFILE(isolate(), RegExpCodeCreateEvent(*code, *source));
908 return Handle<HeapObject>::cast(code);
912 void RegExpMacroAssemblerIA32::GoTo(Label*
to) {
917 void RegExpMacroAssemblerIA32::IfRegisterGE(
int reg,
920 __ cmp(register_location(reg), Immediate(comparand));
925 void RegExpMacroAssemblerIA32::IfRegisterLT(
int reg,
928 __ cmp(register_location(reg), Immediate(comparand));
929 BranchOrBacktrack(
less, if_lt);
933 void RegExpMacroAssemblerIA32::IfRegisterEqPos(
int reg,
935 __ cmp(
edi, register_location(reg));
936 BranchOrBacktrack(
equal, if_eq);
940 RegExpMacroAssembler::IrregexpImplementation
941 RegExpMacroAssemblerIA32::Implementation() {
942 return kIA32Implementation;
946 void RegExpMacroAssemblerIA32::LoadCurrentCharacter(
int cp_offset,
947 Label* on_end_of_input,
951 DCHECK(cp_offset < (1<<30));
953 CheckPosition(cp_offset + characters - 1, on_end_of_input);
955 LoadCurrentCharacterUnchecked(cp_offset, characters);
959 void RegExpMacroAssemblerIA32::PopCurrentPosition() {
964 void RegExpMacroAssemblerIA32::PopRegister(
int register_index) {
966 __ mov(register_location(register_index),
eax);
970 void RegExpMacroAssemblerIA32::PushBacktrack(Label* label) {
971 Push(Immediate::CodeRelativeOffset(label));
976 void RegExpMacroAssemblerIA32::PushCurrentPosition() {
981 void RegExpMacroAssemblerIA32::PushRegister(
int register_index,
982 StackCheckFlag check_stack_limit) {
983 __ mov(
eax, register_location(register_index));
985 if (check_stack_limit) CheckStackLimit();
989 void RegExpMacroAssemblerIA32::ReadCurrentPositionFromRegister(
int reg) {
990 __ mov(
edi, register_location(reg));
994 void RegExpMacroAssemblerIA32::ReadStackPointerFromRegister(
int reg) {
995 __ mov(backtrack_stackpointer(), register_location(reg));
996 __ add(backtrack_stackpointer(), Operand(
ebp, kStackHighEnd));
999 void RegExpMacroAssemblerIA32::SetCurrentPositionFromEnd(
int by) {
1000 Label after_position;
1001 __ cmp(
edi, -by * char_size());
1003 __ mov(
edi, -by * char_size());
1007 LoadCurrentCharacterUnchecked(-1, 1);
1008 __ bind(&after_position);
1012 void RegExpMacroAssemblerIA32::SetRegister(
int register_index,
int to) {
1013 DCHECK(register_index >= num_saved_registers_);
1014 __ mov(register_location(register_index), Immediate(
to));
1018 bool RegExpMacroAssemblerIA32::Succeed() {
1019 __ jmp(&success_label_);
1024 void RegExpMacroAssemblerIA32::WriteCurrentPositionToRegister(
int reg,
1026 if (cp_offset == 0) {
1027 __ mov(register_location(reg),
edi);
1029 __ lea(
eax, Operand(
edi, cp_offset * char_size()));
1030 __ mov(register_location(reg),
eax);
1035 void RegExpMacroAssemblerIA32::ClearRegisters(
int reg_from,
int reg_to) {
1036 DCHECK(reg_from <= reg_to);
1037 __ mov(
eax, Operand(
ebp, kInputStartMinusOne));
1038 for (
int reg = reg_from; reg <= reg_to; reg++) {
1039 __ mov(register_location(reg),
eax);
1044 void RegExpMacroAssemblerIA32::WriteStackPointerToRegister(
int reg) {
1045 __ mov(
eax, backtrack_stackpointer());
1046 __ sub(
eax, Operand(
ebp, kStackHighEnd));
1047 __ mov(register_location(reg),
eax);
1053 void RegExpMacroAssemblerIA32::CallCheckStackGuardState(Register scratch) {
1054 static const int num_arguments = 3;
1055 __ PrepareCallCFunction(num_arguments, scratch);
1063 ExternalReference check_stack_guard =
1064 ExternalReference::re_check_stack_guard_state(isolate());
1065 __ CallCFunction(check_stack_guard, num_arguments);
1070 template <
typename T>
1071 static T& frame_entry(
Address re_frame,
int frame_offset) {
1072 return reinterpret_cast<T&
>(Memory::int32_at(re_frame + frame_offset));
1076 int RegExpMacroAssemblerIA32::CheckStackGuardState(
Address* return_address,
1079 Isolate* isolate = frame_entry<Isolate*>(re_frame, kIsolate);
1080 StackLimitCheck check(isolate);
1081 if (check.JsHasOverflowed()) {
1082 isolate->StackOverflow();
1091 if (frame_entry<int>(re_frame, kDirectCall) == 1) {
1096 HandleScope handles(isolate);
1097 Handle<Code> code_handle(re_code);
1099 Handle<String> subject(frame_entry<String*>(re_frame, kInputString));
1102 bool is_one_byte = subject->IsOneByteRepresentationUnderneath();
1104 DCHECK(re_code->instruction_start() <= *return_address);
1105 DCHECK(*return_address <=
1106 re_code->instruction_start() + re_code->instruction_size());
1108 Object* result = isolate->stack_guard()->HandleInterrupts();
1110 if (*code_handle != re_code) {
1111 int delta = code_handle->address() - re_code->address();
1113 *return_address += delta;
1116 if (result->IsException()) {
1120 Handle<String> subject_tmp = subject;
1121 int slice_offset = 0;
1124 if (StringShape(*subject_tmp).IsCons()) {
1125 subject_tmp = Handle<String>(ConsString::cast(*subject_tmp)->first());
1126 }
else if (StringShape(*subject_tmp).IsSliced()) {
1127 SlicedString* slice = SlicedString::cast(*subject_tmp);
1128 subject_tmp = Handle<String>(slice->parent());
1129 slice_offset = slice->offset();
1133 if (subject_tmp->IsOneByteRepresentation() != is_one_byte) {
1144 DCHECK(StringShape(*subject_tmp).IsSequential() ||
1145 StringShape(*subject_tmp).IsExternal());
1148 const byte* start_address = frame_entry<const byte*>(re_frame, kInputStart);
1152 int start_index = frame_entry<int>(re_frame, kStartIndex);
1153 const byte* new_address = StringCharacterPosition(*subject_tmp,
1154 start_index + slice_offset);
1156 if (start_address != new_address) {
1159 const byte* end_address = frame_entry<const byte* >(re_frame, kInputEnd);
1160 int byte_length =
static_cast<int>(end_address - start_address);
1161 frame_entry<const String*>(re_frame, kInputString) = *subject;
1162 frame_entry<const byte*>(re_frame, kInputStart) = new_address;
1163 frame_entry<const byte*>(re_frame, kInputEnd) = new_address + byte_length;
1164 }
else if (frame_entry<const String*>(re_frame, kInputString) != *subject) {
1168 frame_entry<const String*>(re_frame, kInputString) = *subject;
1175 Operand RegExpMacroAssemblerIA32::register_location(
int register_index) {
1176 DCHECK(register_index < (1<<30));
1177 if (num_registers_ <= register_index) {
1178 num_registers_ = register_index + 1;
1184 void RegExpMacroAssemblerIA32::CheckPosition(
int cp_offset,
1185 Label* on_outside_input) {
1186 __ cmp(
edi, -cp_offset * char_size());
1191 void RegExpMacroAssemblerIA32::BranchOrBacktrack(
Condition condition,
1193 if (condition < 0) {
1202 __ j(condition, &backtrack_label_);
1205 __ j(condition,
to);
1209 void RegExpMacroAssemblerIA32::SafeCall(Label*
to) {
1211 __ push(Immediate::CodeRelativeOffset(&return_to));
1213 __ bind(&return_to);
1217 void RegExpMacroAssemblerIA32::SafeReturn() {
1219 __ add(
ebx, Immediate(masm_->CodeObject()));
1224 void RegExpMacroAssemblerIA32::SafeCallTarget(Label*
name) {
1230 DCHECK(!source.is(backtrack_stackpointer()));
1233 __ mov(Operand(backtrack_stackpointer(), 0), source);
1240 __ mov(Operand(backtrack_stackpointer(), 0), value);
1244 void RegExpMacroAssemblerIA32::Pop(Register target) {
1245 DCHECK(!target.is(backtrack_stackpointer()));
1246 __ mov(target, Operand(backtrack_stackpointer(), 0));
1252 void RegExpMacroAssemblerIA32::CheckPreemption() {
1255 ExternalReference stack_limit =
1256 ExternalReference::address_of_stack_limit(isolate());
1257 __ cmp(
esp, Operand::StaticVariable(stack_limit));
1260 SafeCall(&check_preempt_label_);
1262 __ bind(&no_preempt);
1266 void RegExpMacroAssemblerIA32::CheckStackLimit() {
1267 Label no_stack_overflow;
1268 ExternalReference stack_limit =
1269 ExternalReference::address_of_regexp_stack_limit(isolate());
1270 __ cmp(backtrack_stackpointer(), Operand::StaticVariable(stack_limit));
1271 __ j(
above, &no_stack_overflow);
1273 SafeCall(&stack_overflow_label_);
1275 __ bind(&no_stack_overflow);
1279 void RegExpMacroAssemblerIA32::LoadCurrentCharacterUnchecked(
int cp_offset,
1281 if (mode_ == LATIN1) {
1282 if (characters == 4) {
1284 }
else if (characters == 2) {
1285 __ movzx_w(current_character(), Operand(
esi,
edi,
times_1, cp_offset));
1288 __ movzx_b(current_character(), Operand(
esi,
edi,
times_1, cp_offset));
1292 if (characters == 2) {
1293 __ mov(current_character(),
1297 __ movzx_w(current_character(),
RegExpMacroAssemblerIA32(Mode mode, int registers_to_save, Zone *zone)
#define PROFILE(IsolateGetter, Call)
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in only print modified registers Trace simulator debug messages Implied by trace sim abort randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot A filename with extra code to be included in the A file to write the raw snapshot bytes to(mksnapshot only)") DEFINE_STRING(raw_context_file
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 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 DCHECK(condition)
#define DCHECK_EQ(v1, v2)
#define STATIC_ASSERT(test)
static int Push(SpecialRPOStackFrame *stack, int depth, BasicBlock *child, int unvisited)
Operand FieldOperand(Register object, int offset)
kSerializedDataOffset Object
Debugger support for the V8 JavaScript engine.
#define T(name, string, precedence)
Definitions and convenience functions for working with unicode.