Package org.objectweb.asm.tree.analysis

Examples of org.objectweb.asm.tree.analysis.Value


    Frame[] frames = a.getFrames();
    AbstractInsnNode[] insns = mn.instructions.toArray();
    for (int i = 0; i < insns.length; ++i) {
      AbstractInsnNode insn = insns[i];
      if (frames[i] != null) {
        Value v = getTarget(insn, frames[i]);
        if (v == IsNullInterpreter.NULL
            || v == IsNullInterpreter.MAYBENULL) {
          result.add(insn);
        }
      }
View Full Code Here


            }
           
            sb.append(";");
            for (int j = 0; j < getStackSize(); j++) {
                sb.append(" ");
                Value v = getStack(j);
                sb.append(v == IsNullInterpreter.NULL ? "null" : v);
            }
           
            return sb.toString();
        }
View Full Code Here

        public final void removeDeadAssignments(InsnList instructions, AbstractInsnNode insn) {
            if (insn.getOpcode() != Opcodes.ASTORE) return;
           
            VarInsnNode varInsn = (VarInsnNode)insn;
           
            Value topValue = getStack(getStackSize() - 1);
            if (!liveOut.get(varInsn.var) && topValue != IsNullInterpreter.NULL) {
                InsnNode pop = new InsnNode(Opcodes.POP);
                instructions.insert(insn, pop);
                instructions.remove(insn);
                def.clear();
View Full Code Here

                    MethodInsnNode min = (MethodInsnNode) ins;
                    if ("<init>".equals(min.name)) {
                        int argSize = TypeAnalyzer.getNumArguments(min.desc);
                        Frame frame = frames[i];
                        int stackIndex = frame.getStackSize() - argSize - 1;
                        Value thisValue = frame.getStack(stackIndex);
                        if (stackIndex >= 1
                                && isNewValue(thisValue, true)
                                && isNewValue(frame.getStack(stackIndex - 1), false)) {
                            NewValue newValue = (NewValue) thisValue;
                            if (newValue.omitted) {
View Full Code Here

                    }
                    if (insn.getOpcode() != Opcodes.INVOKESTATIC) {
                        pop();
                        if(insn.getOpcode() == Opcodes.INVOKESPECIAL && getStackSize() > 0) {
                            if("<init>".equals(((MethodInsnNode)insn).name)) {
                                Value value = pop();
                                if(value instanceof NewValue) {
                                    value = new BasicValue(((NewValue)value).getType());
                                }
                                push(value);
                            }
View Full Code Here

                    MethodInsnNode min = (MethodInsnNode) ins;
                    if ("<init>".equals(min.name)) {
                        int argSize = TypeAnalyzer.getNumArguments(min.desc);
                        Frame frame = frames[i];
                        int stackIndex = frame.getStackSize() - argSize - 1;
                        Value thisValue = frame.getStack(stackIndex);
                        if (stackIndex >= 1
                                && isNewValue(thisValue, true)
                                && isNewValue(frame.getStack(stackIndex - 1), false)) {
                            NewValue newValue = (NewValue) thisValue;
                            if (newValue.omitted) {
View Full Code Here

                    MethodInsnNode min = (MethodInsnNode) ins;
                    if ("<init>".equals(min.name)) {
                        int argSize = TypeAnalyzer.getNumArguments(min.desc);
                        Frame frame = frames[i];
                        int stackIndex = frame.getStackSize() - argSize - 1;
                        Value thisValue = frame.getStack(stackIndex);
                        if (stackIndex >= 1
                                && isNewValue(thisValue, true)
                                && isNewValue(frame.getStack(stackIndex - 1), false)) {
                            NewValue newValue = (NewValue) thisValue;
                            if (newValue.omitted) {
View Full Code Here

                    MethodInsnNode min = (MethodInsnNode) ins;
                    if ("<init>".equals(min.name)) {
                        int argSize = TypeAnalyzer.getNumArguments(min.desc);
                        Frame frame = frames[i];
                        int stackIndex = frame.getStackSize() - argSize - 1;
                        Value thisValue = frame.getStack(stackIndex);
                        if (stackIndex >= 1
                                && isNewValue(thisValue, true)
                                && isNewValue(frame.getStack(stackIndex - 1), false)) {
                            NewValue newValue = (NewValue) thisValue;
                            if (newValue.omitted) {
View Full Code Here

                    MethodInsnNode min = (MethodInsnNode) ins;
                    if ("<init>".equals(min.name)) {
                        int argSize = TypeAnalyzer.getNumArguments(min.desc);
                        Frame frame = frames[i];
                        int stackIndex = frame.getStackSize() - argSize - 1;
                        Value thisValue = frame.getStack(stackIndex);
                        if (stackIndex >= 1
                                && isNewValue(thisValue, true)
                                && isNewValue(frame.getStack(stackIndex - 1), false)) {
                            NewValue newValue = (NewValue) thisValue;
                            if (newValue.omitted) {
View Full Code Here

                    MethodInsnNode min = (MethodInsnNode) ins;
                    if ("<init>".equals(min.name)) {
                        int argSize = TypeAnalyzer.getNumArguments(min.desc);
                        Frame frame = frames[i];
                        int stackIndex = frame.getStackSize() - argSize - 1;
                        Value thisValue = frame.getStack(stackIndex);
                        if (stackIndex >= 1
                                && isNewValue(thisValue, true)
                                && isNewValue(frame.getStack(stackIndex - 1), false)) {
                            NewValue newValue = (NewValue) thisValue;
                            if (newValue.omitted) {
View Full Code Here

TOP

Related Classes of org.objectweb.asm.tree.analysis.Value

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.