Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(635)

Side by Side Diff: src/ia32/assembler-ia32-inl.h

Issue 976623002: Serializer: correctly deal with internal references. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: argh I keep making mistakes. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/disassembler.cc ('k') | src/mips/assembler-mips-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 147 }
148 if (write_barrier_mode == UPDATE_WRITE_BARRIER && 148 if (write_barrier_mode == UPDATE_WRITE_BARRIER &&
149 host() != NULL && 149 host() != NULL &&
150 target->IsHeapObject()) { 150 target->IsHeapObject()) {
151 host()->GetHeap()->incremental_marking()->RecordWrite( 151 host()->GetHeap()->incremental_marking()->RecordWrite(
152 host(), &Memory::Object_at(pc_), HeapObject::cast(target)); 152 host(), &Memory::Object_at(pc_), HeapObject::cast(target));
153 } 153 }
154 } 154 }
155 155
156 156
157 Address RelocInfo::target_reference() { 157 Address RelocInfo::target_external_reference() {
158 DCHECK(rmode_ == RelocInfo::EXTERNAL_REFERENCE); 158 DCHECK(rmode_ == RelocInfo::EXTERNAL_REFERENCE);
159 return Memory::Address_at(pc_); 159 return Memory::Address_at(pc_);
160 } 160 }
161 161
162 162
163 Address RelocInfo::target_internal_reference() {
164 DCHECK(rmode_ == INTERNAL_REFERENCE);
165 return Memory::Address_at(pc_);
166 }
167
168
169 void RelocInfo::set_target_internal_reference(Address target) {
170 DCHECK(rmode_ == INTERNAL_REFERENCE);
171 Memory::Address_at(pc_) = target;
172 }
173
174
163 Address RelocInfo::target_runtime_entry(Assembler* origin) { 175 Address RelocInfo::target_runtime_entry(Assembler* origin) {
164 DCHECK(IsRuntimeEntry(rmode_)); 176 DCHECK(IsRuntimeEntry(rmode_));
165 return reinterpret_cast<Address>(*reinterpret_cast<int32_t*>(pc_)); 177 return reinterpret_cast<Address>(*reinterpret_cast<int32_t*>(pc_));
166 } 178 }
167 179
168 180
169 void RelocInfo::set_target_runtime_entry(Address target, 181 void RelocInfo::set_target_runtime_entry(Address target,
170 WriteBarrierMode write_barrier_mode, 182 WriteBarrierMode write_barrier_mode,
171 ICacheFlushMode icache_flush_mode) { 183 ICacheFlushMode icache_flush_mode) {
172 DCHECK(IsRuntimeEntry(rmode_)); 184 DCHECK(IsRuntimeEntry(rmode_));
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 579
568 580
569 Operand::Operand(Immediate imm) { 581 Operand::Operand(Immediate imm) {
570 // [disp/r] 582 // [disp/r]
571 set_modrm(0, ebp); 583 set_modrm(0, ebp);
572 set_dispr(imm.x_, imm.rmode_); 584 set_dispr(imm.x_, imm.rmode_);
573 } 585 }
574 } } // namespace v8::internal 586 } } // namespace v8::internal
575 587
576 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ 588 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_
OLDNEW
« no previous file with comments | « src/disassembler.cc ('k') | src/mips/assembler-mips-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698