OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 // We detected a stack overflow (on the backtrack stack) in RegExp code, | 182 // We detected a stack overflow (on the backtrack stack) in RegExp code, |
183 // but haven't created the exception yet. | 183 // but haven't created the exception yet. |
184 Top::StackOverflow(); | 184 Top::StackOverflow(); |
185 } | 185 } |
186 return static_cast<Result>(result); | 186 return static_cast<Result>(result); |
187 } | 187 } |
188 | 188 |
189 | 189 |
190 static unibrow::Mapping<unibrow::Ecma262Canonicalize> canonicalize; | 190 static unibrow::Mapping<unibrow::Ecma262Canonicalize> canonicalize; |
191 | 191 |
| 192 |
| 193 byte NativeRegExpMacroAssembler::word_character_map[] = { |
| 194 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, |
| 195 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, |
| 196 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, |
| 197 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, |
| 198 |
| 199 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, |
| 200 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, |
| 201 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, // '0' - '7' |
| 202 0xffu, 0xffu, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, // '8' - '9' |
| 203 |
| 204 0x00u, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, // 'A' - 'G' |
| 205 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, // 'H' - 'O' |
| 206 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, // 'P' - 'W' |
| 207 0xffu, 0xffu, 0xffu, 0x00u, 0x00u, 0x00u, 0x00u, 0xffu, // 'X' - 'Z', '_' |
| 208 |
| 209 0x00u, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, // 'a' - 'g' |
| 210 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, // 'h' - 'o' |
| 211 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, // 'p' - 'w' |
| 212 0xffu, 0xffu, 0xffu, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, // 'x' - 'z' |
| 213 }; |
| 214 |
| 215 |
192 int NativeRegExpMacroAssembler::CaseInsensitiveCompareUC16( | 216 int NativeRegExpMacroAssembler::CaseInsensitiveCompareUC16( |
193 Address byte_offset1, | 217 Address byte_offset1, |
194 Address byte_offset2, | 218 Address byte_offset2, |
195 size_t byte_length) { | 219 size_t byte_length) { |
196 // This function is not allowed to cause a garbage collection. | 220 // This function is not allowed to cause a garbage collection. |
197 // A GC might move the calling generated code and invalidate the | 221 // A GC might move the calling generated code and invalidate the |
198 // return address on the stack. | 222 // return address on the stack. |
199 ASSERT(byte_length % 2 == 0); | 223 ASSERT(byte_length % 2 == 0); |
200 uc16* substring1 = reinterpret_cast<uc16*>(byte_offset1); | 224 uc16* substring1 = reinterpret_cast<uc16*>(byte_offset1); |
201 uc16* substring2 = reinterpret_cast<uc16*>(byte_offset2); | 225 uc16* substring2 = reinterpret_cast<uc16*>(byte_offset2); |
(...skipping 29 matching lines...) Expand all Loading... |
231 if (new_stack_base == NULL) { | 255 if (new_stack_base == NULL) { |
232 return NULL; | 256 return NULL; |
233 } | 257 } |
234 *stack_base = new_stack_base; | 258 *stack_base = new_stack_base; |
235 intptr_t stack_content_size = old_stack_base - stack_pointer; | 259 intptr_t stack_content_size = old_stack_base - stack_pointer; |
236 return new_stack_base - stack_content_size; | 260 return new_stack_base - stack_content_size; |
237 } | 261 } |
238 | 262 |
239 #endif // V8_NATIVE_REGEXP | 263 #endif // V8_NATIVE_REGEXP |
240 } } // namespace v8::internal | 264 } } // namespace v8::internal |
OLD | NEW |