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

Unified Diff: src/ppc/assembler-ppc-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 | « no previous file | src/s390/assembler-s390-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ppc/assembler-ppc-inl.h
diff --git a/src/ppc/assembler-ppc-inl.h b/src/ppc/assembler-ppc-inl.h
index 216650c2f4fe45a0f962710178202f85bf243393..80083487132df3d52f0ed483562971d60a79f72c 100644
--- a/src/ppc/assembler-ppc-inl.h
+++ b/src/ppc/assembler-ppc-inl.h
@@ -175,20 +175,19 @@ Address Assembler::return_address_from_call_start(Address pc) {
return pc + (len + 2) * kInstrSize;
}
-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);
- return Handle<Object>(
- reinterpret_cast<Object**>(Assembler::target_address_at(pc_, host_)));
+ return Handle<HeapObject>(
+ reinterpret_cast<HeapObject**>(Assembler::target_address_at(pc_, host_)));
}
-
-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);
@@ -266,10 +265,9 @@ static const int kCodeAgingTargetDelta = 1 * Assembler::kInstrSize;
static const int kNoCodeAgeSequenceLength =
(kNoCodeAgeSequenceInstructions * Assembler::kInstrSize);
-
-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 PPC.
- return Handle<Object>();
+ return Handle<Code>();
}
« no previous file with comments | « no previous file | src/s390/assembler-s390-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698