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

Unified Diff: src/serialize.cc

Issue 1000373003: Serializer: prepare support for INTERNAL_REFERENCE_ENCODED. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: switch Created 5 years, 9 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/assembler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/serialize.cc
diff --git a/src/serialize.cc b/src/serialize.cc
index 3107c66b4d6e95f82088382ef893a645ce30667d..a7cfda8667b2306fcf2db63ff7e9ab50f17eb2e2 100644
--- a/src/serialize.cc
+++ b/src/serialize.cc
@@ -799,7 +799,8 @@ void Deserializer::ReadObject(int space_number, Object** write_back) {
// Turn internal references encoded as offsets back to absolute addresses.
Code* code = Code::cast(obj);
Address entry = code->entry();
- int mode_mask = RelocInfo::ModeMask(RelocInfo::INTERNAL_REFERENCE);
+ int mode_mask = RelocInfo::ModeMask(RelocInfo::INTERNAL_REFERENCE) |
+ RelocInfo::ModeMask(RelocInfo::INTERNAL_REFERENCE_ENCODED);
for (RelocIterator it(code, mode_mask); !it.done(); it.next()) {
RelocInfo* rinfo = it.rinfo();
intptr_t offset =
@@ -1953,10 +1954,13 @@ Address Serializer::ObjectSerializer::PrepareCode() {
RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) |
RelocInfo::ModeMask(RelocInfo::EXTERNAL_REFERENCE) |
RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY) |
- RelocInfo::ModeMask(RelocInfo::INTERNAL_REFERENCE);
+ RelocInfo::ModeMask(RelocInfo::INTERNAL_REFERENCE) |
+ RelocInfo::ModeMask(RelocInfo::INTERNAL_REFERENCE_ENCODED);
for (RelocIterator it(code, mode_mask); !it.done(); it.next()) {
RelocInfo* rinfo = it.rinfo();
- if (RelocInfo::IsInternalReference(rinfo->rmode())) {
+ RelocInfo::Mode rmode = rinfo->rmode();
+ if (RelocInfo::IsInternalReference(rmode) ||
+ RelocInfo::IsInternalReferenceEncoded(rmode)) {
// Convert internal references to relative offsets.
Address target = rinfo->target_internal_reference();
intptr_t offset = target - entry;
« no previous file with comments | « src/assembler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698