Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: src/ia32/regexp-macro-assembler-ia32.cc

Issue 6066010: Merge 6095:6198 from bleeding_edge to experimental/gc. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008-2009 the V8 project authors. All rights reserved. 1 // Copyright 2008-2009 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 205
206 void RegExpMacroAssemblerIA32::CheckCharacters(Vector<const uc16> str, 206 void RegExpMacroAssemblerIA32::CheckCharacters(Vector<const uc16> str,
207 int cp_offset, 207 int cp_offset,
208 Label* on_failure, 208 Label* on_failure,
209 bool check_end_of_string) { 209 bool check_end_of_string) {
210 #ifdef DEBUG 210 #ifdef DEBUG
211 // If input is ASCII, don't even bother calling here if the string to 211 // If input is ASCII, don't even bother calling here if the string to
212 // match contains a non-ascii character. 212 // match contains a non-ascii character.
213 if (mode_ == ASCII) { 213 if (mode_ == ASCII) {
214 for (int i = 0; i < str.length(); i++) { 214 ASSERT(String::IsAscii(str.start(), str.length()));
215 ASSERT(str[i] <= String::kMaxAsciiCharCodeU);
216 }
217 } 215 }
218 #endif 216 #endif
219 int byte_length = str.length() * char_size(); 217 int byte_length = str.length() * char_size();
220 int byte_offset = cp_offset * char_size(); 218 int byte_offset = cp_offset * char_size();
221 if (check_end_of_string) { 219 if (check_end_of_string) {
222 // Check that there are at least str.length() characters left in the input. 220 // Check that there are at least str.length() characters left in the input.
223 __ cmp(Operand(edi), Immediate(-(byte_offset + byte_length))); 221 __ cmp(Operand(edi), Immediate(-(byte_offset + byte_length)));
224 BranchOrBacktrack(greater, on_failure); 222 BranchOrBacktrack(greater, on_failure);
225 } 223 }
226 224
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 } 645 }
648 // No custom implementation (yet): s(UC16), S(UC16). 646 // No custom implementation (yet): s(UC16), S(UC16).
649 default: 647 default:
650 return false; 648 return false;
651 } 649 }
652 } 650 }
653 651
654 652
655 void RegExpMacroAssemblerIA32::Fail() { 653 void RegExpMacroAssemblerIA32::Fail() {
656 ASSERT(FAILURE == 0); // Return value for failure is zero. 654 ASSERT(FAILURE == 0); // Return value for failure is zero.
657 __ xor_(eax, Operand(eax)); // zero eax. 655 __ Set(eax, Immediate(0));
658 __ jmp(&exit_label_); 656 __ jmp(&exit_label_);
659 } 657 }
660 658
661 659
662 Handle<Object> RegExpMacroAssemblerIA32::GetCode(Handle<String> source) { 660 Handle<Object> RegExpMacroAssemblerIA32::GetCode(Handle<String> source) {
663 // Finalize code - write the entry point code now we know how many 661 // Finalize code - write the entry point code now we know how many
664 // registers we need. 662 // registers we need.
665 663
666 // Entry code: 664 // Entry code:
667 __ bind(&entry_label_); 665 __ bind(&entry_label_);
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 } 1244 }
1247 1245
1248 1246
1249 #undef __ 1247 #undef __
1250 1248
1251 #endif // V8_INTERPRETED_REGEXP 1249 #endif // V8_INTERPRETED_REGEXP
1252 1250
1253 }} // namespace v8::internal 1251 }} // namespace v8::internal
1254 1252
1255 #endif // V8_TARGET_ARCH_IA32 1253 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698