Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add frontend method getVFT entry to read the virtual function table #2126

Merged
merged 1 commit into from
Jun 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions runtime/compiler/env/VMJ9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8590,6 +8590,11 @@ TR_J9VM::getPrimitiveArrayAllocationClass(J9Class *clazz)
return (TR_OpaqueClassBlock *) clazz;
}

intptrj_t
TR_J9VMBase::getVFTEntry(TR_OpaqueClassBlock *clazz, int32_t offset)
{
return *(intptrj_t*) (((uint8_t *)clazz) + offset);
}


//////////////////////////////////////////////////////////
Expand Down
2 changes: 2 additions & 0 deletions runtime/compiler/env/VMJ9.h
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,8 @@ class TR_J9VMBase : public TR_FrontEnd
virtual void *getLocationOfClassLoaderObjectPointer(TR_OpaqueClassBlock *classPointer);
virtual bool isMethodBreakpointed(TR_OpaqueMethodBlock *method);

virtual intptrj_t getVFTEntry(TR_OpaqueClassBlock *clazz, int32_t offset);

protected:
#if defined(TR_TARGET_S390)
int32_t getS390MachineName(TR_S390MachineType machine, char* processorName, int32_t stringLength);
Expand Down