return; int varIndex = ((ASTORE)ih.getInstruction()).getIndex(); firstInstruction = ih.getNext(); if(firstInstruction == null) {
ASTORE astore = (ASTORE) first.getInstruction(); BitSet liveStoreSet = dataflow.getFactAtLocation(new Location(first, block)); if (!liveStoreSet.get(astore.getIndex())) {
/** Checks if the constraints of operands of the said instruction(s) are satisfied. */ public void visitASTORE(ASTORE o){ int idx = o.getIndex(); if (idx < 0){ constraintViolated(o, "Index '"+idx+"' must be non-negative."); } else{ int maxminus1 = max_locals()-1; if (idx > maxminus1){ constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-1 '"+maxminus1+"'."); } } }
/** Checks if the constraints of operands of the said instruction(s) are satisfied. */ @Override public void visitASTORE(final ASTORE o) { final int idx = o.getIndex(); if (idx < 0) { constraintViolated(o, "Index '"+idx+"' must be non-negative."); } else{ final int maxminus1 = max_locals()-1; if (idx > maxminus1) { constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-1 '"+maxminus1+"'."); } } }
/** Symbolically executes the corresponding Java Virtual Machine instruction. */ @Override public void visitASTORE(final ASTORE o) { locals().set(o.getIndex(), stack().pop()); //System.err.println("TODO-DEBUG: set LV '"+o.getIndex()+"' to '"+locals().get(o.getIndex())+"'."); }
/** Symbolically executes the corresponding Java Virtual Machine instruction. */ public void visitASTORE(ASTORE o){ locals().set(o.getIndex(), stack().pop()); //System.err.println("TODO-DEBUG: set LV '"+o.getIndex()+"' to '"+locals().get(o.getIndex())+"'."); }
/** * Adds a new JSR or JSR_W that has this subroutine as its target. */ public void addEnteringJsrInstruction(final InstructionHandle jsrInst) { if ( (jsrInst == null) || (! (jsrInst.getInstruction() instanceof JsrInstruction))) { throw new AssertionViolatedException("Expecting JsrInstruction InstructionHandle."); } if (localVariable == UNSET) { throw new AssertionViolatedException("Set the localVariable first!"); } // Something is wrong when an ASTORE is targeted that does not operate on the same local variable than the rest of the // JsrInstruction-targets and the RET. // (We don't know out leader here so we cannot check if we're really targeted!) if (localVariable != ((ASTORE) (((JsrInstruction) jsrInst.getInstruction()).getTarget().getInstruction())).getIndex()) { throw new AssertionViolatedException("Setting a wrong JsrInstruction."); } theJSRs.add(jsrInst); }
/** * Adds a new JSR or JSR_W that has this subroutine as its target. */ public void addEnteringJsrInstruction(InstructionHandle jsrInst){ if ( (jsrInst == null) || (! (jsrInst.getInstruction() instanceof JsrInstruction))){ throw new AssertionViolatedException("Expecting JsrInstruction InstructionHandle."); } if (localVariable == UNSET){ throw new AssertionViolatedException("Set the localVariable first!"); } else{ // Something is wrong when an ASTORE is targeted that does not operate on the same local variable than the rest of the // JsrInstruction-targets and the RET. // (We don't know out leader here so we cannot check if we're really targeted!) if (localVariable != ((ASTORE) (((JsrInstruction) jsrInst.getInstruction()).getTarget().getInstruction())).getIndex()){ throw new AssertionViolatedException("Setting a wrong JsrInstruction."); } } theJSRs.add(jsrInst); }
SubroutineImpl sr = new SubroutineImpl(); InstructionHandle astore = (InstructionHandle) (iter.next()); sr.setLocalVariable( ((ASTORE) (astore.getInstruction())).getIndex() ); subroutines.put(astore, sr);
sr.setLocalVariable( ((ASTORE) (astore.getInstruction())).getIndex() ); subroutines.put(astore, sr);
return; int varIndex = ((ASTORE)ih.getInstruction()).getIndex(); firstInstruction = ih.getNext(); if(firstInstruction == null) {
ASTORE astore = (ASTORE) first.getInstruction(); BitSet liveStoreSet = dataflow.getFactAtLocation(new Location(first, block)); if (!liveStoreSet.get(astore.getIndex())) {