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