Package edu.umd.cs.findbugs.ba

Examples of edu.umd.cs.findbugs.ba.LiveLocalStoreDataflow


        ReverseDepthFirstSearch rdfs = getReverseDepthFirstSearch(analysisCache, descriptor);

        LiveLocalStoreAnalysis analysis = new LiveLocalStoreAnalysis(methodGen, rdfs, getDepthFirstSearch(analysisCache,
                descriptor));
        LiveLocalStoreDataflow dataflow = new LiveLocalStoreDataflow(cfg, analysis);

        dataflow.execute();
        if (ClassContext.DUMP_DATAFLOW_ANALYSIS) {
            ClassContext.dumpLiveLocalStoreDataflow(descriptor, cfg, dataflow);

        }
        return dataflow;
View Full Code Here


            // See if the store that saves the exception object
            // is alive or dead. We rely on the fact that javac
            // always (?) emits an ASTORE instruction to save
            // the caught exception.
            LiveLocalStoreDataflow dataflow = getClassContext().getLiveLocalStoreDataflow(getMethod());
            CFG cfg = getClassContext().getCFG(getMethod());
            Collection<BasicBlock> blockList = cfg.getBlocksContainingInstructionWithOffset(obj.getHandlerPC());
            for (BasicBlock block : blockList) {
                InstructionHandle first = block.getFirstInstruction();
                if (first != null && first.getPosition() == obj.getHandlerPC() && first.getInstruction() instanceof ASTORE) {
                    ASTORE astore = (ASTORE) first.getInstruction();
                    BitSet liveStoreSet = dataflow.getFactAtLocation(new Location(first, block));
                    if (!liveStoreSet.get(astore.getIndex())) {
                        // The ASTORE storing the exception object is dead
                        if (DEBUG) {
                            System.out.println("Dead exception store at " + first);
                        }
View Full Code Here

TOP

Related Classes of edu.umd.cs.findbugs.ba.LiveLocalStoreDataflow

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.