20 #ifndef V8_INTERPRETED_REGEXP
78 #define __ ACCESS_MASM(masm_)
82 int registers_to_save,
84 : NativeRegExpMacroAssembler(zone),
85 masm_(new MacroAssembler(zone->isolate(),
NULL, kRegExpCodeSize)),
87 num_registers_(registers_to_save),
88 num_saved_registers_(registers_to_save),
95 __ jmp(&entry_label_);
96 __ bind(&start_label_);
100 RegExpMacroAssemblerX87::~RegExpMacroAssemblerX87() {
103 entry_label_.Unuse();
104 start_label_.Unuse();
105 success_label_.Unuse();
106 backtrack_label_.Unuse();
108 check_preempt_label_.Unuse();
109 stack_overflow_label_.Unuse();
113 int RegExpMacroAssemblerX87::stack_limit_slack() {
114 return RegExpStack::kStackLimitSlack;
118 void RegExpMacroAssemblerX87::AdvanceCurrentPosition(
int by) {
120 __ add(
edi, Immediate(by * char_size()));
125 void RegExpMacroAssemblerX87::AdvanceRegister(
int reg,
int by) {
127 DCHECK(reg < num_registers_);
129 __ add(register_location(reg), Immediate(by));
134 void RegExpMacroAssemblerX87::Backtrack() {
138 __ add(
ebx, Immediate(masm_->CodeObject()));
143 void RegExpMacroAssemblerX87::Bind(Label* label) {
148 void RegExpMacroAssemblerX87::CheckCharacter(
uint32_t c, Label* on_equal) {
149 __ cmp(current_character(), c);
150 BranchOrBacktrack(
equal, on_equal);
154 void RegExpMacroAssemblerX87::CheckCharacterGT(
uc16 limit, Label* on_greater) {
155 __ cmp(current_character(), limit);
156 BranchOrBacktrack(
greater, on_greater);
160 void RegExpMacroAssemblerX87::CheckAtStart(Label* on_at_start) {
163 __ cmp(Operand(
ebp, kStartIndex), Immediate(0));
164 BranchOrBacktrack(
not_equal, ¬_at_start);
167 __ cmp(
eax, Operand(
ebp, kInputStart));
168 BranchOrBacktrack(
equal, on_at_start);
169 __ bind(¬_at_start);
173 void RegExpMacroAssemblerX87::CheckNotAtStart(Label* on_not_at_start) {
175 __ cmp(Operand(
ebp, kStartIndex), Immediate(0));
176 BranchOrBacktrack(
not_equal, on_not_at_start);
179 __ cmp(
eax, Operand(
ebp, kInputStart));
180 BranchOrBacktrack(
not_equal, on_not_at_start);
184 void RegExpMacroAssemblerX87::CheckCharacterLT(
uc16 limit, Label* on_less) {
185 __ cmp(current_character(), limit);
186 BranchOrBacktrack(
less, on_less);
190 void RegExpMacroAssemblerX87::CheckGreedyLoop(Label* on_equal) {
192 __ cmp(
edi, Operand(backtrack_stackpointer(), 0));
196 __ bind(&fallthrough);
200 void RegExpMacroAssemblerX87::CheckNotBackReferenceIgnoreCase(
202 Label* on_no_match) {
204 __ mov(
edx, register_location(start_reg));
205 __ mov(
ebx, register_location(start_reg + 1));
211 BranchOrBacktrack(
less, on_no_match);
220 BranchOrBacktrack(
greater, on_no_match);
222 if (mode_ == LATIN1) {
225 Label loop_increment;
228 __ push(backtrack_stackpointer());
238 __ cmpb_al(Operand(
edx, 0));
245 Label convert_capture;
248 __ sub(
ecx, Immediate(224 -
'a'));
249 __ cmp(
ecx, Immediate(254 - 224));
251 __ cmp(
ecx, Immediate(247 - 224));
253 __ bind(&convert_capture);
261 __ bind(&loop_increment);
263 __ add(
edx, Immediate(1));
264 __ add(
edi, Immediate(1));
272 __ pop(backtrack_stackpointer());
278 __ pop(backtrack_stackpointer());
288 __ push(backtrack_stackpointer());
291 static const int argument_count = 4;
292 __ PrepareCallCFunction(argument_count,
ecx);
302 Immediate(ExternalReference::isolate_address(isolate())));
316 AllowExternalCallThatCantCauseGC scope(masm_);
317 ExternalReference compare =
318 ExternalReference::re_case_insensitive_compare_uc16(isolate());
319 __ CallCFunction(compare, argument_count);
323 __ pop(backtrack_stackpointer());
329 BranchOrBacktrack(
zero, on_no_match);
333 __ bind(&fallthrough);
337 void RegExpMacroAssemblerX87::CheckNotBackReference(
339 Label* on_no_match) {
345 __ mov(
edx, register_location(start_reg));
346 __ mov(
eax, register_location(start_reg + 1));
349 BranchOrBacktrack(
less, on_no_match);
356 BranchOrBacktrack(
greater, on_no_match);
359 __ push(backtrack_stackpointer());
368 if (mode_ == LATIN1) {
370 __ cmpb_al(Operand(
ebx, 0));
374 __ cmpw_ax(Operand(
ebx, 0));
378 __ add(
edx, Immediate(char_size()));
379 __ add(
ebx, Immediate(char_size()));
387 __ pop(backtrack_stackpointer());
395 __ pop(backtrack_stackpointer());
397 __ bind(&fallthrough);
401 void RegExpMacroAssemblerX87::CheckNotCharacter(
uint32_t c,
402 Label* on_not_equal) {
403 __ cmp(current_character(), c);
404 BranchOrBacktrack(
not_equal, on_not_equal);
408 void RegExpMacroAssemblerX87::CheckCharacterAfterAnd(
uint32_t c,
412 __ test(current_character(), Immediate(mask));
415 __ and_(
eax, current_character());
418 BranchOrBacktrack(
equal, on_equal);
422 void RegExpMacroAssemblerX87::CheckNotCharacterAfterAnd(
uint32_t c,
424 Label* on_not_equal) {
426 __ test(current_character(), Immediate(mask));
429 __ and_(
eax, current_character());
432 BranchOrBacktrack(
not_equal, on_not_equal);
436 void RegExpMacroAssemblerX87::CheckNotCharacterAfterMinusAnd(
440 Label* on_not_equal) {
441 DCHECK(minus < String::kMaxUtf16CodeUnit);
442 __ lea(
eax, Operand(current_character(), -minus));
444 __ test(
eax, Immediate(mask));
449 BranchOrBacktrack(
not_equal, on_not_equal);
453 void RegExpMacroAssemblerX87::CheckCharacterInRange(
456 Label* on_in_range) {
457 __ lea(
eax, Operand(current_character(), -from));
463 void RegExpMacroAssemblerX87::CheckCharacterNotInRange(
466 Label* on_not_in_range) {
467 __ lea(
eax, Operand(current_character(), -from));
469 BranchOrBacktrack(
above, on_not_in_range);
473 void RegExpMacroAssemblerX87::CheckBitInTable(
474 Handle<ByteArray> table,
476 __ mov(
eax, Immediate(table));
477 Register index = current_character();
478 if (mode_ != LATIN1 || kTableMask != String::kMaxOneByteCharCode) {
479 __ mov(
ebx, kTableSize - 1);
480 __ and_(
ebx, current_character());
484 BranchOrBacktrack(
not_equal, on_bit_set);
488 bool RegExpMacroAssemblerX87::CheckSpecialCharacterClass(
uc16 type,
489 Label* on_no_match) {
495 if (mode_ == LATIN1) {
498 __ cmp(current_character(),
' ');
499 __ j(
equal, &success, Label::kNear);
501 __ lea(
eax, Operand(current_character(), -
'\t'));
502 __ cmp(
eax,
'\r' -
'\t');
505 __ cmp(
eax, 0x00a0 -
'\t');
506 BranchOrBacktrack(
not_equal, on_no_match);
516 __ lea(
eax, Operand(current_character(), -
'0'));
517 __ cmp(
eax,
'9' -
'0');
518 BranchOrBacktrack(
above, on_no_match);
522 __ lea(
eax, Operand(current_character(), -
'0'));
523 __ cmp(
eax,
'9' -
'0');
528 __ mov(
eax, current_character());
529 __ xor_(
eax, Immediate(0x01));
531 __ sub(
eax, Immediate(0x0b));
532 __ cmp(
eax, 0x0c - 0x0b);
538 __ sub(
eax, Immediate(0x2028 - 0x0b));
539 __ cmp(
eax, 0x2029 - 0x2028);
545 if (mode_ != LATIN1) {
547 __ cmp(current_character(), Immediate(
'z'));
548 BranchOrBacktrack(
above, on_no_match);
551 ExternalReference word_map = ExternalReference::re_word_character_map();
552 __ test_b(current_character(),
553 Operand::StaticArray(current_character(),
times_1, word_map));
554 BranchOrBacktrack(
zero, on_no_match);
559 if (mode_ != LATIN1) {
561 __ cmp(current_character(), Immediate(
'z'));
565 ExternalReference word_map = ExternalReference::re_word_character_map();
566 __ test_b(current_character(),
567 Operand::StaticArray(current_character(),
times_1, word_map));
568 BranchOrBacktrack(
not_zero, on_no_match);
569 if (mode_ != LATIN1) {
581 __ mov(
eax, current_character());
582 __ xor_(
eax, Immediate(0x01));
584 __ sub(
eax, Immediate(0x0b));
585 __ cmp(
eax, 0x0c - 0x0b);
586 if (mode_ == LATIN1) {
587 BranchOrBacktrack(
above, on_no_match);
595 __ sub(
eax, Immediate(0x2028 - 0x0b));
597 BranchOrBacktrack(
above, on_no_match);
609 void RegExpMacroAssemblerX87::Fail() {
612 __ Move(
eax, Immediate(FAILURE));
614 __ jmp(&exit_label_);
618 Handle<HeapObject> RegExpMacroAssemblerX87::GetCode(Handle<String> source) {
624 __ bind(&entry_label_);
628 FrameScope scope(masm_, StackFrame::MANUAL);
638 __ push(Immediate(0));
639 __ push(Immediate(0));
642 Label stack_limit_hit;
645 ExternalReference stack_limit =
646 ExternalReference::address_of_stack_limit(isolate());
648 __ sub(
ecx, Operand::StaticVariable(stack_limit));
657 __ mov(
eax, EXCEPTION);
660 __ bind(&stack_limit_hit);
661 CallCheckStackGuardState(
ebx);
668 __ mov(
ebx, Operand(
ebp, kStartIndex));
673 __ mov(
esi, Operand(
ebp, kInputEnd));
675 __ mov(
edi, Operand(
ebp, kInputStart));
689 __ mov(Operand(
ebp, kInputStartMinusOne),
eax);
694 const int kPageSize = 4096;
696 for (
int i = num_saved_registers_ + kRegistersPerPage - 1;
698 i += kRegistersPerPage) {
699 __ mov(register_location(
i),
eax);
703 Label load_char_start_regexp, start_regexp;
705 __ cmp(Operand(
ebp, kStartIndex), Immediate(0));
706 __ j(
not_equal, &load_char_start_regexp, Label::kNear);
707 __ mov(current_character(),
'\n');
708 __ jmp(&start_regexp, Label::kNear);
711 __ bind(&load_char_start_regexp);
713 LoadCurrentCharacterUnchecked(-1, 1);
714 __ bind(&start_regexp);
717 if (num_saved_registers_ > 0) {
721 if (num_saved_registers_ > 8) {
722 __ mov(
ecx, kRegisterZero);
730 for (
int i = 0;
i < num_saved_registers_;
i++) {
731 __ mov(register_location(
i),
eax);
737 __ mov(backtrack_stackpointer(), Operand(
ebp, kStackHighEnd));
739 __ jmp(&start_label_);
742 if (success_label_.is_linked()) {
744 __ bind(&success_label_);
745 if (num_saved_registers_ > 0) {
747 __ mov(
ebx, Operand(
ebp, kRegisterOutput));
748 __ mov(
ecx, Operand(
ebp, kInputEnd));
749 __ mov(
edx, Operand(
ebp, kStartIndex));
750 __ sub(
ecx, Operand(
ebp, kInputStart));
756 for (
int i = 0;
i < num_saved_registers_;
i++) {
757 __ mov(
eax, register_location(
i));
758 if (
i == 0 && global_with_zero_length_check()) {
774 __ inc(Operand(
ebp, kSuccessfulCaptures));
777 __ mov(
ecx, Operand(
ebp, kNumOutputRegisters));
778 __ sub(
ecx, Immediate(num_saved_registers_));
780 __ cmp(
ecx, Immediate(num_saved_registers_));
783 __ mov(Operand(
ebp, kNumOutputRegisters),
ecx);
785 __ add(Operand(
ebp, kRegisterOutput),
789 __ mov(
eax, Operand(
ebp, kInputStartMinusOne));
791 if (global_with_zero_length_check()) {
799 __ j(
zero, &exit_label_, Label::kNear);
802 __ add(
edi, Immediate(2));
808 __ jmp(&load_char_start_regexp);
810 __ mov(
eax, Immediate(SUCCESS));
814 __ bind(&exit_label_);
817 __ mov(
eax, Operand(
ebp, kSuccessfulCaptures));
820 __ bind(&return_eax);
822 __ lea(
esp, Operand(
ebp, kBackup_ebx));
832 if (backtrack_label_.is_linked()) {
833 __ bind(&backtrack_label_);
837 Label exit_with_exception;
840 if (check_preempt_label_.is_linked()) {
841 SafeCallTarget(&check_preempt_label_);
843 __ push(backtrack_stackpointer());
846 CallCheckStackGuardState(
ebx);
853 __ pop(backtrack_stackpointer());
855 __ mov(
esi, Operand(
ebp, kInputEnd));
860 if (stack_overflow_label_.is_linked()) {
861 SafeCallTarget(&stack_overflow_label_);
870 static const int num_arguments = 3;
871 __ PrepareCallCFunction(num_arguments,
ebx);
873 Immediate(ExternalReference::isolate_address(isolate())));
874 __ lea(
eax, Operand(
ebp, kStackHighEnd));
877 ExternalReference grow_stack =
878 ExternalReference::re_grow_stack(isolate());
879 __ CallCFunction(grow_stack, num_arguments);
883 __ j(
equal, &exit_with_exception);
885 __ mov(backtrack_stackpointer(),
eax);
892 if (exit_with_exception.is_linked()) {
894 __ bind(&exit_with_exception);
896 __ mov(
eax, EXCEPTION);
901 masm_->GetCode(&code_desc);
903 isolate()->factory()->NewCode(code_desc,
904 Code::ComputeFlags(Code::REGEXP),
905 masm_->CodeObject());
906 PROFILE(isolate(), RegExpCodeCreateEvent(*code, *source));
907 return Handle<HeapObject>::cast(code);
911 void RegExpMacroAssemblerX87::GoTo(Label*
to) {
916 void RegExpMacroAssemblerX87::IfRegisterGE(
int reg,
919 __ cmp(register_location(reg), Immediate(comparand));
924 void RegExpMacroAssemblerX87::IfRegisterLT(
int reg,
927 __ cmp(register_location(reg), Immediate(comparand));
928 BranchOrBacktrack(
less, if_lt);
932 void RegExpMacroAssemblerX87::IfRegisterEqPos(
int reg,
934 __ cmp(
edi, register_location(reg));
935 BranchOrBacktrack(
equal, if_eq);
939 RegExpMacroAssembler::IrregexpImplementation
940 RegExpMacroAssemblerX87::Implementation() {
941 return kX87Implementation;
945 void RegExpMacroAssemblerX87::LoadCurrentCharacter(
int cp_offset,
946 Label* on_end_of_input,
950 DCHECK(cp_offset < (1<<30));
952 CheckPosition(cp_offset + characters - 1, on_end_of_input);
954 LoadCurrentCharacterUnchecked(cp_offset, characters);
958 void RegExpMacroAssemblerX87::PopCurrentPosition() {
963 void RegExpMacroAssemblerX87::PopRegister(
int register_index) {
965 __ mov(register_location(register_index),
eax);
969 void RegExpMacroAssemblerX87::PushBacktrack(Label* label) {
970 Push(Immediate::CodeRelativeOffset(label));
975 void RegExpMacroAssemblerX87::PushCurrentPosition() {
980 void RegExpMacroAssemblerX87::PushRegister(
int register_index,
981 StackCheckFlag check_stack_limit) {
982 __ mov(
eax, register_location(register_index));
984 if (check_stack_limit) CheckStackLimit();
988 void RegExpMacroAssemblerX87::ReadCurrentPositionFromRegister(
int reg) {
989 __ mov(
edi, register_location(reg));
993 void RegExpMacroAssemblerX87::ReadStackPointerFromRegister(
int reg) {
994 __ mov(backtrack_stackpointer(), register_location(reg));
995 __ add(backtrack_stackpointer(), Operand(
ebp, kStackHighEnd));
998 void RegExpMacroAssemblerX87::SetCurrentPositionFromEnd(
int by) {
999 Label after_position;
1000 __ cmp(
edi, -by * char_size());
1002 __ mov(
edi, -by * char_size());
1006 LoadCurrentCharacterUnchecked(-1, 1);
1007 __ bind(&after_position);
1011 void RegExpMacroAssemblerX87::SetRegister(
int register_index,
int to) {
1012 DCHECK(register_index >= num_saved_registers_);
1013 __ mov(register_location(register_index), Immediate(
to));
1017 bool RegExpMacroAssemblerX87::Succeed() {
1018 __ jmp(&success_label_);
1023 void RegExpMacroAssemblerX87::WriteCurrentPositionToRegister(
int reg,
1025 if (cp_offset == 0) {
1026 __ mov(register_location(reg),
edi);
1028 __ lea(
eax, Operand(
edi, cp_offset * char_size()));
1029 __ mov(register_location(reg),
eax);
1034 void RegExpMacroAssemblerX87::ClearRegisters(
int reg_from,
int reg_to) {
1035 DCHECK(reg_from <= reg_to);
1036 __ mov(
eax, Operand(
ebp, kInputStartMinusOne));
1037 for (
int reg = reg_from; reg <= reg_to; reg++) {
1038 __ mov(register_location(reg),
eax);
1043 void RegExpMacroAssemblerX87::WriteStackPointerToRegister(
int reg) {
1044 __ mov(
eax, backtrack_stackpointer());
1045 __ sub(
eax, Operand(
ebp, kStackHighEnd));
1046 __ mov(register_location(reg),
eax);
1052 void RegExpMacroAssemblerX87::CallCheckStackGuardState(Register scratch) {
1053 static const int num_arguments = 3;
1054 __ PrepareCallCFunction(num_arguments, scratch);
1062 ExternalReference check_stack_guard =
1063 ExternalReference::re_check_stack_guard_state(isolate());
1064 __ CallCFunction(check_stack_guard, num_arguments);
1069 template <
typename T>
1070 static T& frame_entry(
Address re_frame,
int frame_offset) {
1071 return reinterpret_cast<T&
>(Memory::int32_at(re_frame + frame_offset));
1075 int RegExpMacroAssemblerX87::CheckStackGuardState(
Address* return_address,
1078 Isolate* isolate = frame_entry<Isolate*>(re_frame, kIsolate);
1079 StackLimitCheck check(isolate);
1080 if (check.JsHasOverflowed()) {
1081 isolate->StackOverflow();
1090 if (frame_entry<int>(re_frame, kDirectCall) == 1) {
1095 HandleScope handles(isolate);
1096 Handle<Code> code_handle(re_code);
1098 Handle<String> subject(frame_entry<String*>(re_frame, kInputString));
1101 bool is_one_byte = subject->IsOneByteRepresentationUnderneath();
1103 DCHECK(re_code->instruction_start() <= *return_address);
1104 DCHECK(*return_address <=
1105 re_code->instruction_start() + re_code->instruction_size());
1107 Object* result = isolate->stack_guard()->HandleInterrupts();
1109 if (*code_handle != re_code) {
1110 int delta = code_handle->address() - re_code->address();
1112 *return_address += delta;
1115 if (result->IsException()) {
1119 Handle<String> subject_tmp = subject;
1120 int slice_offset = 0;
1123 if (StringShape(*subject_tmp).IsCons()) {
1124 subject_tmp = Handle<String>(ConsString::cast(*subject_tmp)->first());
1125 }
else if (StringShape(*subject_tmp).IsSliced()) {
1126 SlicedString* slice = SlicedString::cast(*subject_tmp);
1127 subject_tmp = Handle<String>(slice->parent());
1128 slice_offset = slice->offset();
1132 if (subject_tmp->IsOneByteRepresentation() != is_one_byte) {
1143 DCHECK(StringShape(*subject_tmp).IsSequential() ||
1144 StringShape(*subject_tmp).IsExternal());
1147 const byte* start_address = frame_entry<const byte*>(re_frame, kInputStart);
1151 int start_index = frame_entry<int>(re_frame, kStartIndex);
1152 const byte* new_address = StringCharacterPosition(*subject_tmp,
1153 start_index + slice_offset);
1155 if (start_address != new_address) {
1158 const byte* end_address = frame_entry<const byte* >(re_frame, kInputEnd);
1159 int byte_length =
static_cast<int>(end_address - start_address);
1160 frame_entry<const String*>(re_frame, kInputString) = *subject;
1161 frame_entry<const byte*>(re_frame, kInputStart) = new_address;
1162 frame_entry<const byte*>(re_frame, kInputEnd) = new_address + byte_length;
1163 }
else if (frame_entry<const String*>(re_frame, kInputString) != *subject) {
1167 frame_entry<const String*>(re_frame, kInputString) = *subject;
1174 Operand RegExpMacroAssemblerX87::register_location(
int register_index) {
1175 DCHECK(register_index < (1<<30));
1176 if (num_registers_ <= register_index) {
1177 num_registers_ = register_index + 1;
1183 void RegExpMacroAssemblerX87::CheckPosition(
int cp_offset,
1184 Label* on_outside_input) {
1185 __ cmp(
edi, -cp_offset * char_size());
1190 void RegExpMacroAssemblerX87::BranchOrBacktrack(
Condition condition,
1192 if (condition < 0) {
1201 __ j(condition, &backtrack_label_);
1204 __ j(condition,
to);
1208 void RegExpMacroAssemblerX87::SafeCall(Label*
to) {
1210 __ push(Immediate::CodeRelativeOffset(&return_to));
1212 __ bind(&return_to);
1216 void RegExpMacroAssemblerX87::SafeReturn() {
1218 __ add(
ebx, Immediate(masm_->CodeObject()));
1223 void RegExpMacroAssemblerX87::SafeCallTarget(Label*
name) {
1229 DCHECK(!source.is(backtrack_stackpointer()));
1232 __ mov(Operand(backtrack_stackpointer(), 0), source);
1239 __ mov(Operand(backtrack_stackpointer(), 0), value);
1243 void RegExpMacroAssemblerX87::Pop(Register target) {
1244 DCHECK(!target.is(backtrack_stackpointer()));
1245 __ mov(target, Operand(backtrack_stackpointer(), 0));
1251 void RegExpMacroAssemblerX87::CheckPreemption() {
1254 ExternalReference stack_limit =
1255 ExternalReference::address_of_stack_limit(isolate());
1256 __ cmp(
esp, Operand::StaticVariable(stack_limit));
1259 SafeCall(&check_preempt_label_);
1261 __ bind(&no_preempt);
1265 void RegExpMacroAssemblerX87::CheckStackLimit() {
1266 Label no_stack_overflow;
1267 ExternalReference stack_limit =
1268 ExternalReference::address_of_regexp_stack_limit(isolate());
1269 __ cmp(backtrack_stackpointer(), Operand::StaticVariable(stack_limit));
1270 __ j(
above, &no_stack_overflow);
1272 SafeCall(&stack_overflow_label_);
1274 __ bind(&no_stack_overflow);
1278 void RegExpMacroAssemblerX87::LoadCurrentCharacterUnchecked(
int cp_offset,
1280 if (mode_ == LATIN1) {
1281 if (characters == 4) {
1283 }
else if (characters == 2) {
1284 __ movzx_w(current_character(), Operand(
esi,
edi,
times_1, cp_offset));
1287 __ movzx_b(current_character(), Operand(
esi,
edi,
times_1, cp_offset));
1291 if (characters == 2) {
1292 __ mov(current_character(),
1296 __ movzx_w(current_character(),
RegExpMacroAssemblerX87(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.