| 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 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 // The sequence of instructions that is patched out for aging code is the | 831 // The sequence of instructions that is patched out for aging code is the |
| 832 // following boilerplate stack-building prologue that is found in FUNCTIONS | 832 // following boilerplate stack-building prologue that is found in FUNCTIONS |
| 833 static bool initialized = false; | 833 static bool initialized = false; |
| 834 static uint32_t sequence[kNoCodeAgeSequenceLength]; | 834 static uint32_t sequence[kNoCodeAgeSequenceLength]; |
| 835 byte* byte_sequence = reinterpret_cast<byte*>(sequence); | 835 byte* byte_sequence = reinterpret_cast<byte*>(sequence); |
| 836 *length = kNoCodeAgeSequenceLength * Assembler::kInstrSize; | 836 *length = kNoCodeAgeSequenceLength * Assembler::kInstrSize; |
| 837 if (!initialized) { | 837 if (!initialized) { |
| 838 CodePatcher patcher(byte_sequence, kNoCodeAgeSequenceLength); | 838 CodePatcher patcher(byte_sequence, kNoCodeAgeSequenceLength); |
| 839 PredictableCodeSizeScope scope(patcher.masm(), *length); | 839 PredictableCodeSizeScope scope(patcher.masm(), *length); |
| 840 patcher.masm()->stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit()); | 840 patcher.masm()->stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit()); |
| 841 patcher.masm()->LoadRoot(ip, Heap::kUndefinedValueRootIndex); | 841 patcher.masm()->nop(ip.code()); |
| 842 patcher.masm()->add(fp, sp, Operand(2 * kPointerSize)); | 842 patcher.masm()->add(fp, sp, Operand(2 * kPointerSize)); |
| 843 initialized = true; | 843 initialized = true; |
| 844 } | 844 } |
| 845 return byte_sequence; | 845 return byte_sequence; |
| 846 } | 846 } |
| 847 | 847 |
| 848 | 848 |
| 849 bool Code::IsYoungSequence(byte* sequence) { | 849 bool Code::IsYoungSequence(byte* sequence) { |
| 850 uint32_t young_length; | 850 uint32_t young_length; |
| 851 byte* young_sequence = GetNoCodeAgeSequence(&young_length); | 851 byte* young_sequence = GetNoCodeAgeSequence(&young_length); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 patcher.masm()->add(r0, pc, Operand(-8)); | 884 patcher.masm()->add(r0, pc, Operand(-8)); |
| 885 patcher.masm()->ldr(pc, MemOperand(pc, -4)); | 885 patcher.masm()->ldr(pc, MemOperand(pc, -4)); |
| 886 patcher.masm()->dd(reinterpret_cast<uint32_t>(stub->instruction_start())); | 886 patcher.masm()->dd(reinterpret_cast<uint32_t>(stub->instruction_start())); |
| 887 } | 887 } |
| 888 } | 888 } |
| 889 | 889 |
| 890 | 890 |
| 891 } } // namespace v8::internal | 891 } } // namespace v8::internal |
| 892 | 892 |
| 893 #endif // V8_TARGET_ARCH_ARM | 893 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |