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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 Handle<JSGlobalPropertyCell> RelocInfo::target_cell_handle() { | 143 Handle<JSGlobalPropertyCell> RelocInfo::target_cell_handle() { |
144 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); | 144 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); |
145 Address address = Memory::Address_at(pc_); | 145 Address address = Memory::Address_at(pc_); |
146 return Handle<JSGlobalPropertyCell>( | 146 return Handle<JSGlobalPropertyCell>( |
147 reinterpret_cast<JSGlobalPropertyCell**>(address)); | 147 reinterpret_cast<JSGlobalPropertyCell**>(address)); |
148 } | 148 } |
149 | 149 |
150 | 150 |
151 JSGlobalPropertyCell* RelocInfo::target_cell() { | 151 JSGlobalPropertyCell* RelocInfo::target_cell() { |
152 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); | 152 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); |
153 Address address = Memory::Address_at(pc_); | 153 return JSGlobalPropertyCell::FromValueAddress(Memory::Address_at(pc_)); |
154 Object* object = HeapObject::FromAddress( | |
155 address - JSGlobalPropertyCell::kValueOffset); | |
156 return reinterpret_cast<JSGlobalPropertyCell*>(object); | |
157 } | 154 } |
158 | 155 |
159 | 156 |
160 void RelocInfo::set_target_cell(JSGlobalPropertyCell* cell, | 157 void RelocInfo::set_target_cell(JSGlobalPropertyCell* cell, |
161 WriteBarrierMode mode) { | 158 WriteBarrierMode mode) { |
162 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); | 159 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); |
163 Address address = cell->address() + JSGlobalPropertyCell::kValueOffset; | 160 Address address = cell->address() + JSGlobalPropertyCell::kValueOffset; |
164 Memory::Address_at(pc_) = address; | 161 Memory::Address_at(pc_) = address; |
165 CPU::FlushICache(pc_, sizeof(Address)); | 162 CPU::FlushICache(pc_, sizeof(Address)); |
166 if (mode == UPDATE_WRITE_BARRIER && host() != NULL) { | 163 if (mode == UPDATE_WRITE_BARRIER && host() != NULL) { |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 | 461 |
465 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { | 462 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { |
466 // [disp/r] | 463 // [disp/r] |
467 set_modrm(0, ebp); | 464 set_modrm(0, ebp); |
468 set_dispr(disp, rmode); | 465 set_dispr(disp, rmode); |
469 } | 466 } |
470 | 467 |
471 } } // namespace v8::internal | 468 } } // namespace v8::internal |
472 | 469 |
473 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ | 470 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ |
OLD | NEW |