OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_REGEXP_MACRO_ASSEMBLER_H_ | 5 #ifndef V8_REGEXP_MACRO_ASSEMBLER_H_ |
6 #define V8_REGEXP_MACRO_ASSEMBLER_H_ | 6 #define V8_REGEXP_MACRO_ASSEMBLER_H_ |
7 | 7 |
8 #include "src/ast.h" | 8 #include "src/ast.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 30 matching lines...) Expand all Loading... |
41 kNoStackLimitCheck = false, | 41 kNoStackLimitCheck = false, |
42 kCheckStackLimit = true | 42 kCheckStackLimit = true |
43 }; | 43 }; |
44 | 44 |
45 explicit RegExpMacroAssembler(Zone* zone); | 45 explicit RegExpMacroAssembler(Zone* zone); |
46 virtual ~RegExpMacroAssembler(); | 46 virtual ~RegExpMacroAssembler(); |
47 // The maximal number of pushes between stack checks. Users must supply | 47 // The maximal number of pushes between stack checks. Users must supply |
48 // kCheckStackLimit flag to push operations (instead of kNoStackLimitCheck) | 48 // kCheckStackLimit flag to push operations (instead of kNoStackLimitCheck) |
49 // at least once for every stack_limit() pushes that are executed. | 49 // at least once for every stack_limit() pushes that are executed. |
50 virtual int stack_limit_slack() = 0; | 50 virtual int stack_limit_slack() = 0; |
51 virtual bool CanReadUnaligned(); | 51 virtual bool CanReadUnaligned() = 0; |
52 virtual void AdvanceCurrentPosition(int by) = 0; // Signed cp change. | 52 virtual void AdvanceCurrentPosition(int by) = 0; // Signed cp change. |
53 virtual void AdvanceRegister(int reg, int by) = 0; // r[reg] += by. | 53 virtual void AdvanceRegister(int reg, int by) = 0; // r[reg] += by. |
54 // Continues execution from the position pushed on the top of the backtrack | 54 // Continues execution from the position pushed on the top of the backtrack |
55 // stack by an earlier PushBacktrack(Label*). | 55 // stack by an earlier PushBacktrack(Label*). |
56 virtual void Backtrack() = 0; | 56 virtual void Backtrack() = 0; |
57 virtual void Bind(Label* label) = 0; | 57 virtual void Bind(Label* label) = 0; |
58 virtual void CheckAtStart(Label* on_at_start) = 0; | 58 virtual void CheckAtStart(Label* on_at_start) = 0; |
59 // Dispatch after looking the current character up in a 2-bits-per-entry | 59 // Dispatch after looking the current character up in a 2-bits-per-entry |
60 // map. The destinations vector has up to 4 labels. | 60 // map. The destinations vector has up to 4 labels. |
61 virtual void CheckCharacter(unsigned c, Label* on_equal) = 0; | 61 virtual void CheckCharacter(unsigned c, Label* on_equal) = 0; |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 int* output, | 229 int* output, |
230 int output_size, | 230 int output_size, |
231 Isolate* isolate); | 231 Isolate* isolate); |
232 }; | 232 }; |
233 | 233 |
234 #endif // V8_INTERPRETED_REGEXP | 234 #endif // V8_INTERPRETED_REGEXP |
235 | 235 |
236 } } // namespace v8::internal | 236 } } // namespace v8::internal |
237 | 237 |
238 #endif // V8_REGEXP_MACRO_ASSEMBLER_H_ | 238 #endif // V8_REGEXP_MACRO_ASSEMBLER_H_ |
OLD | NEW |