OLD | NEW |
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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 void RegExpMacroAssemblerIrregexp::CheckNotBackReferenceIgnoreCase( | 400 void RegExpMacroAssemblerIrregexp::CheckNotBackReferenceIgnoreCase( |
401 int start_reg, | 401 int start_reg, |
402 Label* on_not_equal) { | 402 Label* on_not_equal) { |
403 ASSERT(start_reg >= 0); | 403 ASSERT(start_reg >= 0); |
404 ASSERT(start_reg <= kMaxRegister); | 404 ASSERT(start_reg <= kMaxRegister); |
405 Emit(BC_CHECK_NOT_BACK_REF_NO_CASE, start_reg); | 405 Emit(BC_CHECK_NOT_BACK_REF_NO_CASE, start_reg); |
406 EmitOrLink(on_not_equal); | 406 EmitOrLink(on_not_equal); |
407 } | 407 } |
408 | 408 |
409 | 409 |
410 void RegExpMacroAssemblerIrregexp::CheckNotRegistersEqual(int reg1, | |
411 int reg2, | |
412 Label* on_not_equal) { | |
413 ASSERT(reg1 >= 0); | |
414 ASSERT(reg1 <= kMaxRegister); | |
415 Emit(BC_CHECK_NOT_REGS_EQUAL, reg1); | |
416 Emit32(reg2); | |
417 EmitOrLink(on_not_equal); | |
418 } | |
419 | |
420 | |
421 void RegExpMacroAssemblerIrregexp::CheckCharacters( | 410 void RegExpMacroAssemblerIrregexp::CheckCharacters( |
422 Vector<const uc16> str, | 411 Vector<const uc16> str, |
423 int cp_offset, | 412 int cp_offset, |
424 Label* on_failure, | 413 Label* on_failure, |
425 bool check_end_of_string) { | 414 bool check_end_of_string) { |
426 ASSERT(cp_offset >= kMinCPOffset); | 415 ASSERT(cp_offset >= kMinCPOffset); |
427 ASSERT(cp_offset + str.length() - 1 <= kMaxCPOffset); | 416 ASSERT(cp_offset + str.length() - 1 <= kMaxCPOffset); |
428 // It is vital that this loop is backwards due to the unchecked character | 417 // It is vital that this loop is backwards due to the unchecked character |
429 // load below. | 418 // load below. |
430 for (int i = str.length() - 1; i >= 0; i--) { | 419 for (int i = str.length() - 1; i >= 0; i--) { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 own_buffer_ = true; | 487 own_buffer_ = true; |
499 memcpy(buffer_.start(), old_buffer.start(), old_buffer.length()); | 488 memcpy(buffer_.start(), old_buffer.start(), old_buffer.length()); |
500 if (old_buffer_was_our_own) { | 489 if (old_buffer_was_our_own) { |
501 old_buffer.Dispose(); | 490 old_buffer.Dispose(); |
502 } | 491 } |
503 } | 492 } |
504 | 493 |
505 #endif // V8_INTERPRETED_REGEXP | 494 #endif // V8_INTERPRETED_REGEXP |
506 | 495 |
507 } } // namespace v8::internal | 496 } } // namespace v8::internal |
OLD | NEW |