| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 #ifndef V8_IA32_REGEXP_MACRO_ASSEMBLER_IA32_H_ | 28 #ifndef V8_IA32_REGEXP_MACRO_ASSEMBLER_IA32_H_ |
| 29 #define V8_IA32_REGEXP_MACRO_ASSEMBLER_IA32_H_ | 29 #define V8_IA32_REGEXP_MACRO_ASSEMBLER_IA32_H_ |
| 30 | 30 |
| 31 #include "ia32/assembler-ia32.h" | 31 #include "ia32/assembler-ia32.h" |
| 32 #include "ia32/assembler-ia32-inl.h" | 32 #include "ia32/assembler-ia32-inl.h" |
| 33 #include "macro-assembler.h" |
| 33 | 34 |
| 34 namespace v8 { | 35 namespace v8 { |
| 35 namespace internal { | 36 namespace internal { |
| 36 | 37 |
| 37 #ifndef V8_INTERPRETED_REGEXP | 38 #ifndef V8_INTERPRETED_REGEXP |
| 38 class RegExpMacroAssemblerIA32: public NativeRegExpMacroAssembler { | 39 class RegExpMacroAssemblerIA32: public NativeRegExpMacroAssembler { |
| 39 public: | 40 public: |
| 40 RegExpMacroAssemblerIA32(Mode mode, int registers_to_save, Zone* zone); | 41 RegExpMacroAssemblerIA32(Mode mode, int registers_to_save, Zone* zone); |
| 41 virtual ~RegExpMacroAssemblerIA32(); | 42 virtual ~RegExpMacroAssemblerIA32(); |
| 42 virtual int stack_limit_slack(); | 43 virtual int stack_limit_slack(); |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 inline void Push(Register source); | 190 inline void Push(Register source); |
| 190 | 191 |
| 191 // Pushes a value on the backtrack stack. Decrements the stack pointer (ecx) | 192 // Pushes a value on the backtrack stack. Decrements the stack pointer (ecx) |
| 192 // by a word size and stores the value there. | 193 // by a word size and stores the value there. |
| 193 inline void Push(Immediate value); | 194 inline void Push(Immediate value); |
| 194 | 195 |
| 195 // Pops a value from the backtrack stack. Reads the word at the stack pointer | 196 // Pops a value from the backtrack stack. Reads the word at the stack pointer |
| 196 // (ecx) and increments it by a word size. | 197 // (ecx) and increments it by a word size. |
| 197 inline void Pop(Register target); | 198 inline void Pop(Register target); |
| 198 | 199 |
| 200 Isolate* isolate() const { return masm_->isolate(); } |
| 201 |
| 199 MacroAssembler* masm_; | 202 MacroAssembler* masm_; |
| 200 | 203 |
| 201 // Which mode to generate code for (ASCII or UC16). | 204 // Which mode to generate code for (ASCII or UC16). |
| 202 Mode mode_; | 205 Mode mode_; |
| 203 | 206 |
| 204 // One greater than maximal register index actually used. | 207 // One greater than maximal register index actually used. |
| 205 int num_registers_; | 208 int num_registers_; |
| 206 | 209 |
| 207 // Number of registers to output at the end (the saved registers | 210 // Number of registers to output at the end (the saved registers |
| 208 // are always 0..num_saved_registers_-1) | 211 // are always 0..num_saved_registers_-1) |
| 209 int num_saved_registers_; | 212 int num_saved_registers_; |
| 210 | 213 |
| 211 // Labels used internally. | 214 // Labels used internally. |
| 212 Label entry_label_; | 215 Label entry_label_; |
| 213 Label start_label_; | 216 Label start_label_; |
| 214 Label success_label_; | 217 Label success_label_; |
| 215 Label backtrack_label_; | 218 Label backtrack_label_; |
| 216 Label exit_label_; | 219 Label exit_label_; |
| 217 Label check_preempt_label_; | 220 Label check_preempt_label_; |
| 218 Label stack_overflow_label_; | 221 Label stack_overflow_label_; |
| 219 }; | 222 }; |
| 220 #endif // V8_INTERPRETED_REGEXP | 223 #endif // V8_INTERPRETED_REGEXP |
| 221 | 224 |
| 222 }} // namespace v8::internal | 225 }} // namespace v8::internal |
| 223 | 226 |
| 224 #endif // V8_IA32_REGEXP_MACRO_ASSEMBLER_IA32_H_ | 227 #endif // V8_IA32_REGEXP_MACRO_ASSEMBLER_IA32_H_ |
| OLD | NEW |