| OLD | NEW |
| 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 2 // All Rights Reserved. | 2 // All Rights Reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions | 5 // modification, are permitted provided that the following conditions |
| 6 // are met: | 6 // are met: |
| 7 // | 7 // |
| 8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
| 9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
| 10 // | 10 // |
| (...skipping 3641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3652 } else { | 3652 } else { |
| 3653 desc.buffer_size = buffer_size_ + 1*MB; | 3653 desc.buffer_size = buffer_size_ + 1*MB; |
| 3654 } | 3654 } |
| 3655 CHECK_GT(desc.buffer_size, 0); // no overflow | 3655 CHECK_GT(desc.buffer_size, 0); // no overflow |
| 3656 | 3656 |
| 3657 // Set up new buffer. | 3657 // Set up new buffer. |
| 3658 desc.buffer = NewArray<byte>(desc.buffer_size); | 3658 desc.buffer = NewArray<byte>(desc.buffer_size); |
| 3659 | 3659 |
| 3660 desc.instr_size = pc_offset(); | 3660 desc.instr_size = pc_offset(); |
| 3661 desc.reloc_size = (buffer_ + buffer_size_) - reloc_info_writer.pos(); | 3661 desc.reloc_size = (buffer_ + buffer_size_) - reloc_info_writer.pos(); |
| 3662 desc.origin = this; |
| 3662 | 3663 |
| 3663 // Copy the data. | 3664 // Copy the data. |
| 3664 int pc_delta = desc.buffer - buffer_; | 3665 int pc_delta = desc.buffer - buffer_; |
| 3665 int rc_delta = (desc.buffer + desc.buffer_size) - (buffer_ + buffer_size_); | 3666 int rc_delta = (desc.buffer + desc.buffer_size) - (buffer_ + buffer_size_); |
| 3666 MemMove(desc.buffer, buffer_, desc.instr_size); | 3667 MemMove(desc.buffer, buffer_, desc.instr_size); |
| 3667 MemMove(reloc_info_writer.pos() + rc_delta, reloc_info_writer.pos(), | 3668 MemMove(reloc_info_writer.pos() + rc_delta, reloc_info_writer.pos(), |
| 3668 desc.reloc_size); | 3669 desc.reloc_size); |
| 3669 | 3670 |
| 3670 // Switch buffers. | 3671 // Switch buffers. |
| 3671 DeleteArray(buffer_); | 3672 DeleteArray(buffer_); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3727 // Don't record external references unless the heap will be serialized. | 3728 // Don't record external references unless the heap will be serialized. |
| 3728 (rmode == RelocInfo::EXTERNAL_REFERENCE && !serializer_enabled() && | 3729 (rmode == RelocInfo::EXTERNAL_REFERENCE && !serializer_enabled() && |
| 3729 !emit_debug_code())) { | 3730 !emit_debug_code())) { |
| 3730 return; | 3731 return; |
| 3731 } | 3732 } |
| 3732 DCHECK(buffer_space() >= kMaxRelocSize); // too late to grow buffer here | 3733 DCHECK(buffer_space() >= kMaxRelocSize); // too late to grow buffer here |
| 3733 if (rmode == RelocInfo::CODE_TARGET_WITH_ID) { | 3734 if (rmode == RelocInfo::CODE_TARGET_WITH_ID) { |
| 3734 data = RecordedAstId().ToInt(); | 3735 data = RecordedAstId().ToInt(); |
| 3735 ClearRecordedAstId(); | 3736 ClearRecordedAstId(); |
| 3736 } | 3737 } |
| 3737 RelocInfo rinfo(pc_, rmode, data, NULL); | 3738 RelocInfo rinfo(isolate(), pc_, rmode, data, NULL); |
| 3738 reloc_info_writer.Write(&rinfo); | 3739 reloc_info_writer.Write(&rinfo); |
| 3739 } | 3740 } |
| 3740 | 3741 |
| 3741 | 3742 |
| 3742 ConstantPoolEntry::Access Assembler::ConstantPoolAddEntry(int position, | 3743 ConstantPoolEntry::Access Assembler::ConstantPoolAddEntry(int position, |
| 3743 RelocInfo::Mode rmode, | 3744 RelocInfo::Mode rmode, |
| 3744 intptr_t value) { | 3745 intptr_t value) { |
| 3745 DCHECK(rmode != RelocInfo::COMMENT && rmode != RelocInfo::POSITION && | 3746 DCHECK(rmode != RelocInfo::COMMENT && rmode != RelocInfo::POSITION && |
| 3746 rmode != RelocInfo::STATEMENT_POSITION && | 3747 rmode != RelocInfo::STATEMENT_POSITION && |
| 3747 rmode != RelocInfo::CONST_POOL && rmode != RelocInfo::NONE64); | 3748 rmode != RelocInfo::CONST_POOL && rmode != RelocInfo::NONE64); |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4104 DCHECK(is_uint12(offset)); | 4105 DCHECK(is_uint12(offset)); |
| 4105 instr_at_put(pc, SetLdrRegisterImmediateOffset(instr, offset)); | 4106 instr_at_put(pc, SetLdrRegisterImmediateOffset(instr, offset)); |
| 4106 } | 4107 } |
| 4107 } | 4108 } |
| 4108 | 4109 |
| 4109 | 4110 |
| 4110 } // namespace internal | 4111 } // namespace internal |
| 4111 } // namespace v8 | 4112 } // namespace v8 |
| 4112 | 4113 |
| 4113 #endif // V8_TARGET_ARCH_ARM | 4114 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |