OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 } | 386 } |
387 | 387 |
388 | 388 |
389 template<typename StaticVisitor> | 389 template<typename StaticVisitor> |
390 void RelocInfo::Visit(Heap* heap) { | 390 void RelocInfo::Visit(Heap* heap) { |
391 RelocInfo::Mode mode = rmode(); | 391 RelocInfo::Mode mode = rmode(); |
392 if (mode == RelocInfo::EMBEDDED_OBJECT) { | 392 if (mode == RelocInfo::EMBEDDED_OBJECT) { |
393 StaticVisitor::VisitPointer(heap, target_object_address()); | 393 StaticVisitor::VisitPointer(heap, target_object_address()); |
394 CPU::FlushICache(pc_, sizeof(Address)); | 394 CPU::FlushICache(pc_, sizeof(Address)); |
395 } else if (RelocInfo::IsCodeTarget(mode)) { | 395 } else if (RelocInfo::IsCodeTarget(mode)) { |
396 StaticVisitor::VisitCodeTarget(this); | 396 StaticVisitor::VisitCodeTarget(heap, this); |
397 } else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) { | 397 } else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) { |
398 StaticVisitor::VisitGlobalPropertyCell(this); | 398 StaticVisitor::VisitGlobalPropertyCell(heap, this); |
399 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { | 399 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { |
400 StaticVisitor::VisitExternalReference(target_reference_address()); | 400 StaticVisitor::VisitExternalReference(target_reference_address()); |
401 CPU::FlushICache(pc_, sizeof(Address)); | 401 CPU::FlushICache(pc_, sizeof(Address)); |
402 #ifdef ENABLE_DEBUGGER_SUPPORT | 402 #ifdef ENABLE_DEBUGGER_SUPPORT |
403 } else if (heap->isolate()->debug()->has_break_points() && | 403 } else if (heap->isolate()->debug()->has_break_points() && |
404 ((RelocInfo::IsJSReturn(mode) && | 404 ((RelocInfo::IsJSReturn(mode) && |
405 IsPatchedReturnSequence()) || | 405 IsPatchedReturnSequence()) || |
406 (RelocInfo::IsDebugBreakSlot(mode) && | 406 (RelocInfo::IsDebugBreakSlot(mode) && |
407 IsPatchedDebugBreakSlotSequence()))) { | 407 IsPatchedDebugBreakSlotSequence()))) { |
408 StaticVisitor::VisitDebugTarget(this); | 408 StaticVisitor::VisitDebugTarget(heap, this); |
409 #endif | 409 #endif |
410 } else if (mode == RelocInfo::RUNTIME_ENTRY) { | 410 } else if (mode == RelocInfo::RUNTIME_ENTRY) { |
411 StaticVisitor::VisitRuntimeEntry(this); | 411 StaticVisitor::VisitRuntimeEntry(this); |
412 } | 412 } |
413 } | 413 } |
414 | 414 |
415 | 415 |
416 // ----------------------------------------------------------------------------- | 416 // ----------------------------------------------------------------------------- |
417 // Implementation of Operand | 417 // Implementation of Operand |
418 | 418 |
(...skipping 28 matching lines...) Expand all Loading... |
447 ASSERT(len_ == 1 || len_ == 2); | 447 ASSERT(len_ == 1 || len_ == 2); |
448 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); | 448 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); |
449 *p = disp; | 449 *p = disp; |
450 len_ += sizeof(int32_t); | 450 len_ += sizeof(int32_t); |
451 } | 451 } |
452 | 452 |
453 | 453 |
454 } } // namespace v8::internal | 454 } } // namespace v8::internal |
455 | 455 |
456 #endif // V8_X64_ASSEMBLER_X64_INL_H_ | 456 #endif // V8_X64_ASSEMBLER_X64_INL_H_ |
OLD | NEW |