| 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 } | 325 } |
| 326 | 326 |
| 327 | 327 |
| 328 void RelocInfo::set_target_runtime_entry(Address target, | 328 void RelocInfo::set_target_runtime_entry(Address target, |
| 329 WriteBarrierMode mode) { | 329 WriteBarrierMode mode) { |
| 330 ASSERT(IsRuntimeEntry(rmode_)); | 330 ASSERT(IsRuntimeEntry(rmode_)); |
| 331 if (target_address() != target) set_target_address(target, mode); | 331 if (target_address() != target) set_target_address(target, mode); |
| 332 } | 332 } |
| 333 | 333 |
| 334 | 334 |
| 335 Handle<JSGlobalPropertyCell> RelocInfo::target_cell_handle() { | 335 Handle<Cell> RelocInfo::target_cell_handle() { |
| 336 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); | 336 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); |
| 337 Address address = Memory::Address_at(pc_); | 337 Address address = Memory::Address_at(pc_); |
| 338 return Handle<JSGlobalPropertyCell>( | 338 return Handle<Cell>(reinterpret_cast<Cell**>(address)); |
| 339 reinterpret_cast<JSGlobalPropertyCell**>(address)); | |
| 340 } | 339 } |
| 341 | 340 |
| 342 | 341 |
| 343 JSGlobalPropertyCell* RelocInfo::target_cell() { | 342 Cell* RelocInfo::target_cell() { |
| 344 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); | 343 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); |
| 345 return JSGlobalPropertyCell::FromValueAddress(Memory::Address_at(pc_)); | 344 return Cell::FromValueAddress(Memory::Address_at(pc_)); |
| 346 } | 345 } |
| 347 | 346 |
| 348 | 347 |
| 349 void RelocInfo::set_target_cell(JSGlobalPropertyCell* cell, | 348 void RelocInfo::set_target_cell(Cell* cell, |
| 350 WriteBarrierMode mode) { | 349 WriteBarrierMode mode) { |
| 351 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); | 350 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); |
| 352 Address address = cell->address() + JSGlobalPropertyCell::kValueOffset; | 351 Address address = cell->address() + Cell::kValueOffset; |
| 353 Memory::Address_at(pc_) = address; | 352 Memory::Address_at(pc_) = address; |
| 354 CPU::FlushICache(pc_, sizeof(Address)); | 353 CPU::FlushICache(pc_, sizeof(Address)); |
| 355 if (mode == UPDATE_WRITE_BARRIER && | 354 if (mode == UPDATE_WRITE_BARRIER && |
| 356 host() != NULL) { | 355 host() != NULL) { |
| 357 // TODO(1550) We are passing NULL as a slot because cell can never be on | 356 // TODO(1550) We are passing NULL as a slot because cell can never be on |
| 358 // evacuation candidate. | 357 // evacuation candidate. |
| 359 host()->GetHeap()->incremental_marking()->RecordWrite( | 358 host()->GetHeap()->incremental_marking()->RecordWrite( |
| 360 host(), NULL, cell); | 359 host(), NULL, cell); |
| 361 } | 360 } |
| 362 } | 361 } |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 ASSERT(len_ == 1 || len_ == 2); | 529 ASSERT(len_ == 1 || len_ == 2); |
| 531 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); | 530 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); |
| 532 *p = disp; | 531 *p = disp; |
| 533 len_ += sizeof(int32_t); | 532 len_ += sizeof(int32_t); |
| 534 } | 533 } |
| 535 | 534 |
| 536 | 535 |
| 537 } } // namespace v8::internal | 536 } } // namespace v8::internal |
| 538 | 537 |
| 539 #endif // V8_X64_ASSEMBLER_X64_INL_H_ | 538 #endif // V8_X64_ASSEMBLER_X64_INL_H_ |
| OLD | NEW |