[x] Try to build it locally and fix issues by creating default implementations
Description of problem
The PR to virtualize CodeGenerator is failing. The main problem seems to be from virtualizing generateSwitchToInterpreterPrePrologue(TR::Instruction*, uint8_t, uint8_t).
Error message:
../../libtestjit_base.a(OMRCodeGenerator.o):(.data.rel.ro._ZTVN3OMR3X865AMD6413CodeGeneratorE[_ZTVN3OMR3X865AMD6413CodeGeneratorE]+0x1d0): undefined reference to `OMR::X86::CodeGenerator::generateSwitchToInterpreterPrePrologue(TR::Instruction*, unsigned char, unsigned char)'
This function is declared in OMR::X86::CodeGenerator however it is not defined in the OMR project. It is, however, defined in J9::X86::CodeGenerator. Hence, when compiling the OMR project independently of OpenJ9 (as in Travis CI), the linker would not be able to find a definition for the virtual function which causes an error.
I tried adding = 0 to the end of the functions declaration making it pure virtual; since pure virtual functions are allowed not to have a declaration which caused another error:
../../compiler/compile/OMRCompilation.cpp:188:56: error: invalid new-expression of abstract class type ‘TR::CodeGenerator’
return new (comp->trHeapMemory()) TR::CodeGenerator();
Tasks
OMR_API
from PRsDescription of problem
The PR to virtualize
CodeGenerator
is failing. The main problem seems to be from virtualizinggenerateSwitchToInterpreterPrePrologue(TR::Instruction*, uint8_t, uint8_t)
. Error message:This function is declared in
OMR::X86::CodeGenerator
however it is not defined in the OMR project. It is, however, defined inJ9::X86::CodeGenerator
. Hence, when compiling the OMR project independently of OpenJ9 (as in Travis CI), the linker would not be able to find a definition for the virtual function which causes an error.I tried adding
= 0
to the end of the functions declaration making it pure virtual; since pure virtual functions are allowed not to have a declaration which caused another error: