OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64_REGEXP_MACRO_ASSEMBLER_ARM64_H_ | 5 #ifndef V8_REGEXP_ARM64_REGEXP_MACRO_ASSEMBLER_ARM64_H_ |
6 #define V8_REGEXP_ARM64_REGEXP_MACRO_ASSEMBLER_ARM64_H_ | 6 #define V8_REGEXP_ARM64_REGEXP_MACRO_ASSEMBLER_ARM64_H_ |
7 | 7 |
8 #include "src/arm64/assembler-arm64.h" | 8 #include "src/arm64/assembler-arm64.h" |
9 #include "src/macro-assembler.h" | 9 #include "src/macro-assembler.h" |
10 #include "src/regexp/regexp-macro-assembler.h" | 10 #include "src/regexp/regexp-macro-assembler.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 Label* on_equal); | 32 Label* on_equal); |
33 virtual void CheckCharacterGT(uc16 limit, Label* on_greater); | 33 virtual void CheckCharacterGT(uc16 limit, Label* on_greater); |
34 virtual void CheckCharacterLT(uc16 limit, Label* on_less); | 34 virtual void CheckCharacterLT(uc16 limit, Label* on_less); |
35 virtual void CheckCharacters(Vector<const uc16> str, | 35 virtual void CheckCharacters(Vector<const uc16> str, |
36 int cp_offset, | 36 int cp_offset, |
37 Label* on_failure, | 37 Label* on_failure, |
38 bool check_end_of_string); | 38 bool check_end_of_string); |
39 // A "greedy loop" is a loop that is both greedy and with a simple | 39 // A "greedy loop" is a loop that is both greedy and with a simple |
40 // body. It has a particularly simple implementation. | 40 // body. It has a particularly simple implementation. |
41 virtual void CheckGreedyLoop(Label* on_tos_equals_current_position); | 41 virtual void CheckGreedyLoop(Label* on_tos_equals_current_position); |
42 virtual void CheckNotAtStart(Label* on_not_at_start); | 42 virtual void CheckNotAtStart(int cp_offset, Label* on_not_at_start); |
43 virtual void CheckNotBackReference(int start_reg, Label* on_no_match); | 43 virtual void CheckNotBackReference(int start_reg, bool read_backward, |
| 44 Label* on_no_match); |
44 virtual void CheckNotBackReferenceIgnoreCase(int start_reg, | 45 virtual void CheckNotBackReferenceIgnoreCase(int start_reg, |
| 46 bool read_backward, |
45 Label* on_no_match); | 47 Label* on_no_match); |
46 virtual void CheckNotCharacter(unsigned c, Label* on_not_equal); | 48 virtual void CheckNotCharacter(unsigned c, Label* on_not_equal); |
47 virtual void CheckNotCharacterAfterAnd(unsigned c, | 49 virtual void CheckNotCharacterAfterAnd(unsigned c, |
48 unsigned mask, | 50 unsigned mask, |
49 Label* on_not_equal); | 51 Label* on_not_equal); |
50 virtual void CheckNotCharacterAfterMinusAnd(uc16 c, | 52 virtual void CheckNotCharacterAfterMinusAnd(uc16 c, |
51 uc16 minus, | 53 uc16 minus, |
52 uc16 mask, | 54 uc16 mask, |
53 Label* on_not_equal); | 55 Label* on_not_equal); |
54 virtual void CheckCharacterInRange(uc16 from, | 56 virtual void CheckCharacterInRange(uc16 from, |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 Register frame_pointer() { return fp; } | 185 Register frame_pointer() { return fp; } |
184 | 186 |
185 // The register containing the backtrack stack top. Provides a meaningful | 187 // The register containing the backtrack stack top. Provides a meaningful |
186 // name to the register. | 188 // name to the register. |
187 Register backtrack_stackpointer() { return x23; } | 189 Register backtrack_stackpointer() { return x23; } |
188 | 190 |
189 // Register holding pointer to the current code object. | 191 // Register holding pointer to the current code object. |
190 Register code_pointer() { return x20; } | 192 Register code_pointer() { return x20; } |
191 | 193 |
192 // Register holding the value used for clearing capture registers. | 194 // Register holding the value used for clearing capture registers. |
193 Register non_position_value() { return w24; } | 195 Register string_start_minus_one() { return w24; } |
194 // The top 32 bit of this register is used to store this value | 196 // The top 32 bit of this register is used to store this value |
195 // twice. This is used for clearing more than one register at a time. | 197 // twice. This is used for clearing more than one register at a time. |
196 Register twice_non_position_value() { return x24; } | 198 Register twice_non_position_value() { return x24; } |
197 | 199 |
198 // Byte size of chars in the string to match (decided by the Mode argument) | 200 // Byte size of chars in the string to match (decided by the Mode argument) |
199 int char_size() { return static_cast<int>(mode_); } | 201 int char_size() { return static_cast<int>(mode_); } |
200 | 202 |
201 // Equivalent to a conditional branch to the label, unless the label | 203 // Equivalent to a conditional branch to the label, unless the label |
202 // is NULL, in which case it is a conditional Backtrack. | 204 // is NULL, in which case it is a conditional Backtrack. |
203 void BranchOrBacktrack(Condition condition, Label* to); | 205 void BranchOrBacktrack(Condition condition, Label* to); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 Label stack_overflow_label_; | 288 Label stack_overflow_label_; |
287 }; | 289 }; |
288 | 290 |
289 #endif // V8_INTERPRETED_REGEXP | 291 #endif // V8_INTERPRETED_REGEXP |
290 | 292 |
291 | 293 |
292 } // namespace internal | 294 } // namespace internal |
293 } // namespace v8 | 295 } // namespace v8 |
294 | 296 |
295 #endif // V8_REGEXP_ARM64_REGEXP_MACRO_ASSEMBLER_ARM64_H_ | 297 #endif // V8_REGEXP_ARM64_REGEXP_MACRO_ASSEMBLER_ARM64_H_ |
OLD | NEW |