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

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

Issue 11818025: Continues Latin-1 support. All tests pass with ENABLE_LATIN_1 flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: ARM fix Created 7 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 Label loop; 337 Label loop;
338 __ bind(&loop); 338 __ bind(&loop);
339 __ movzx_b(eax, Operand(edi, 0)); 339 __ movzx_b(eax, Operand(edi, 0));
340 __ cmpb_al(Operand(edx, 0)); 340 __ cmpb_al(Operand(edx, 0));
341 __ j(equal, &loop_increment); 341 __ j(equal, &loop_increment);
342 342
343 // Mismatch, try case-insensitive match (converting letters to lower-case). 343 // Mismatch, try case-insensitive match (converting letters to lower-case).
344 __ or_(eax, 0x20); // Convert match character to lower-case. 344 __ or_(eax, 0x20); // Convert match character to lower-case.
345 __ lea(ecx, Operand(eax, -'a')); 345 __ lea(ecx, Operand(eax, -'a'));
346 __ cmp(ecx, static_cast<int32_t>('z' - 'a')); // Is eax a lowercase letter? 346 __ cmp(ecx, static_cast<int32_t>('z' - 'a')); // Is eax a lowercase letter?
347 __ j(above, &fail); 347 #ifndef ENABLE_LATIN_1
348 __ j(above, &fail); // Weren't letters anyway.
349 #else
350 Label convert_capture;
351 __ j(below_equal, &convert_capture); // In range 'a'-'z'.
352 // Latin-1: Check for values in range [224,254] but not 247.
353 __ sub(ecx, Immediate(224 - 'a'));
354 __ cmp(ecx, Immediate(254 - 224));
355 __ j(above, &fail); // Weren't Latin-1 letters.
356 __ cmp(ecx, Immediate(247 - 224)); // Check for 247.
357 __ j(equal, &fail);
358 __ bind(&convert_capture);
359 #endif
348 // Also convert capture character. 360 // Also convert capture character.
349 __ movzx_b(ecx, Operand(edx, 0)); 361 __ movzx_b(ecx, Operand(edx, 0));
350 __ or_(ecx, 0x20); 362 __ or_(ecx, 0x20);
351 363
352 __ cmp(eax, ecx); 364 __ cmp(eax, ecx);
353 __ j(not_equal, &fail); 365 __ j(not_equal, &fail);
354 366
355 __ bind(&loop_increment); 367 __ bind(&loop_increment);
356 // Increment pointers into match and capture strings. 368 // Increment pointers into match and capture strings.
357 __ add(edx, Immediate(1)); 369 __ add(edx, Immediate(1));
(...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after
1399 } 1411 }
1400 1412
1401 1413
1402 #undef __ 1414 #undef __
1403 1415
1404 #endif // V8_INTERPRETED_REGEXP 1416 #endif // V8_INTERPRETED_REGEXP
1405 1417
1406 }} // namespace v8::internal 1418 }} // namespace v8::internal
1407 1419
1408 #endif // V8_TARGET_ARCH_IA32 1420 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/interpreter-irregexp.cc » ('j') | src/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698