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 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 125 |
126 | 126 |
127 Object** RelocInfo::target_object_address() { | 127 Object** RelocInfo::target_object_address() { |
128 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); | 128 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
129 return &Memory::Object_at(pc_); | 129 return &Memory::Object_at(pc_); |
130 } | 130 } |
131 | 131 |
132 | 132 |
133 void RelocInfo::set_target_object(Object* target, WriteBarrierMode mode) { | 133 void RelocInfo::set_target_object(Object* target, WriteBarrierMode mode) { |
134 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); | 134 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
135 ASSERT(!target->IsConsString()); | |
136 Memory::Object_at(pc_) = target; | 135 Memory::Object_at(pc_) = target; |
137 CPU::FlushICache(pc_, sizeof(Address)); | 136 CPU::FlushICache(pc_, sizeof(Address)); |
138 if (mode == UPDATE_WRITE_BARRIER && | 137 if (mode == UPDATE_WRITE_BARRIER && |
139 host() != NULL && | 138 host() != NULL && |
140 target->IsHeapObject()) { | 139 target->IsHeapObject()) { |
141 host()->GetHeap()->incremental_marking()->RecordWrite( | 140 host()->GetHeap()->incremental_marking()->RecordWrite( |
142 host(), &Memory::Object_at(pc_), HeapObject::cast(target)); | 141 host(), &Memory::Object_at(pc_), HeapObject::cast(target)); |
143 } | 142 } |
144 } | 143 } |
145 | 144 |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 | 518 |
520 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { | 519 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { |
521 // [disp/r] | 520 // [disp/r] |
522 set_modrm(0, ebp); | 521 set_modrm(0, ebp); |
523 set_dispr(disp, rmode); | 522 set_dispr(disp, rmode); |
524 } | 523 } |
525 | 524 |
526 } } // namespace v8::internal | 525 } } // namespace v8::internal |
527 | 526 |
528 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ | 527 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ |
OLD | NEW |