@Override public Position getNamePosition() { return base.getNamePosition(); }
@Override public Position getNamePosition() { return base.getNamePosition(); }
public void closeFunctionEntity(final CAstEntity n, WalkContext parentContext, WalkContext functionContext) { // exit block functionContext.cfg().makeExitBlock(functionContext.cfg().newBlock(true)); // create code entry stuff for this entity SymbolTable symtab = ((AbstractScope) functionContext.currentScope()).getUnderlyingSymtab(); Map<IBasicBlock<SSAInstruction>,TypeReference[]> catchTypes = functionContext.getCatchTypes(); AstCFG cfg = new AstCFG(n, functionContext.cfg(), symtab, insts); Position[] line = functionContext.cfg().getLinePositionMap(); Position[][] operand = functionContext.cfg().getOperandPositionMap(); boolean katch = functionContext.cfg().hasCatchBlock(); boolean monitor = functionContext.cfg().hasMonitorOp(); String[] nms = makeNameMap(n, functionContext.entityScopes(), cfg.getInstructions()); /* * Set reachableBlocks = DFS.getReachableNodes(cfg, * Collections.singleton(cfg.entry())); * Assertions._assert(reachableBlocks.size() == cfg.getNumberOfNodes(), * cfg.toString()); */ // (put here to allow subclasses to handle stuff in scoped entities) // assemble lexical information AstLexicalInformation LI = new AstLexicalInformation(functionContext.getEntityName(n), functionContext.currentScope(), cfg.getInstructions(), functionContext.exposeNameSet(n, false), functionContext.exposeNameSet(n, true), functionContext.getAccesses(n)); Position[] parameterPositions = getParameterPositions(n); DebuggingInformation DBG = new AstDebuggingInformation(n.getNamePosition(), n.getPosition(), line, operand, parameterPositions, nms); // actually make code body defineFunction(n, parentContext, cfg, symtab, katch, catchTypes, monitor, LI, DBG); }
public void closeFunctionEntity(final CAstEntity n, WalkContext parentContext, WalkContext functionContext) { // exit block functionContext.cfg().makeExitBlock(functionContext.cfg().newBlock(true)); // create code entry stuff for this entity SymbolTable symtab = ((AbstractScope) functionContext.currentScope()).getUnderlyingSymtab(); Map<IBasicBlock<SSAInstruction>,TypeReference[]> catchTypes = functionContext.getCatchTypes(); AstCFG cfg = new AstCFG(n, functionContext.cfg(), symtab, insts); Position[] line = functionContext.cfg().getLinePositionMap(); Position[][] operand = functionContext.cfg().getOperandPositionMap(); boolean katch = functionContext.cfg().hasCatchBlock(); boolean monitor = functionContext.cfg().hasMonitorOp(); String[] nms = makeNameMap(n, functionContext.entityScopes(), cfg.getInstructions()); /* * Set reachableBlocks = DFS.getReachableNodes(cfg, * Collections.singleton(cfg.entry())); * Assertions._assert(reachableBlocks.size() == cfg.getNumberOfNodes(), * cfg.toString()); */ // (put here to allow subclasses to handle stuff in scoped entities) // assemble lexical information AstLexicalInformation LI = new AstLexicalInformation(functionContext.getEntityName(n), functionContext.currentScope(), cfg.getInstructions(), functionContext.exposeNameSet(n, false), functionContext.exposeNameSet(n, true), functionContext.getAccesses(n)); Position[] parameterPositions = getParameterPositions(n); DebuggingInformation DBG = new AstDebuggingInformation(n.getNamePosition(), n.getPosition(), line, operand, parameterPositions, nms); // actually make code body defineFunction(n, parentContext, cfg, symtab, katch, catchTypes, monitor, LI, DBG); }