| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 Handle<JSGlobalPropertyCell> RelocInfo::target_cell_handle() { | 302 Handle<JSGlobalPropertyCell> RelocInfo::target_cell_handle() { |
| 303 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); | 303 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); |
| 304 Address address = Memory::Address_at(pc_); | 304 Address address = Memory::Address_at(pc_); |
| 305 return Handle<JSGlobalPropertyCell>( | 305 return Handle<JSGlobalPropertyCell>( |
| 306 reinterpret_cast<JSGlobalPropertyCell**>(address)); | 306 reinterpret_cast<JSGlobalPropertyCell**>(address)); |
| 307 } | 307 } |
| 308 | 308 |
| 309 | 309 |
| 310 JSGlobalPropertyCell* RelocInfo::target_cell() { | 310 JSGlobalPropertyCell* RelocInfo::target_cell() { |
| 311 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); | 311 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); |
| 312 Address address = Memory::Address_at(pc_); | 312 return JSGlobalPropertyCell::FromValueAddress(Memory::Address_at(pc_)); |
| 313 Object* object = HeapObject::FromAddress( | |
| 314 address - JSGlobalPropertyCell::kValueOffset); | |
| 315 return reinterpret_cast<JSGlobalPropertyCell*>(object); | |
| 316 } | 313 } |
| 317 | 314 |
| 318 | 315 |
| 319 void RelocInfo::set_target_cell(JSGlobalPropertyCell* cell, | 316 void RelocInfo::set_target_cell(JSGlobalPropertyCell* cell, |
| 320 WriteBarrierMode mode) { | 317 WriteBarrierMode mode) { |
| 321 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); | 318 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); |
| 322 Address address = cell->address() + JSGlobalPropertyCell::kValueOffset; | 319 Address address = cell->address() + JSGlobalPropertyCell::kValueOffset; |
| 323 Memory::Address_at(pc_) = address; | 320 Memory::Address_at(pc_) = address; |
| 324 CPU::FlushICache(pc_, sizeof(Address)); | 321 CPU::FlushICache(pc_, sizeof(Address)); |
| 325 if (mode == UPDATE_WRITE_BARRIER && | 322 if (mode == UPDATE_WRITE_BARRIER && |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 ASSERT(len_ == 1 || len_ == 2); | 478 ASSERT(len_ == 1 || len_ == 2); |
| 482 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); | 479 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); |
| 483 *p = disp; | 480 *p = disp; |
| 484 len_ += sizeof(int32_t); | 481 len_ += sizeof(int32_t); |
| 485 } | 482 } |
| 486 | 483 |
| 487 | 484 |
| 488 } } // namespace v8::internal | 485 } } // namespace v8::internal |
| 489 | 486 |
| 490 #endif // V8_X64_ASSEMBLER_X64_INL_H_ | 487 #endif // V8_X64_ASSEMBLER_X64_INL_H_ |
| OLD | NEW |