本文整理汇总了Java中org.apache.bcel.generic.AASTORE类的典型用法代码示例。如果您正苦于以下问题:Java AASTORE类的具体用法?Java AASTORE怎么用?Java AASTORE使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AASTORE类属于org.apache.bcel.generic包,在下文中一共展示了AASTORE类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visitAASTORE
import org.apache.bcel.generic.AASTORE; //导入依赖的package包/类
@Override
public void visitAASTORE(AASTORE obj) {
try {
Taint valueTaint = getFrame().popValue();
getFrame().popValue(); // array index
Taint arrayTaint = getFrame().popValue();
Taint merge = Taint.merge(valueTaint, arrayTaint);
setLocalVariableTaint(merge, arrayTaint);
Taint stackTop = null;
if (getFrame().getStackDepth() > 0) {
stackTop = getFrame().getTopValue();
}
// varargs use duplicated values
if (stackTop == arrayTaint) {
getFrame().popValue();
getFrame().pushValue(new Taint(merge));
}
} catch (DataflowAnalysisException ex) {
throw new InvalidBytecodeException("Not enough values on the stack", ex);
}
}
示例2: storeLocal
import org.apache.bcel.generic.AASTORE; //导入依赖的package包/类
public void storeLocal(int pc, int slot) {
boolean isupval = pi.isUpvalueAssign(pc, slot);
int index = findSlotIndex( slot, isupval );
if (isupval) {
boolean isupcreate = pi.isUpvalueCreate(pc, slot);
if ( isupcreate ) {
append(factory.createInvoke(classname, "newupe", TYPE_LOCALUPVALUE, ARG_TYPES_NONE, Constants.INVOKESTATIC));
append(InstructionConstants.DUP);
append(new ASTORE(index));
} else {
append(new ALOAD(index));
}
append(InstructionConstants.SWAP);
append(new PUSH(cp, 0));
append(InstructionConstants.SWAP);
append(InstructionConstants.AASTORE);
} else {
append(new ASTORE(index));
}
}
示例3: storeUpvalue
import org.apache.bcel.generic.AASTORE; //导入依赖的package包/类
public void storeUpvalue(int pc, int upindex, int slot) {
boolean isrw = pi.isReadWriteUpvalue( pi.upvals[upindex] );
append(InstructionConstants.THIS);
if ( isrw ) {
append(factory.createFieldAccess(classname, upvalueName(upindex), TYPE_LOCALUPVALUE, Constants.GETFIELD));
append(new PUSH(cp,0));
loadLocal(pc, slot);
append(InstructionConstants.AASTORE);
} else {
loadLocal(pc, slot);
append(factory.createFieldAccess(classname, upvalueName(upindex), TYPE_LUAVALUE, Constants.PUTFIELD));
}
}
示例4: loadArrayArgs
import org.apache.bcel.generic.AASTORE; //导入依赖的package包/类
public void loadArrayArgs(int pc, int firstslot, int nargs) {
append(new PUSH(cp, nargs));
append(new ANEWARRAY(cp.addClass(STR_LUAVALUE)));
for ( int i=0; i<nargs; i++ ) {
append(InstructionConstants.DUP);
append(new PUSH(cp, i));
loadLocal(pc, firstslot++);
append(new AASTORE());
}
}
示例5: isArrayStore
import org.apache.bcel.generic.AASTORE; //导入依赖的package包/类
public boolean isArrayStore(Instruction instruction) {
return instruction instanceof AASTORE || instruction instanceof BASTORE ||
instruction instanceof CASTORE || instruction instanceof DASTORE ||
instruction instanceof FASTORE || instruction instanceof IASTORE ||
instruction instanceof LASTORE || instruction instanceof SASTORE;
}
示例6: createInstructionAastore
import org.apache.bcel.generic.AASTORE; //导入依赖的package包/类
@SuppressWarnings("unused")
// Called using reflection
private Instruction createInstructionAastore(Element inst) {
return new AASTORE();
}
示例7: visitAASTORE
import org.apache.bcel.generic.AASTORE; //导入依赖的package包/类
@Override
public void visitAASTORE(AASTORE arr) {
handleArrayStore(arr);
}