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

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

Issue 1599303002: [regexp] implement case-insensitive unicode regexps. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@unicodeclass
Patch Set: fixes Created 4 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
OLDNEW
1 // Copyright 2008-2009 the V8 project authors. All rights reserved. 1 // Copyright 2008-2009 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifdef V8_INTERPRETED_REGEXP 5 #ifdef V8_INTERPRETED_REGEXP
6 6
7 #include "src/regexp/regexp-macro-assembler-irregexp.h" 7 #include "src/regexp/regexp-macro-assembler-irregexp.h"
8 8
9 #include "src/ast/ast.h" 9 #include "src/ast/ast.h"
10 #include "src/regexp/bytecodes-irregexp.h" 10 #include "src/regexp/bytecodes-irregexp.h"
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 Label* on_not_equal) { 374 Label* on_not_equal) {
375 DCHECK(start_reg >= 0); 375 DCHECK(start_reg >= 0);
376 DCHECK(start_reg <= kMaxRegister); 376 DCHECK(start_reg <= kMaxRegister);
377 Emit(read_backward ? BC_CHECK_NOT_BACK_REF_BACKWARD : BC_CHECK_NOT_BACK_REF, 377 Emit(read_backward ? BC_CHECK_NOT_BACK_REF_BACKWARD : BC_CHECK_NOT_BACK_REF,
378 start_reg); 378 start_reg);
379 EmitOrLink(on_not_equal); 379 EmitOrLink(on_not_equal);
380 } 380 }
381 381
382 382
383 void RegExpMacroAssemblerIrregexp::CheckNotBackReferenceIgnoreCase( 383 void RegExpMacroAssemblerIrregexp::CheckNotBackReferenceIgnoreCase(
384 int start_reg, bool read_backward, Label* on_not_equal) { 384 int start_reg, bool read_backward, bool unicode, Label* on_not_equal) {
385 DCHECK(start_reg >= 0); 385 DCHECK(start_reg >= 0);
386 DCHECK(start_reg <= kMaxRegister); 386 DCHECK(start_reg <= kMaxRegister);
387 Emit(read_backward ? BC_CHECK_NOT_BACK_REF_NO_CASE_BACKWARD 387 Emit(read_backward ? (unicode ? BC_CHECK_NOT_BACK_REF_NO_CASE_UNICODE_BACKWARD
388 : BC_CHECK_NOT_BACK_REF_NO_CASE, 388 : BC_CHECK_NOT_BACK_REF_NO_CASE_BACKWARD)
389 : (unicode ? BC_CHECK_NOT_BACK_REF_NO_CASE_UNICODE
390 : BC_CHECK_NOT_BACK_REF_NO_CASE),
389 start_reg); 391 start_reg);
390 EmitOrLink(on_not_equal); 392 EmitOrLink(on_not_equal);
391 } 393 }
392 394
393 395
394 void RegExpMacroAssemblerIrregexp::IfRegisterLT(int register_index, 396 void RegExpMacroAssemblerIrregexp::IfRegisterLT(int register_index,
395 int comparand, 397 int comparand,
396 Label* on_less_than) { 398 Label* on_less_than) {
397 DCHECK(register_index >= 0); 399 DCHECK(register_index >= 0);
398 DCHECK(register_index <= kMaxRegister); 400 DCHECK(register_index <= kMaxRegister);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 MemCopy(buffer_.start(), old_buffer.start(), old_buffer.length()); 452 MemCopy(buffer_.start(), old_buffer.start(), old_buffer.length());
451 if (old_buffer_was_our_own) { 453 if (old_buffer_was_our_own) {
452 old_buffer.Dispose(); 454 old_buffer.Dispose();
453 } 455 }
454 } 456 }
455 457
456 } // namespace internal 458 } // namespace internal
457 } // namespace v8 459 } // namespace v8
458 460
459 #endif // V8_INTERPRETED_REGEXP 461 #endif // V8_INTERPRETED_REGEXP
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698