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 7353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7364 rinfo->IsPatchedReturnSequence()) || | 7364 rinfo->IsPatchedReturnSequence()) || |
7365 (RelocInfo::IsDebugBreakSlot(rinfo->rmode()) && | 7365 (RelocInfo::IsDebugBreakSlot(rinfo->rmode()) && |
7366 rinfo->IsPatchedDebugBreakSlotSequence())); | 7366 rinfo->IsPatchedDebugBreakSlotSequence())); |
7367 Object* target = Code::GetCodeFromTargetAddress(rinfo->call_address()); | 7367 Object* target = Code::GetCodeFromTargetAddress(rinfo->call_address()); |
7368 Object* old_target = target; | 7368 Object* old_target = target; |
7369 VisitPointer(&target); | 7369 VisitPointer(&target); |
7370 CHECK_EQ(target, old_target); // VisitPointer doesn't change Code* *target. | 7370 CHECK_EQ(target, old_target); // VisitPointer doesn't change Code* *target. |
7371 } | 7371 } |
7372 | 7372 |
7373 | 7373 |
| 7374 void ObjectVisitor::VisitEmbeddedPointer(RelocInfo* rinfo) { |
| 7375 ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT); |
| 7376 VisitPointer(rinfo->target_object_address()); |
| 7377 } |
| 7378 |
| 7379 |
7374 void Code::InvalidateRelocation() { | 7380 void Code::InvalidateRelocation() { |
7375 set_relocation_info(GetHeap()->empty_byte_array()); | 7381 set_relocation_info(GetHeap()->empty_byte_array()); |
7376 } | 7382 } |
7377 | 7383 |
7378 | 7384 |
7379 void Code::Relocate(intptr_t delta) { | 7385 void Code::Relocate(intptr_t delta) { |
7380 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { | 7386 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { |
7381 it.rinfo()->apply(delta); | 7387 it.rinfo()->apply(delta); |
7382 } | 7388 } |
7383 CPU::FlushICache(instruction_start(), instruction_size()); | 7389 CPU::FlushICache(instruction_start(), instruction_size()); |
(...skipping 4858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12242 if (break_point_objects()->IsUndefined()) return 0; | 12248 if (break_point_objects()->IsUndefined()) return 0; |
12243 // Single break point. | 12249 // Single break point. |
12244 if (!break_point_objects()->IsFixedArray()) return 1; | 12250 if (!break_point_objects()->IsFixedArray()) return 1; |
12245 // Multiple break points. | 12251 // Multiple break points. |
12246 return FixedArray::cast(break_point_objects())->length(); | 12252 return FixedArray::cast(break_point_objects())->length(); |
12247 } | 12253 } |
12248 #endif // ENABLE_DEBUGGER_SUPPORT | 12254 #endif // ENABLE_DEBUGGER_SUPPORT |
12249 | 12255 |
12250 | 12256 |
12251 } } // namespace v8::internal | 12257 } } // namespace v8::internal |
OLD | NEW |