Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(588)

Side by Side Diff: src/objects.cc

Issue 1234833003: Debugger: use debug break slots to break at function exit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix for arm Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/objects.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <iomanip> 5 #include <iomanip>
6 #include <sstream> 6 #include <sstream>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 10745 matching lines...) Expand 10 before | Expand all | Expand 10 after
10756 Object* cell = rinfo->target_cell(); 10756 Object* cell = rinfo->target_cell();
10757 Object* old_cell = cell; 10757 Object* old_cell = cell;
10758 VisitPointer(&cell); 10758 VisitPointer(&cell);
10759 if (cell != old_cell) { 10759 if (cell != old_cell) {
10760 rinfo->set_target_cell(reinterpret_cast<Cell*>(cell)); 10760 rinfo->set_target_cell(reinterpret_cast<Cell*>(cell));
10761 } 10761 }
10762 } 10762 }
10763 10763
10764 10764
10765 void ObjectVisitor::VisitDebugTarget(RelocInfo* rinfo) { 10765 void ObjectVisitor::VisitDebugTarget(RelocInfo* rinfo) {
10766 DCHECK((RelocInfo::IsJSReturn(rinfo->rmode()) && 10766 DCHECK(RelocInfo::IsDebugBreakSlot(rinfo->rmode()) &&
10767 rinfo->IsPatchedReturnSequence()) || 10767 rinfo->IsPatchedDebugBreakSlotSequence());
10768 (RelocInfo::IsDebugBreakSlot(rinfo->rmode()) && 10768 Object* target = Code::GetCodeFromTargetAddress(rinfo->debug_call_address());
10769 rinfo->IsPatchedDebugBreakSlotSequence()));
10770 Object* target = Code::GetCodeFromTargetAddress(rinfo->call_address());
10771 Object* old_target = target; 10769 Object* old_target = target;
10772 VisitPointer(&target); 10770 VisitPointer(&target);
10773 CHECK_EQ(target, old_target); // VisitPointer doesn't change Code* *target. 10771 CHECK_EQ(target, old_target); // VisitPointer doesn't change Code* *target.
10774 } 10772 }
10775 10773
10776 10774
10777 void ObjectVisitor::VisitEmbeddedPointer(RelocInfo* rinfo) { 10775 void ObjectVisitor::VisitEmbeddedPointer(RelocInfo* rinfo) {
10778 DCHECK(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT); 10776 DCHECK(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT);
10779 Object* p = rinfo->target_object(); 10777 Object* p = rinfo->target_object();
10780 VisitPointer(&p); 10778 VisitPointer(&p);
(...skipping 23 matching lines...) Expand all
10804 it.rinfo()->set_target_object(undefined, SKIP_WRITE_BARRIER); 10802 it.rinfo()->set_target_object(undefined, SKIP_WRITE_BARRIER);
10805 } else if (mode == RelocInfo::CELL) { 10803 } else if (mode == RelocInfo::CELL) {
10806 it.rinfo()->set_target_cell(undefined_cell, SKIP_WRITE_BARRIER); 10804 it.rinfo()->set_target_cell(undefined_cell, SKIP_WRITE_BARRIER);
10807 } 10805 }
10808 } 10806 }
10809 } 10807 }
10810 10808
10811 10809
10812 void Code::Relocate(intptr_t delta) { 10810 void Code::Relocate(intptr_t delta) {
10813 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { 10811 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) {
10814 it.rinfo()->apply(delta, SKIP_ICACHE_FLUSH); 10812 it.rinfo()->apply(delta);
10815 } 10813 }
10816 CpuFeatures::FlushICache(instruction_start(), instruction_size()); 10814 CpuFeatures::FlushICache(instruction_start(), instruction_size());
10817 } 10815 }
10818 10816
10819 10817
10820 void Code::CopyFrom(const CodeDesc& desc) { 10818 void Code::CopyFrom(const CodeDesc& desc) {
10821 DCHECK(Marking::Color(this) == Marking::WHITE_OBJECT); 10819 DCHECK(Marking::Color(this) == Marking::WHITE_OBJECT);
10822 10820
10823 // copy code 10821 // copy code
10824 CopyBytes(instruction_start(), desc.buffer, 10822 CopyBytes(instruction_start(), desc.buffer,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
10857 SKIP_ICACHE_FLUSH); 10855 SKIP_ICACHE_FLUSH);
10858 } else if (RelocInfo::IsRuntimeEntry(mode)) { 10856 } else if (RelocInfo::IsRuntimeEntry(mode)) {
10859 Address p = it.rinfo()->target_runtime_entry(origin); 10857 Address p = it.rinfo()->target_runtime_entry(origin);
10860 it.rinfo()->set_target_runtime_entry(p, SKIP_WRITE_BARRIER, 10858 it.rinfo()->set_target_runtime_entry(p, SKIP_WRITE_BARRIER,
10861 SKIP_ICACHE_FLUSH); 10859 SKIP_ICACHE_FLUSH);
10862 } else if (mode == RelocInfo::CODE_AGE_SEQUENCE) { 10860 } else if (mode == RelocInfo::CODE_AGE_SEQUENCE) {
10863 Handle<Object> p = it.rinfo()->code_age_stub_handle(origin); 10861 Handle<Object> p = it.rinfo()->code_age_stub_handle(origin);
10864 Code* code = Code::cast(*p); 10862 Code* code = Code::cast(*p);
10865 it.rinfo()->set_code_age_stub(code, SKIP_ICACHE_FLUSH); 10863 it.rinfo()->set_code_age_stub(code, SKIP_ICACHE_FLUSH);
10866 } else { 10864 } else {
10867 it.rinfo()->apply(delta, SKIP_ICACHE_FLUSH); 10865 it.rinfo()->apply(delta);
10868 } 10866 }
10869 } 10867 }
10870 CpuFeatures::FlushICache(instruction_start(), instruction_size()); 10868 CpuFeatures::FlushICache(instruction_start(), instruction_size());
10871 } 10869 }
10872 10870
10873 10871
10874 // Locate the source position which is closest to the address in the code. This 10872 // Locate the source position which is closest to the address in the code. This
10875 // is using the source position information embedded in the relocation info. 10873 // is using the source position information embedded in the relocation info.
10876 // The position returned is relative to the beginning of the script where the 10874 // The position returned is relative to the beginning of the script where the
10877 // source for this function is found. 10875 // source for this function is found.
(...skipping 5242 matching lines...) Expand 10 before | Expand all | Expand 10 after
16120 Handle<Object> new_value) { 16118 Handle<Object> new_value) {
16121 if (cell->value() != *new_value) { 16119 if (cell->value() != *new_value) {
16122 cell->set_value(*new_value); 16120 cell->set_value(*new_value);
16123 Isolate* isolate = cell->GetIsolate(); 16121 Isolate* isolate = cell->GetIsolate();
16124 cell->dependent_code()->DeoptimizeDependentCodeGroup( 16122 cell->dependent_code()->DeoptimizeDependentCodeGroup(
16125 isolate, DependentCode::kPropertyCellChangedGroup); 16123 isolate, DependentCode::kPropertyCellChangedGroup);
16126 } 16124 }
16127 } 16125 }
16128 } // namespace internal 16126 } // namespace internal
16129 } // namespace v8 16127 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698