29 #ifndef V8_MIPS_REGEXP_MACRO_ASSEMBLER_MIPS_H_
30 #define V8_MIPS_REGEXP_MACRO_ASSEMBLER_MIPS_H_
41 #ifndef V8_INTERPRETED_REGEXP
50 virtual void Bind(Label* label);
78 Label* on_not_in_range);
83 virtual void CheckPosition(
int cp_offset, Label* on_outside_input);
88 virtual void GoTo(Label* label);
89 virtual void IfRegisterGE(
int reg,
int comparand, Label* if_ge);
90 virtual void IfRegisterLT(
int reg,
int comparand, Label* if_lt);
94 Label* on_end_of_input,
95 bool check_bounds =
true,
106 virtual void SetRegister(
int register_index,
int to);
122 static const int kFramePointer = 0;
126 static const int kStoredRegisters = kFramePointer;
128 static const int kReturnAddress = kStoredRegisters + 9 *
kPointerSize;
129 static const int kSecondaryReturnAddress = kReturnAddress +
kPointerSize;
131 static const int kStackFrameHeader = kReturnAddress +
kPointerSize;
133 static const int kRegisterOutput = kStackFrameHeader + 20;
134 static const int kNumOutputRegisters = kRegisterOutput +
kPointerSize;
135 static const int kStackHighEnd = kNumOutputRegisters +
kPointerSize;
136 static const int kDirectCall = kStackHighEnd +
kPointerSize;
141 static const int kInputEnd = kFramePointer -
kPointerSize;
142 static const int kInputStart = kInputEnd -
kPointerSize;
143 static const int kStartIndex = kInputStart -
kPointerSize;
144 static const int kInputString = kStartIndex -
kPointerSize;
147 static const int kSuccessfulCaptures = kInputString -
kPointerSize;
148 static const int kInputStartMinusOne = kSuccessfulCaptures -
kPointerSize;
150 static const int kRegisterZero = kInputStartMinusOne -
kPointerSize;
153 static const size_t kRegExpCodeSize = 1024;
157 void LoadCurrentCharacterUnchecked(
int cp_offset,
int character_count);
160 void CheckPreemption();
163 void CheckStackLimit();
167 void CallCheckStackGuardState(
Register scratch);
170 MemOperand register_location(
int register_index);
174 inline Register current_input_offset() {
return t2; }
177 inline Register current_character() {
return t3; }
180 inline Register end_of_input_address() {
return t6; }
184 inline Register frame_pointer() {
return fp; }
188 inline Register backtrack_stackpointer() {
return t4; }
191 inline Register code_pointer() {
return t1; }
194 inline int char_size() {
return static_cast<int>(mode_); }
198 void BranchOrBacktrack(Label* to,
205 inline void SafeCall(Label* to,
209 inline void SafeReturn();
210 inline void SafeCallTarget(Label*
name);
232 int num_saved_registers_;
237 Label success_label_;
238 Label backtrack_label_;
240 Label check_preempt_label_;
241 Label stack_overflow_label_;
242 Label internal_failure_label_;
245 #endif // V8_INTERPRETED_REGEXP
250 #endif // V8_MIPS_REGEXP_MACRO_ASSEMBLER_MIPS_H_
Isolate * isolate() const
RegExpMacroAssemblerMIPS(Mode mode, int registers_to_save, Zone *zone)
virtual void AdvanceRegister(int reg, int by)
virtual void PushCurrentPosition()
virtual void CheckCharacter(uint32_t c, Label *on_equal)
virtual void CheckNotCharacterAfterAnd(uint32_t c, uint32_t mask, Label *on_not_equal)
virtual bool CheckSpecialCharacterClass(uc16 type, Label *on_no_match)
virtual void CheckCharacterAfterAnd(uint32_t c, uint32_t mask, Label *on_equal)
virtual void CheckNotAtStart(Label *on_not_at_start)
virtual void ReadCurrentPositionFromRegister(int reg)
virtual void GoTo(Label *label)
virtual void CheckNotBackReference(int start_reg, Label *on_no_match)
virtual void PushBacktrack(Label *label)
virtual void PopCurrentPosition()
virtual void IfRegisterGE(int reg, int comparand, Label *if_ge)
virtual void CheckNotCharacter(uint32_t c, Label *on_not_equal)
virtual void SetCurrentPositionFromEnd(int by)
virtual void CheckNotBackReferenceIgnoreCase(int start_reg, Label *on_no_match)
virtual Handle< HeapObject > GetCode(Handle< String > source)
virtual void CheckAtStart(Label *on_at_start)
virtual void PopRegister(int register_index)
virtual void SetRegister(int register_index, int to)
virtual void IfRegisterLT(int reg, int comparand, Label *if_lt)
virtual void ClearRegisters(int reg_from, int reg_to)
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
virtual bool CanReadUnaligned()
virtual void PushRegister(int register_index, StackCheckFlag check_stack_limit)
virtual void CheckCharacterLT(uc16 limit, Label *on_less)
virtual int stack_limit_slack()
virtual void AdvanceCurrentPosition(int by)
virtual void WriteStackPointerToRegister(int reg)
virtual void IfRegisterEqPos(int reg, Label *if_eq)
virtual void LoadCurrentCharacter(int cp_offset, Label *on_end_of_input, bool check_bounds=true, int characters=1)
virtual IrregexpImplementation Implementation()
static int CheckStackGuardState(Address *return_address, Code *re_code, Address re_frame)
virtual void CheckCharacterInRange(uc16 from, uc16 to, Label *on_in_range)
virtual void CheckCharacterNotInRange(uc16 from, uc16 to, Label *on_not_in_range)
virtual void CheckBitInTable(Handle< ByteArray > table, Label *on_bit_set)
virtual void CheckCharacterGT(uc16 limit, Label *on_greater)
virtual ~RegExpMacroAssemblerMIPS()
virtual void CheckPosition(int cp_offset, Label *on_outside_input)
virtual void WriteCurrentPositionToRegister(int reg, int cp_offset)
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 expose natives in global object expose freeBuffer extension expose gc extension under the specified name expose externalize string extension number of stack frames to capture disable builtin natives files print name of functions for which code is generated use random jit cookie to mask large constants trace lazy optimization use adaptive optimizations always try to OSR functions trace optimize function deoptimization minimum length for automatic enable preparsing maximum number of optimization attempts before giving up cache prototype transitions trace debugging JSON request response trace out of bounds accesses to external arrays trace_js_array_abuse automatically set the debug break flag when debugger commands are in the queue abort by crashing maximum length of function source code printed in a stack trace max size of the new max size of the old max size of executable always perform global GCs print one trace line following each garbage collection do not print trace line after scavenger collection print statistics of the maximum memory committed for the heap in name
virtual void CheckGreedyLoop(Label *on_tos_equals_current_position)
virtual void Bind(Label *label)
virtual void CheckNotCharacterAfterMinusAnd(uc16 c, uc16 minus, uc16 mask, Label *on_not_equal)
virtual void ReadStackPointerFromRegister(int reg)