| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 // Called from RegExp if the backtrack stack limit is hit. | 208 // Called from RegExp if the backtrack stack limit is hit. |
| 209 // Tries to expand the stack. Returns the new stack-pointer if | 209 // Tries to expand the stack. Returns the new stack-pointer if |
| 210 // successful, and updates the stack_top address, or returns 0 if unable | 210 // successful, and updates the stack_top address, or returns 0 if unable |
| 211 // to grow the stack. | 211 // to grow the stack. |
| 212 // This function must not trigger a garbage collection. | 212 // This function must not trigger a garbage collection. |
| 213 static Address GrowStack(Address stack_pointer, Address* stack_top, | 213 static Address GrowStack(Address stack_pointer, Address* stack_top, |
| 214 Isolate* isolate); | 214 Isolate* isolate); |
| 215 | 215 |
| 216 static const byte* StringCharacterPosition(String* subject, int start_index); | 216 static const byte* StringCharacterPosition(String* subject, int start_index); |
| 217 | 217 |
| 218 static int CheckStackGuardState(Isolate* isolate, int start_index, |
| 219 bool is_direct_call, Address* return_address, |
| 220 Code* re_code, String** subject, |
| 221 const byte** input_start, |
| 222 const byte** input_end); |
| 223 |
| 218 // Byte map of one byte characters with a 0xff if the character is a word | 224 // Byte map of one byte characters with a 0xff if the character is a word |
| 219 // character (digit, letter or underscore) and 0x00 otherwise. | 225 // character (digit, letter or underscore) and 0x00 otherwise. |
| 220 // Used by generated RegExp code. | 226 // Used by generated RegExp code. |
| 221 static const byte word_character_map[256]; | 227 static const byte word_character_map[256]; |
| 222 | 228 |
| 223 static Address word_character_map_address() { | 229 static Address word_character_map_address() { |
| 224 return const_cast<Address>(&word_character_map[0]); | 230 return const_cast<Address>(&word_character_map[0]); |
| 225 } | 231 } |
| 226 | 232 |
| 227 static Result Execute(Code* code, | 233 static Result Execute(Code* code, |
| 228 String* input, | 234 String* input, |
| 229 int start_offset, | 235 int start_offset, |
| 230 const byte* input_start, | 236 const byte* input_start, |
| 231 const byte* input_end, | 237 const byte* input_end, |
| 232 int* output, | 238 int* output, |
| 233 int output_size, | 239 int output_size, |
| 234 Isolate* isolate); | 240 Isolate* isolate); |
| 235 }; | 241 }; |
| 236 | 242 |
| 237 #endif // V8_INTERPRETED_REGEXP | 243 #endif // V8_INTERPRETED_REGEXP |
| 238 | 244 |
| 239 } } // namespace v8::internal | 245 } } // namespace v8::internal |
| 240 | 246 |
| 241 #endif // V8_REGEXP_MACRO_ASSEMBLER_H_ | 247 #endif // V8_REGEXP_MACRO_ASSEMBLER_H_ |
| OLD | NEW |