| 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_X64_REGEXP_MACRO_ASSEMBLER_X64_H_ | 5 #ifndef V8_REGEXP_X64_REGEXP_MACRO_ASSEMBLER_X64_H_ |
| 6 #define V8_REGEXP_X64_REGEXP_MACRO_ASSEMBLER_X64_H_ | 6 #define V8_REGEXP_X64_REGEXP_MACRO_ASSEMBLER_X64_H_ |
| 7 | 7 |
| 8 #include "src/macro-assembler.h" | 8 #include "src/macro-assembler.h" |
| 9 #include "src/regexp/regexp-macro-assembler.h" | 9 #include "src/regexp/regexp-macro-assembler.h" |
| 10 #include "src/x64/assembler-x64.h" | 10 #include "src/x64/assembler-x64.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 virtual void CheckAtStart(Label* on_at_start); | 27 virtual void CheckAtStart(Label* on_at_start); |
| 28 virtual void CheckCharacter(uint32_t c, Label* on_equal); | 28 virtual void CheckCharacter(uint32_t c, Label* on_equal); |
| 29 virtual void CheckCharacterAfterAnd(uint32_t c, | 29 virtual void CheckCharacterAfterAnd(uint32_t c, |
| 30 uint32_t mask, | 30 uint32_t mask, |
| 31 Label* on_equal); | 31 Label* on_equal); |
| 32 virtual void CheckCharacterGT(uc16 limit, Label* on_greater); | 32 virtual void CheckCharacterGT(uc16 limit, Label* on_greater); |
| 33 virtual void CheckCharacterLT(uc16 limit, Label* on_less); | 33 virtual void CheckCharacterLT(uc16 limit, Label* on_less); |
| 34 // A "greedy loop" is a loop that is both greedy and with a simple | 34 // A "greedy loop" is a loop that is both greedy and with a simple |
| 35 // body. It has a particularly simple implementation. | 35 // body. It has a particularly simple implementation. |
| 36 virtual void CheckGreedyLoop(Label* on_tos_equals_current_position); | 36 virtual void CheckGreedyLoop(Label* on_tos_equals_current_position); |
| 37 virtual void CheckNotAtStart(int cp_offset, Label* on_not_at_start); | 37 virtual void CheckNotAtStart(Label* on_not_at_start); |
| 38 virtual void CheckNotBackReference(int start_reg, bool read_backward, | 38 virtual void CheckNotBackReference(int start_reg, Label* on_no_match); |
| 39 Label* on_no_match); | |
| 40 virtual void CheckNotBackReferenceIgnoreCase(int start_reg, | 39 virtual void CheckNotBackReferenceIgnoreCase(int start_reg, |
| 41 bool read_backward, | |
| 42 Label* on_no_match); | 40 Label* on_no_match); |
| 43 virtual void CheckNotCharacter(uint32_t c, Label* on_not_equal); | 41 virtual void CheckNotCharacter(uint32_t c, Label* on_not_equal); |
| 44 virtual void CheckNotCharacterAfterAnd(uint32_t c, | 42 virtual void CheckNotCharacterAfterAnd(uint32_t c, |
| 45 uint32_t mask, | 43 uint32_t mask, |
| 46 Label* on_not_equal); | 44 Label* on_not_equal); |
| 47 virtual void CheckNotCharacterAfterMinusAnd(uc16 c, | 45 virtual void CheckNotCharacterAfterMinusAnd(uc16 c, |
| 48 uc16 minus, | 46 uc16 minus, |
| 49 uc16 mask, | 47 uc16 mask, |
| 50 Label* on_not_equal); | 48 Label* on_not_equal); |
| 51 virtual void CheckCharacterInRange(uc16 from, | 49 virtual void CheckCharacterInRange(uc16 from, |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 // AMD64 Calling Convention has only one callee-save register that | 164 // AMD64 Calling Convention has only one callee-save register that |
| 167 // we use. We push this after the frame pointer (and after the | 165 // we use. We push this after the frame pointer (and after the |
| 168 // parameters). | 166 // parameters). |
| 169 static const int kBackup_rbx = kNumOutputRegisters - kRegisterSize; | 167 static const int kBackup_rbx = kNumOutputRegisters - kRegisterSize; |
| 170 static const int kLastCalleeSaveRegister = kBackup_rbx; | 168 static const int kLastCalleeSaveRegister = kBackup_rbx; |
| 171 #endif | 169 #endif |
| 172 | 170 |
| 173 static const int kSuccessfulCaptures = kLastCalleeSaveRegister - kPointerSize; | 171 static const int kSuccessfulCaptures = kLastCalleeSaveRegister - kPointerSize; |
| 174 // When adding local variables remember to push space for them in | 172 // When adding local variables remember to push space for them in |
| 175 // the frame in GetCode. | 173 // the frame in GetCode. |
| 176 static const int kStringStartMinusOne = kSuccessfulCaptures - kPointerSize; | 174 static const int kInputStartMinusOne = kSuccessfulCaptures - kPointerSize; |
| 177 | 175 |
| 178 // First register address. Following registers are below it on the stack. | 176 // First register address. Following registers are below it on the stack. |
| 179 static const int kRegisterZero = kStringStartMinusOne - kPointerSize; | 177 static const int kRegisterZero = kInputStartMinusOne - kPointerSize; |
| 180 | 178 |
| 181 // Initial size of code buffer. | 179 // Initial size of code buffer. |
| 182 static const size_t kRegExpCodeSize = 1024; | 180 static const size_t kRegExpCodeSize = 1024; |
| 183 | 181 |
| 184 // Load a number of characters at the given offset from the | 182 // Load a number of characters at the given offset from the |
| 185 // current position, into the current-character register. | 183 // current position, into the current-character register. |
| 186 void LoadCurrentCharacterUnchecked(int cp_offset, int character_count); | 184 void LoadCurrentCharacterUnchecked(int cp_offset, int character_count); |
| 187 | 185 |
| 188 // Check whether preemption has been requested. | 186 // Check whether preemption has been requested. |
| 189 void CheckPreemption(); | 187 void CheckPreemption(); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 Label check_preempt_label_; | 273 Label check_preempt_label_; |
| 276 Label stack_overflow_label_; | 274 Label stack_overflow_label_; |
| 277 }; | 275 }; |
| 278 | 276 |
| 279 #endif // V8_INTERPRETED_REGEXP | 277 #endif // V8_INTERPRETED_REGEXP |
| 280 | 278 |
| 281 } // namespace internal | 279 } // namespace internal |
| 282 } // namespace v8 | 280 } // namespace v8 |
| 283 | 281 |
| 284 #endif // V8_REGEXP_X64_REGEXP_MACRO_ASSEMBLER_X64_H_ | 282 #endif // V8_REGEXP_X64_REGEXP_MACRO_ASSEMBLER_X64_H_ |
| OLD | NEW |