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

Unified Diff: src/liveedit.cc

Issue 3197010: Version 2.3.10... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/jump-target-heavy.h ('k') | src/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/liveedit.cc
===================================================================
--- src/liveedit.cc (revision 5316)
+++ src/liveedit.cc (working copy)
@@ -750,7 +750,7 @@
class ReferenceCollectorVisitor : public ObjectVisitor {
public:
explicit ReferenceCollectorVisitor(Code* original)
- : original_(original), rvalues_(10), reloc_infos_(10) {
+ : original_(original), rvalues_(10), reloc_infos_(10), code_entries_(10) {
}
virtual void VisitPointers(Object** start, Object** end) {
@@ -761,7 +761,13 @@
}
}
- void VisitCodeTarget(RelocInfo* rinfo) {
+ virtual void VisitCodeEntry(Address entry) {
+ if (Code::GetObjectFromEntryAddress(entry) == original_) {
+ code_entries_.Add(entry);
+ }
+ }
+
+ virtual void VisitCodeTarget(RelocInfo* rinfo) {
if (RelocInfo::IsCodeTarget(rinfo->rmode()) &&
Code::GetCodeFromTargetAddress(rinfo->target_address()) == original_) {
reloc_infos_.Add(*rinfo);
@@ -778,15 +784,21 @@
for (int i = 0; i < rvalues_.length(); i++) {
*(rvalues_[i]) = substitution;
}
+ Address substitution_entry = substitution->instruction_start();
for (int i = 0; i < reloc_infos_.length(); i++) {
- reloc_infos_[i].set_target_address(substitution->instruction_start());
+ reloc_infos_[i].set_target_address(substitution_entry);
}
+ for (int i = 0; i < code_entries_.length(); i++) {
+ Address entry = code_entries_[i];
+ Memory::Address_at(entry) = substitution_entry;
+ }
}
private:
Code* original_;
ZoneList<Object**> rvalues_;
ZoneList<RelocInfo> reloc_infos_;
+ ZoneList<Address> code_entries_;
};
« no previous file with comments | « src/jump-target-heavy.h ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698