| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 // Private methods: | 677 // Private methods: |
| 678 | 678 |
| 679 | 679 |
| 680 static unibrow::Mapping<unibrow::Ecma262Canonicalize> canonicalize; | 680 static unibrow::Mapping<unibrow::Ecma262Canonicalize> canonicalize; |
| 681 | 681 |
| 682 | 682 |
| 683 int RegExpMacroAssemblerIA32::CaseInsensitiveCompareUC16(uc16** buffer, | 683 int RegExpMacroAssemblerIA32::CaseInsensitiveCompareUC16(uc16** buffer, |
| 684 int byte_offset1, | 684 int byte_offset1, |
| 685 int byte_offset2, | 685 int byte_offset2, |
| 686 size_t byte_length) { | 686 size_t byte_length) { |
| 687 // This function MUST NOT cause a garbage collection. A GC might move | 687 // This function is not allowed to cause a garbage collection. |
| 688 // the calling generated code and invalidate the stacked return address. | 688 // A GC might move the calling generated code and invalidate the |
| 689 // return address on the stack. |
| 689 ASSERT(byte_length % 2 == 0); | 690 ASSERT(byte_length % 2 == 0); |
| 690 Address buffer_address = reinterpret_cast<Address>(*buffer); | 691 Address buffer_address = reinterpret_cast<Address>(*buffer); |
| 691 uc16* substring1 = reinterpret_cast<uc16*>(buffer_address + byte_offset1); | 692 uc16* substring1 = reinterpret_cast<uc16*>(buffer_address + byte_offset1); |
| 692 uc16* substring2 = reinterpret_cast<uc16*>(buffer_address + byte_offset2); | 693 uc16* substring2 = reinterpret_cast<uc16*>(buffer_address + byte_offset2); |
| 693 size_t length = byte_length >> 1; | 694 size_t length = byte_length >> 1; |
| 694 | 695 |
| 695 for (size_t i = 0; i < length; i++) { | 696 for (size_t i = 0; i < length; i++) { |
| 696 unibrow::uchar c1 = substring1[i]; | 697 unibrow::uchar c1 = substring1[i]; |
| 697 unibrow::uchar c2 = substring2[i]; | 698 unibrow::uchar c2 = substring2[i]; |
| 698 if (c1 != c2) { | 699 if (c1 != c2) { |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 798 | 799 |
| 799 | 800 |
| 800 void RegExpMacroAssemblerIA32::LoadConstantBufferAddress(Register reg, | 801 void RegExpMacroAssemblerIA32::LoadConstantBufferAddress(Register reg, |
| 801 ArraySlice* buffer) { | 802 ArraySlice* buffer) { |
| 802 __ mov(reg, buffer->array()); | 803 __ mov(reg, buffer->array()); |
| 803 __ add(Operand(reg), Immediate(buffer->base_offset())); | 804 __ add(Operand(reg), Immediate(buffer->base_offset())); |
| 804 } | 805 } |
| 805 | 806 |
| 806 #undef __ | 807 #undef __ |
| 807 }} // namespace v8::internal | 808 }} // namespace v8::internal |
| OLD | NEW |