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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 BranchOrBacktrack(less, on_less); | 203 BranchOrBacktrack(less, on_less); |
204 } | 204 } |
205 | 205 |
206 | 206 |
207 void RegExpMacroAssemblerIA32::CheckCharacters(Vector<const uc16> str, | 207 void RegExpMacroAssemblerIA32::CheckCharacters(Vector<const uc16> str, |
208 int cp_offset, | 208 int cp_offset, |
209 Label* on_failure, | 209 Label* on_failure, |
210 bool check_end_of_string) { | 210 bool check_end_of_string) { |
211 #ifdef DEBUG | 211 #ifdef DEBUG |
212 // If input is ASCII, don't even bother calling here if the string to | 212 // If input is ASCII, don't even bother calling here if the string to |
213 // match contains a non-ascii character. | 213 // match contains a non-ASCII character. |
214 if (mode_ == ASCII) { | 214 if (mode_ == ASCII) { |
215 ASSERT(String::IsAscii(str.start(), str.length())); | 215 ASSERT(String::IsAscii(str.start(), str.length())); |
216 } | 216 } |
217 #endif | 217 #endif |
218 int byte_length = str.length() * char_size(); | 218 int byte_length = str.length() * char_size(); |
219 int byte_offset = cp_offset * char_size(); | 219 int byte_offset = cp_offset * char_size(); |
220 if (check_end_of_string) { | 220 if (check_end_of_string) { |
221 // Check that there are at least str.length() characters left in the input. | 221 // Check that there are at least str.length() characters left in the input. |
222 __ cmp(edi, Immediate(-(byte_offset + byte_length))); | 222 __ cmp(edi, Immediate(-(byte_offset + byte_length))); |
223 BranchOrBacktrack(greater, on_failure); | 223 BranchOrBacktrack(greater, on_failure); |
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1281 } | 1281 } |
1282 | 1282 |
1283 | 1283 |
1284 #undef __ | 1284 #undef __ |
1285 | 1285 |
1286 #endif // V8_INTERPRETED_REGEXP | 1286 #endif // V8_INTERPRETED_REGEXP |
1287 | 1287 |
1288 }} // namespace v8::internal | 1288 }} // namespace v8::internal |
1289 | 1289 |
1290 #endif // V8_TARGET_ARCH_IA32 | 1290 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |