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 27 matching lines...) Expand all Loading... |
38 kBytecodeImplementation | 38 kBytecodeImplementation |
39 }; | 39 }; |
40 | 40 |
41 enum StackCheckFlag { | 41 enum StackCheckFlag { |
42 kNoStackLimitCheck = false, | 42 kNoStackLimitCheck = false, |
43 kCheckStackLimit = true | 43 kCheckStackLimit = true |
44 }; | 44 }; |
45 | 45 |
46 RegExpMacroAssembler(Isolate* isolate, Zone* zone); | 46 RegExpMacroAssembler(Isolate* isolate, Zone* zone); |
47 virtual ~RegExpMacroAssembler(); | 47 virtual ~RegExpMacroAssembler(); |
| 48 // This function is called when code generation is aborted, so that |
| 49 // the assembler could clean up internal data structures. |
| 50 virtual void AbortedCodeGeneration() {} |
48 // The maximal number of pushes between stack checks. Users must supply | 51 // The maximal number of pushes between stack checks. Users must supply |
49 // kCheckStackLimit flag to push operations (instead of kNoStackLimitCheck) | 52 // kCheckStackLimit flag to push operations (instead of kNoStackLimitCheck) |
50 // at least once for every stack_limit() pushes that are executed. | 53 // at least once for every stack_limit() pushes that are executed. |
51 virtual int stack_limit_slack() = 0; | 54 virtual int stack_limit_slack() = 0; |
52 virtual bool CanReadUnaligned() = 0; | 55 virtual bool CanReadUnaligned() = 0; |
53 virtual void AdvanceCurrentPosition(int by) = 0; // Signed cp change. | 56 virtual void AdvanceCurrentPosition(int by) = 0; // Signed cp change. |
54 virtual void AdvanceRegister(int reg, int by) = 0; // r[reg] += by. | 57 virtual void AdvanceRegister(int reg, int by) = 0; // r[reg] += by. |
55 // Continues execution from the position pushed on the top of the backtrack | 58 // Continues execution from the position pushed on the top of the backtrack |
56 // stack by an earlier PushBacktrack(Label*). | 59 // stack by an earlier PushBacktrack(Label*). |
57 virtual void Backtrack() = 0; | 60 virtual void Backtrack() = 0; |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 int* output, | 241 int* output, |
239 int output_size, | 242 int output_size, |
240 Isolate* isolate); | 243 Isolate* isolate); |
241 }; | 244 }; |
242 | 245 |
243 #endif // V8_INTERPRETED_REGEXP | 246 #endif // V8_INTERPRETED_REGEXP |
244 | 247 |
245 } } // namespace v8::internal | 248 } } // namespace v8::internal |
246 | 249 |
247 #endif // V8_REGEXP_MACRO_ASSEMBLER_H_ | 250 #endif // V8_REGEXP_MACRO_ASSEMBLER_H_ |
OLD | NEW |