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

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

Issue 159071: Change RegExpMacroAssemblerIA32::CaseInsensitiveCompareUC16 so that it... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 5 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 | « no previous file | no next file » | 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 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
1066 // return address on the stack. 1066 // return address on the stack.
1067 ASSERT(byte_length % 2 == 0); 1067 ASSERT(byte_length % 2 == 0);
1068 uc16* substring1 = reinterpret_cast<uc16*>(byte_offset1); 1068 uc16* substring1 = reinterpret_cast<uc16*>(byte_offset1);
1069 uc16* substring2 = reinterpret_cast<uc16*>(byte_offset2); 1069 uc16* substring2 = reinterpret_cast<uc16*>(byte_offset2);
1070 size_t length = byte_length >> 1; 1070 size_t length = byte_length >> 1;
1071 1071
1072 for (size_t i = 0; i < length; i++) { 1072 for (size_t i = 0; i < length; i++) {
1073 unibrow::uchar c1 = substring1[i]; 1073 unibrow::uchar c1 = substring1[i];
1074 unibrow::uchar c2 = substring2[i]; 1074 unibrow::uchar c2 = substring2[i];
1075 if (c1 != c2) { 1075 if (c1 != c2) {
1076 canonicalize.get(c1, '\0', &c1); 1076 unibrow::uchar s1[1] = { c1 };
1077 if (c1 != c2) { 1077 canonicalize.get(c1, '\0', s1);
1078 canonicalize.get(c2, '\0', &c2); 1078 if (s1[0] != c2) {
1079 if (c1 != c2) { 1079 unibrow::uchar s2[1] = { c2 };
1080 canonicalize.get(c2, '\0', s2);
1081 if (s1[0] != s2[0]) {
1080 return 0; 1082 return 0;
1081 } 1083 }
1082 } 1084 }
1083 } 1085 }
1084 } 1086 }
1085 return 1; 1087 return 1;
1086 } 1088 }
1087 1089
1088 1090
1089 void RegExpMacroAssemblerIA32::CallCheckStackGuardState(Register scratch) { 1091 void RegExpMacroAssemblerIA32::CallCheckStackGuardState(Register scratch) {
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1383 1385
1384 1386
1385 void RegExpMacroAssemblerIA32::LoadConstantBufferAddress(Register reg, 1387 void RegExpMacroAssemblerIA32::LoadConstantBufferAddress(Register reg,
1386 ArraySlice* buffer) { 1388 ArraySlice* buffer) {
1387 __ mov(reg, buffer->array()); 1389 __ mov(reg, buffer->array());
1388 __ add(Operand(reg), Immediate(buffer->base_offset())); 1390 __ add(Operand(reg), Immediate(buffer->base_offset()));
1389 } 1391 }
1390 1392
1391 #undef __ 1393 #undef __
1392 }} // namespace v8::internal 1394 }} // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698