void OgreMeshReader::readMeshSkeletonLink(SubMeshStore &subMeshInfo) { OSG_OGRE_LOG(("OgreMeshReader::readMeshSkeletonLink\n")); if(_options.getLoadSkeleton() == true) { std::string skelName = readString(_is); std::string skelFile = SceneFileHandler::the()->getPathHandler()->findFile(skelName.c_str()); std::ifstream ifs(skelFile.c_str(), std::ios_base::in | std::ios_base::binary); OSG_OGRE_LOG(("OgreMeshReader::readMeshSkeletonLink: skelName '%s' file '%s'\n", skelName.c_str(), skelFile.c_str())); OgreSkeletonReader osr(ifs, _options); osr.read(); _skel = osr.getSkeleton(); if(osr.getGlobals() != NULL) _rootN->addAttachment(osr.getGlobals()); } else { skip(_is, _header.chunkSize - _chunkHeaderSize); } }
/** * Compile and finish executing a function. * We don't actually replace the interpreter frame. Instead, this * routine JIT-compiles the current method and then calls the result * of that. The JIT-ted version returns to here and the interpreter * then immediately exits, returning the result of the JIT-ted version, * which is returned here. */ bool OSR::execute(MethodEnv *env, Atom* interp_frame, MethodSignaturep ms, const uint8_t* osr_pc, Atom* result) { BaseExecMgr* exec = BaseExecMgr::exec(env); OSR osr(osr_pc, interp_frame); #ifdef AVMPLUS_VERBOSE if (env->method->pool()->isVerbose(VB_execpolicy)) { env->core()->console << "execpolicy jit hot-loop " << env->method << " osr_pc=" << int(osr_pc - ms->abc_code_start()) << "\n"; } #endif // compile the method with an OSR entry point AvmAssert(!env->method->hasFailedJit()); exec->verifyJit(env->method, ms, env->toplevel(), env->abcEnv(), &osr); env->_implGPR = env->method->_implGPR; if (env->method->hasFailedJit()) { // Clean up OSR object explicitly, as there is no destructor. mmfx_delete(osr.jit_frame_state); return false; } // Save current_osr. It will be set to NULL in adjust_frame(), // once we have initialized the JIT frame from it. exec->current_osr = &osr; int fakeArgc = ms->requiredParamCount(); *result = exec->endCoerce(env, fakeArgc, (uint32_t*)interp_frame, ms); return true; }
void OSRPass::_run(IRManager & irm) { splitCriticalEdges(irm); computeDominatorsAndLoops(irm); LoopTree* loopTree = irm.getLoopTree(); DominatorTree* dominatorTree = irm.getDominatorTree(); OSR osr(irm, irm.getMemoryManager(), loopTree, dominatorTree); osr.runPass(); }