Index: vm/jitrino/src/optimizer/FlowGraph.cpp =================================================================== --- vm/jitrino/src/optimizer/FlowGraph.cpp (revision 575658) +++ vm/jitrino/src/optimizer/FlowGraph.cpp (working copy) @@ -1042,6 +1042,7 @@ } void FlowGraph::print(std::ostream& os, Node* node) { + if(node) { os << "Block "; printLabel(os, node); os << ": "; @@ -1069,10 +1070,11 @@ // Print instructions printInsts(os, node, 2); - + } } void FlowGraph::printLabel(std::ostream& cout, Node* node) { + if (node) { Inst *first = (Inst*)node->getFirstInst(); assert(first->isLabel()); if (node->isBlockNode()) { @@ -1092,6 +1094,7 @@ } else { cout << "EXIT"; } + } } void FlowGraph::printInsts(std::ostream& cout, Node* node, uint32 indent){ Index: vm/jitrino/src/optimizer/escanalyzer.cpp =================================================================== --- vm/jitrino/src/optimizer/escanalyzer.cpp (revision 575658) +++ vm/jitrino/src/optimizer/escanalyzer.cpp (working copy) @@ -2203,14 +2203,20 @@ Inst* inst = ((Opnd*)(*it)->refObj)->getInst(); inst->print(os); if (inst->getOpcode()==Op_IndirectMemoryCall) { - MethodDesc* md; + MethodDesc* md = NULL; if (inst->getSrc(0)->getInst()->getOpcode()== Op_LdVar) { md = inst->getSrc(0)->getType()->asMethodPtrType()->getMethodDesc(); } else { - md = inst->getSrc(0)->getInst()->asMethodInst()->getMethodDesc(); + if ( inst->getSrc(0)->getInst()->asMethodInst() ) { + md = inst->getSrc(0)->getInst()->asMethodInst()->getMethodDesc(); + } } os << std::endl; os << " "; - md->printFullName(os); + if (md) { + md->printFullName(os); + } else { + os << "logging error"; + } } } if ((*it)->nodeType & NT_ACTARG) { //node of actual method parameter @@ -2390,14 +2396,21 @@ if (cgn->nodeType==NT_RETVAL) { inst = cgn->nInst; if (inst->getOpcode()==Op_IndirectMemoryCall) { - MethodDesc* md; + MethodDesc* md = NULL; if (inst->getSrc(0)->getInst()->getOpcode()== Op_LdVar) { md = inst->getSrc(0)->getType()->asMethodPtrType()->getMethodDesc(); } else { - md = inst->getSrc(0)->getInst()->asMethodInst()->getMethodDesc(); + if ( inst->getSrc(0)->getInst()->asMethodInst() ) { + md = inst->getSrc(0)->getInst()->asMethodInst()->getMethodDesc(); + } } - os << text << " "; - md->printFullName(os); os << std::endl; + os << text << " "; + if (md) { + md->printFullName(os); + } else { + os << "logging error"; + } + os << std::endl; } } if (cgn->nodeType==NT_LDOBJ && getEscState(cgn)!=GLOBAL_ESCAPE) { Index: vm/jitrino/src/optimizer/IRBuilder.cpp =================================================================== --- vm/jitrino/src/optimizer/IRBuilder.cpp (revision 575658) +++ vm/jitrino/src/optimizer/IRBuilder.cpp (working copy) @@ -1530,7 +1530,7 @@ bool convOk = retType == srcType; convOk = convOk || (retType->isObject() && srcType->isObject()); if (!convOk){ - assert(!typeManager->isLazyResolutionMode()); +// assert(!typeManager->isLazyResolutionMode()); Log::out() << "ERROR !!!! IRBuilder: unimplemented: ret typecheck !!!\n"; } }