Index: vm/jitrino/src/codegenerator/ipf/include/IpfRuntimeInterface.h =================================================================== --- vm/jitrino/src/codegenerator/ipf/include/IpfRuntimeInterface.h (revision 523188) +++ vm/jitrino/src/codegenerator/ipf/include/IpfRuntimeInterface.h (working copy) @@ -42,7 +42,7 @@ void fixHandlerContext(MethodDesc*, JitFrameContext*, bool); void *getAddressOfThis(MethodDesc*, const JitFrameContext*, bool); void *getAddressOfSecurityObject(MethodDesc*, const JitFrameContext*); - bool recompiledMethodEvent(BinaryRewritingInterface&, MethodDesc*, void*); + bool recompiledMethodEvent(MethodDesc*, void*); bool getBcLocationForNative(MethodDesc*, uint64, uint16*); bool getNativeLocationForBc(MethodDesc*, uint16, uint64*); uint16 getInlinedBc(void *v, unsigned int i1, unsigned int i2) { return 0; } // TODO Index: vm/jitrino/src/codegenerator/ipf/include/IpfEncoder.h =================================================================== --- vm/jitrino/src/codegenerator/ipf/include/IpfEncoder.h (revision 523188) +++ vm/jitrino/src/codegenerator/ipf/include/IpfEncoder.h (working copy) @@ -573,8 +573,7 @@ class Encoder { public: - static bool patchCallAddr(BinaryRewritingInterface &binaryRewritingInterface - , char * callAddr, char * methodAddr); + static bool patchCallAddr(char * callAddr, char * methodAddr); static void readBundle(uint64 *code, uint64 * tmplt, uint64 * slots); static char * getMnemonic(InstCode opcode) { return instDesc[opcode].mnemonic; }; Index: vm/jitrino/src/codegenerator/ipf/IpfRuntimeInterface.cpp =================================================================== --- vm/jitrino/src/codegenerator/ipf/IpfRuntimeInterface.cpp (revision 523188) +++ vm/jitrino/src/codegenerator/ipf/IpfRuntimeInterface.cpp (working copy) @@ -198,8 +198,7 @@ //----------------------------------------------------------------------------------------// -bool RuntimeInterface::recompiledMethodEvent(BinaryRewritingInterface &binaryRewritingInterface, - MethodDesc *methodDesc, +bool RuntimeInterface::recompiledMethodEvent(MethodDesc *methodDesc, void *data) { //std::cout << "IPF::RuntimeInterface::recompiledMethodEvent " << methodDesc->getName() << endl; @@ -207,7 +206,7 @@ char **indirectAddr = (char **)methodDesc->getIndirectAddress(); char *methodAddr = *indirectAddr; - return Encoder::patchCallAddr(binaryRewritingInterface, callAddr, methodAddr); + return Encoder::patchCallAddr(callAddr, methodAddr); } //----------------------------------------------------------------------------------------// Index: vm/jitrino/src/codegenerator/ipf/IpfEmitter.cpp =================================================================== --- vm/jitrino/src/codegenerator/ipf/IpfEmitter.cpp (revision 523188) +++ vm/jitrino/src/codegenerator/ipf/IpfEmitter.cpp (working copy) @@ -302,7 +302,7 @@ #include #include -void __stdcall sighandler(int sn, siginfo_t *si, void *_sc) { +void sighandler(int sn, siginfo_t *si, void *_sc) { struct sigaction signal_action; struct ucontext * signal_ucontext; int saved_errno = errno; @@ -1161,7 +1161,7 @@ Inst *inst; codeoff = (char *)compilationinterface.allocateCodeBlock( - codesize, IPF_CODE_ALIGNMENT, CompilationInterface::CodeBlockHeatDefault, 0, false); + codesize, IPF_CODE_ALIGNMENT, CodeBlockHeatDefault, 0, false); assert(codeoff != NULL); IPF_LOG << endl; if ( codeoff ) { Index: vm/jitrino/src/codegenerator/ipf/IpfEncoder.cpp =================================================================== --- vm/jitrino/src/codegenerator/ipf/IpfEncoder.cpp (revision 523188) +++ vm/jitrino/src/codegenerator/ipf/IpfEncoder.cpp (working copy) @@ -1654,8 +1654,7 @@ } //----------------------------------------------------------------------------// -bool Encoder::patchCallAddr(BinaryRewritingInterface & binaryRewritingInterface - , char * callAddr, char * methodAddr) +bool Encoder::patchCallAddr(char * callAddr, char * methodAddr) { uint64 p[2]; uint64 s[3]; @@ -1689,7 +1688,7 @@ p[1] |= s[2] << 23; // write to callAddr - binaryRewritingInterface.rewriteCodeBlock((Byte *)callAddr, + VMInterface::rewriteCodeBlock((Byte *)callAddr, (Byte *)p, IPF_BUNDLE_SIZE); Index: vm/jitrino/src/codegenerator/ipf/IpfRuntimeSupport.cpp =================================================================== --- vm/jitrino/src/codegenerator/ipf/IpfRuntimeSupport.cpp (revision 523188) +++ vm/jitrino/src/codegenerator/ipf/IpfRuntimeSupport.cpp (working copy) @@ -142,7 +142,8 @@ dispatchNode = nodes[i]->getDispatchNode(); } } - compilationInterface.setNumExceptionHandler(tryRegions.size()); + MethodDesc* md = compilationInterface.getMethodToCompile(); + md->setNumExceptionHandler(tryRegions.size()); IPF_LOG << " region registration:" << endl; if(tryRegions.size() == 0) { @@ -152,7 +153,7 @@ IPF_LOG << " start end handler exception objIsDead" << endl; for(uint16 i=0; isetExceptionHandlerInfo(i, tryRegions[i]->startAddr, tryRegions[i]->endAddr, tryRegions[i]->handlerAddr, Index: vm/jitrino/src/codegenerator/ipf/IpfOpndManager.cpp =================================================================== --- vm/jitrino/src/codegenerator/ipf/IpfOpndManager.cpp (revision 523188) +++ vm/jitrino/src/codegenerator/ipf/IpfOpndManager.cpp (working copy) @@ -246,8 +246,8 @@ containCall = false; - refsCompressed = compilationInterface.areReferencesCompressed(); - vtablePtrsCompressed = compilationInterface.areVTablePtrsCompressed(); + refsCompressed = VMInterface::areReferencesCompressed(); + vtablePtrsCompressed = VMInterface::areVTablePtrsCompressed(); heapBase = NULL; heapBaseImm = NULL; vtableBase = NULL; @@ -333,7 +333,7 @@ Opnd *OpndManager::getVtableOffset() { if (vtableOffset == NULL) { - int64 offset = compilationInterface.getVTableOffset(); + int64 offset = VMInterface::getVTableOffset(); if (offset != 0) vtableOffset = newImm(offset); } return vtableOffset; @@ -349,7 +349,7 @@ InstVector &insts = enterNode->getInsts(); if (heapBase != NULL) { - baseValue = (uint64) compilationInterface.getHeapBase(); + baseValue = (uint64) VMInterface::getHeapBase(); baseImm = newImm(baseValue); Inst *inst = new(mm) Inst(mm, INST_MOVL, p0, heapBase, baseImm); @@ -357,11 +357,11 @@ IPF_LOG << " HeapBase initialization code inserted" << endl; } if (heapBaseImm != NULL) { - heapBaseImm->setValue((uint64)compilationInterface.getHeapBase()); + heapBaseImm->setValue((uint64)VMInterface::getHeapBase()); } if (vtableBase != NULL) { - baseValue = (uint64) compilationInterface.getVTableBase(); + baseValue = (uint64) VMInterface::getVTableBase(); baseImm = newImm(baseValue); Inst *inst = new(mm) Inst(mm, INST_MOVL, p0, vtableBase, baseImm); @@ -369,7 +369,7 @@ IPF_LOG << " VtableBase initialization code inserted" << endl; } if (vtableBaseImm != NULL) { - vtableBaseImm->setValue((uint64)compilationInterface.getVTableBase()); + vtableBaseImm->setValue((uint64)VMInterface::getVTableBase()); } } @@ -448,9 +448,8 @@ int64 OpndManager::getElemBaseOffset() { - DrlVMTypeManager typeManager(mm); - typeManager.init(compilationInterface); - ArrayType *arrayType = typeManager.getArrayType(typeManager.getInt64Type()); + TypeManager& tm = compilationInterface.getTypeManager(); + ArrayType *arrayType = tm.getArrayType(tm.getInt64Type()); return arrayType->getArrayElemOffset(); }