| OLD | NEW |
| 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 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 times_2, | 744 times_2, |
| 745 SeqTwoByteString::kHeaderSize)); | 745 SeqTwoByteString::kHeaderSize)); |
| 746 __ jmp(&done, Label::kNear); | 746 __ jmp(&done, Label::kNear); |
| 747 | 747 |
| 748 // Ascii string. | 748 // Ascii string. |
| 749 // Load the byte into the result register. | 749 // Load the byte into the result register. |
| 750 __ bind(&ascii); | 750 __ bind(&ascii); |
| 751 __ movzx_b(result, FieldOperand(string, | 751 __ movzx_b(result, FieldOperand(string, |
| 752 index, | 752 index, |
| 753 times_1, | 753 times_1, |
| 754 SeqAsciiString::kHeaderSize)); | 754 SeqOneByteString::kHeaderSize)); |
| 755 __ bind(&done); | 755 __ bind(&done); |
| 756 } | 756 } |
| 757 | 757 |
| 758 #undef __ | 758 #undef __ |
| 759 | 759 |
| 760 static const int kNoCodeAgeSequenceLength = 5; | 760 static const int kNoCodeAgeSequenceLength = 5; |
| 761 | 761 |
| 762 static byte* GetNoCodeAgeSequence(uint32_t* length) { | 762 static byte* GetNoCodeAgeSequence(uint32_t* length) { |
| 763 static bool initialized = false; | 763 static bool initialized = false; |
| 764 static byte sequence[kNoCodeAgeSequenceLength]; | 764 static byte sequence[kNoCodeAgeSequenceLength]; |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 850 Code* stub = GetCodeAgeStub(age, parity); | 850 Code* stub = GetCodeAgeStub(age, parity); |
| 851 CodePatcher patcher(sequence, young_length); | 851 CodePatcher patcher(sequence, young_length); |
| 852 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE); | 852 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE); |
| 853 } | 853 } |
| 854 } | 854 } |
| 855 | 855 |
| 856 | 856 |
| 857 } } // namespace v8::internal | 857 } } // namespace v8::internal |
| 858 | 858 |
| 859 #endif // V8_TARGET_ARCH_IA32 | 859 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |