OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 BranchOrBacktrack(less, on_less); | 219 BranchOrBacktrack(less, on_less); |
220 } | 220 } |
221 | 221 |
222 | 222 |
223 void RegExpMacroAssemblerX64::CheckCharacters(Vector<const uc16> str, | 223 void RegExpMacroAssemblerX64::CheckCharacters(Vector<const uc16> str, |
224 int cp_offset, | 224 int cp_offset, |
225 Label* on_failure, | 225 Label* on_failure, |
226 bool check_end_of_string) { | 226 bool check_end_of_string) { |
227 #ifdef DEBUG | 227 #ifdef DEBUG |
228 // If input is ASCII, don't even bother calling here if the string to | 228 // If input is ASCII, don't even bother calling here if the string to |
229 // match contains a non-ascii character. | 229 // match contains a non-ASCII character. |
230 if (mode_ == ASCII) { | 230 if (mode_ == ASCII) { |
231 ASSERT(String::IsAscii(str.start(), str.length())); | 231 ASSERT(String::IsAscii(str.start(), str.length())); |
232 } | 232 } |
233 #endif | 233 #endif |
234 int byte_length = str.length() * char_size(); | 234 int byte_length = str.length() * char_size(); |
235 int byte_offset = cp_offset * char_size(); | 235 int byte_offset = cp_offset * char_size(); |
236 if (check_end_of_string) { | 236 if (check_end_of_string) { |
237 // Check that there are at least str.length() characters left in the input. | 237 // Check that there are at least str.length() characters left in the input. |
238 __ cmpl(rdi, Immediate(-(byte_offset + byte_length))); | 238 __ cmpl(rdi, Immediate(-(byte_offset + byte_length))); |
239 BranchOrBacktrack(greater, on_failure); | 239 BranchOrBacktrack(greater, on_failure); |
(...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1416 } | 1416 } |
1417 } | 1417 } |
1418 | 1418 |
1419 #undef __ | 1419 #undef __ |
1420 | 1420 |
1421 #endif // V8_INTERPRETED_REGEXP | 1421 #endif // V8_INTERPRETED_REGEXP |
1422 | 1422 |
1423 }} // namespace v8::internal | 1423 }} // namespace v8::internal |
1424 | 1424 |
1425 #endif // V8_TARGET_ARCH_X64 | 1425 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |