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

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

Issue 12700008: remove latin-1 flag (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: removed SeqOneByteStringVerify Created 7 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
« no previous file with comments | « include/v8.h ('k') | src/heap.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 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 __ cmp(r4, r3); 330 __ cmp(r4, r3);
331 __ b(eq, &loop_check); 331 __ b(eq, &loop_check);
332 332
333 // Mismatch, try case-insensitive match (converting letters to lower-case). 333 // Mismatch, try case-insensitive match (converting letters to lower-case).
334 __ orr(r3, r3, Operand(0x20)); // Convert capture character to lower-case. 334 __ orr(r3, r3, Operand(0x20)); // Convert capture character to lower-case.
335 __ orr(r4, r4, Operand(0x20)); // Also convert input character. 335 __ orr(r4, r4, Operand(0x20)); // Also convert input character.
336 __ cmp(r4, r3); 336 __ cmp(r4, r3);
337 __ b(ne, &fail); 337 __ b(ne, &fail);
338 __ sub(r3, r3, Operand('a')); 338 __ sub(r3, r3, Operand('a'));
339 __ cmp(r3, Operand('z' - 'a')); // Is r3 a lowercase letter? 339 __ cmp(r3, Operand('z' - 'a')); // Is r3 a lowercase letter?
340 #ifndef ENABLE_LATIN_1
341 __ b(hi, &fail);
342 #else
343 __ b(ls, &loop_check); // In range 'a'-'z'. 340 __ b(ls, &loop_check); // In range 'a'-'z'.
344 // Latin-1: Check for values in range [224,254] but not 247. 341 // Latin-1: Check for values in range [224,254] but not 247.
345 __ sub(r3, r3, Operand(224 - 'a')); 342 __ sub(r3, r3, Operand(224 - 'a'));
346 __ cmp(r3, Operand(254 - 224)); 343 __ cmp(r3, Operand(254 - 224));
347 __ b(hi, &fail); // Weren't Latin-1 letters. 344 __ b(hi, &fail); // Weren't Latin-1 letters.
348 __ cmp(r3, Operand(247 - 224)); // Check for 247. 345 __ cmp(r3, Operand(247 - 224)); // Check for 247.
349 __ b(eq, &fail); 346 __ b(eq, &fail);
350 #endif
351 347
352 __ bind(&loop_check); 348 __ bind(&loop_check);
353 __ cmp(r0, r1); 349 __ cmp(r0, r1);
354 __ b(lt, &loop); 350 __ b(lt, &loop);
355 __ jmp(&success); 351 __ jmp(&success);
356 352
357 __ bind(&fail); 353 __ bind(&fail);
358 BranchOrBacktrack(al, on_no_match); 354 BranchOrBacktrack(al, on_no_match);
359 355
360 __ bind(&success); 356 __ bind(&success);
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after
1414 __ ldr(pc, MemOperand(sp, stack_alignment, PostIndex)); 1410 __ ldr(pc, MemOperand(sp, stack_alignment, PostIndex));
1415 } 1411 }
1416 1412
1417 #undef __ 1413 #undef __
1418 1414
1419 #endif // V8_INTERPRETED_REGEXP 1415 #endif // V8_INTERPRETED_REGEXP
1420 1416
1421 }} // namespace v8::internal 1417 }} // namespace v8::internal
1422 1418
1423 #endif // V8_TARGET_ARCH_ARM 1419 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698