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

Unified Diff: src/s390/assembler-s390-inl.h

Issue 2739813002: PPC/s390: Make explicit that RelocInfo's target_object is always a HeapObject. (Closed)
Patch Set: Created 3 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/ppc/assembler-ppc-inl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/s390/assembler-s390-inl.h
diff --git a/src/s390/assembler-s390-inl.h b/src/s390/assembler-s390-inl.h
index eee6d6c7ad99c5abd77db3ed158eb8db717470cc..1990d6787d5b7146098ac2e7ae28641f9568b56b 100644
--- a/src/s390/assembler-s390-inl.h
+++ b/src/s390/assembler-s390-inl.h
@@ -152,22 +152,23 @@ Handle<Object> Assembler::code_target_object_handle_at(Address pc) {
return code_targets_[index];
}
-Object* RelocInfo::target_object() {
+HeapObject* RelocInfo::target_object() {
DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
- return reinterpret_cast<Object*>(Assembler::target_address_at(pc_, host_));
+ return HeapObject::cast(
+ reinterpret_cast<Object*>(Assembler::target_address_at(pc_, host_)));
}
-Handle<Object> RelocInfo::target_object_handle(Assembler* origin) {
+Handle<HeapObject> RelocInfo::target_object_handle(Assembler* origin) {
DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
if (rmode_ == EMBEDDED_OBJECT) {
- return Handle<Object>(
- reinterpret_cast<Object**>(Assembler::target_address_at(pc_, host_)));
+ return Handle<HeapObject>(reinterpret_cast<HeapObject**>(
+ Assembler::target_address_at(pc_, host_)));
} else {
- return origin->code_target_object_handle_at(pc_);
+ return Handle<HeapObject>::cast(origin->code_target_object_handle_at(pc_));
}
}
-void RelocInfo::set_target_object(Object* target,
+void RelocInfo::set_target_object(HeapObject* target,
WriteBarrierMode write_barrier_mode,
ICacheFlushMode icache_flush_mode) {
DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
@@ -245,9 +246,9 @@ static const int kNoCodeAgeSequenceLength = 26;
#endif
#endif
-Handle<Object> RelocInfo::code_age_stub_handle(Assembler* origin) {
+Handle<Code> RelocInfo::code_age_stub_handle(Assembler* origin) {
UNREACHABLE(); // This should never be reached on S390.
- return Handle<Object>();
+ return Handle<Code>();
}
Code* RelocInfo::code_age_stub() {
« no previous file with comments | « src/ppc/assembler-ppc-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698