| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 } | 155 } |
| 156 | 156 |
| 157 | 157 |
| 158 void RelocInfo::set_target_runtime_entry(Address target, | 158 void RelocInfo::set_target_runtime_entry(Address target, |
| 159 WriteBarrierMode mode) { | 159 WriteBarrierMode mode) { |
| 160 ASSERT(IsRuntimeEntry(rmode_)); | 160 ASSERT(IsRuntimeEntry(rmode_)); |
| 161 if (target_address() != target) set_target_address(target, mode); | 161 if (target_address() != target) set_target_address(target, mode); |
| 162 } | 162 } |
| 163 | 163 |
| 164 | 164 |
| 165 Handle<JSGlobalPropertyCell> RelocInfo::target_cell_handle() { | 165 Handle<Cell> RelocInfo::target_cell_handle() { |
| 166 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); | 166 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); |
| 167 Address address = Memory::Address_at(pc_); | 167 Address address = Memory::Address_at(pc_); |
| 168 return Handle<JSGlobalPropertyCell>( | 168 return Handle<Cell>(reinterpret_cast<Cell**>(address)); |
| 169 reinterpret_cast<JSGlobalPropertyCell**>(address)); | |
| 170 } | 169 } |
| 171 | 170 |
| 172 | 171 |
| 173 JSGlobalPropertyCell* RelocInfo::target_cell() { | 172 Cell* RelocInfo::target_cell() { |
| 174 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); | 173 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); |
| 175 return JSGlobalPropertyCell::FromValueAddress(Memory::Address_at(pc_)); | 174 return Cell::FromValueAddress(Memory::Address_at(pc_)); |
| 176 } | 175 } |
| 177 | 176 |
| 178 | 177 |
| 179 void RelocInfo::set_target_cell(JSGlobalPropertyCell* cell, | 178 void RelocInfo::set_target_cell(Cell* cell, WriteBarrierMode mode) { |
| 180 WriteBarrierMode mode) { | |
| 181 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); | 179 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); |
| 182 Address address = cell->address() + JSGlobalPropertyCell::kValueOffset; | 180 Address address = cell->address() + Cell::kValueOffset; |
| 183 Memory::Address_at(pc_) = address; | 181 Memory::Address_at(pc_) = address; |
| 184 CPU::FlushICache(pc_, sizeof(Address)); | 182 CPU::FlushICache(pc_, sizeof(Address)); |
| 185 if (mode == UPDATE_WRITE_BARRIER && host() != NULL) { | 183 if (mode == UPDATE_WRITE_BARRIER && host() != NULL) { |
| 186 // TODO(1550) We are passing NULL as a slot because cell can never be on | 184 // TODO(1550) We are passing NULL as a slot because cell can never be on |
| 187 // evacuation candidate. | 185 // evacuation candidate. |
| 188 host()->GetHeap()->incremental_marking()->RecordWrite( | 186 host()->GetHeap()->incremental_marking()->RecordWrite( |
| 189 host(), NULL, cell); | 187 host(), NULL, cell); |
| 190 } | 188 } |
| 191 } | 189 } |
| 192 | 190 |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 | 518 |
| 521 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { | 519 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { |
| 522 // [disp/r] | 520 // [disp/r] |
| 523 set_modrm(0, ebp); | 521 set_modrm(0, ebp); |
| 524 set_dispr(disp, rmode); | 522 set_dispr(disp, rmode); |
| 525 } | 523 } |
| 526 | 524 |
| 527 } } // namespace v8::internal | 525 } } // namespace v8::internal |
| 528 | 526 |
| 529 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ | 527 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ |
| OLD | NEW |