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

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

Issue 9600009: Fix input and output to handle UTF16 surrogate pairs. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 9 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
OLDNEW
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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 __ cmpl(rax, Immediate(c)); 557 __ cmpl(rax, Immediate(c));
558 BranchOrBacktrack(not_equal, on_not_equal); 558 BranchOrBacktrack(not_equal, on_not_equal);
559 } 559 }
560 560
561 561
562 void RegExpMacroAssemblerX64::CheckNotCharacterAfterMinusAnd( 562 void RegExpMacroAssemblerX64::CheckNotCharacterAfterMinusAnd(
563 uc16 c, 563 uc16 c,
564 uc16 minus, 564 uc16 minus,
565 uc16 mask, 565 uc16 mask,
566 Label* on_not_equal) { 566 Label* on_not_equal) {
567 ASSERT(minus < String::kMaxUC16CharCode); 567 ASSERT(minus < String::kMaxUtf16CodeUnit);
568 __ lea(rax, Operand(current_character(), -minus)); 568 __ lea(rax, Operand(current_character(), -minus));
569 __ and_(rax, Immediate(mask)); 569 __ and_(rax, Immediate(mask));
570 __ cmpl(rax, Immediate(c)); 570 __ cmpl(rax, Immediate(c));
571 BranchOrBacktrack(not_equal, on_not_equal); 571 BranchOrBacktrack(not_equal, on_not_equal);
572 } 572 }
573 573
574 574
575 bool RegExpMacroAssemblerX64::CheckSpecialCharacterClass(uc16 type, 575 bool RegExpMacroAssemblerX64::CheckSpecialCharacterClass(uc16 type,
576 Label* on_no_match) { 576 Label* on_no_match) {
577 // Range checks (c in min..max) are generally implemented by an unsigned 577 // Range checks (c in min..max) are generally implemented by an unsigned
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« src/unicode.h ('K') | « src/unicode-inl.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698