Examples of MethodInsnNode


Examples of org.objectweb.asm.tree.MethodInsnNode

        switch (insn.getOpcode()) {
        case INVOKEVIRTUAL:
        case INVOKESPECIAL:
        case INVOKESTATIC:
        case INVOKEINTERFACE: {
            final MethodInsnNode invoke = (MethodInsnNode) insn;
            return new Invoke(Type.getReturnType(invoke.desc), values);
        }
        case INVOKEDYNAMIC: {
            final InvokeDynamicInsnNode invoke = (InvokeDynamicInsnNode) insn;
            return new Invoke(Type.getReturnType(invoke.desc), values);
View Full Code Here

Examples of org.objectweb.asm.tree.MethodInsnNode

       
        break;
      }
     
      case INVOKE: {
        final MethodInsnNode m = (MethodInsnNode) instruction.getInstruction();
       
        final int nargs = Type.getArgumentTypes(m.desc).length;
       
        final ValueRef[] args = pop(stack, opcode == Opcodes.INVOKESTATIC ? nargs : nargs + 1);
       
View Full Code Here

Examples of org.objectweb.asm.tree.MethodInsnNode

        assertEquals("J", ((TypeInsnNode) it.next()).desc);
       
        MultiANewArrayInsnNode n3 = (MultiANewArrayInsnNode) it.next();
        assertEquals("[[LB1;", n3.desc);
       
        MethodInsnNode n4 = (MethodInsnNode) it.next();
        assertEquals("D1", n4.owner);
        assertEquals("([[LB1;LC1;LD1;)LC1;", n4.desc);
       
        FrameNode fn0 = (FrameNode) it.next();
        assertEquals(Collections.EMPTY_LIST, fn0.local);
View Full Code Here

Examples of org.objectweb.asm.tree.MethodInsnNode

      // If ALOAD and previous instruction was a map(Object, Object) or mutator
      if (opcode == Opcodes.ALOAD) {
        if (!instructions.isEmpty()) {
          AbstractInsnNode previous = instructions.get(instructions.size() - 1);
          if (isMethodInvocation(previous)) {
            MethodInsnNode mn = (MethodInsnNode) previous;
            if (isMapBothMethod(mn) || !isAccessor(mn))
              instructions.add(new InsnNode(opcode));
          }
        }
      }
View Full Code Here

Examples of org.objectweb.asm.tree.MethodInsnNode

          && (name.equals(SOURCE_FIELD) || name.equals(DEST_FIELD));

      // If not special and not source method invocation and owner is not a primitive wrapper
      if (opcode != Opcodes.INVOKESPECIAL && !isSourceMethod
          && !Primitives.isPrimitiveWrapperInternalName(owner))
        instructions.add(new MethodInsnNode(opcode, owner, name, desc, itf));
    }
View Full Code Here

Examples of org.objectweb.asm.tree.MethodInsnNode

          else if (subjectType == 2) {
            setLastMutatorOwner(Type.getType(fn.desc));
            recordDestinationField(ownerType, fieldFor(ownerType, fn));
          }
        } else if (isMethodInvocation(ins)) {
          MethodInsnNode mn = (MethodInsnNode) ins;

          if (isMapMethod(mn) || isSkipMethod(mn)) {
            lastMutatorOwner = destClassInternalName;
            if (MAP_DEST_METHOD_DESC.equals(mn.desc)) {
              mapType = 1;
View Full Code Here

Examples of org.objectweb.asm.tree.MethodInsnNode

    static String fiberArg = D_FIBER + ')';
    void genCall(MethodVisitor mv) {
        mv.visitLabel(callLabel.getLabel());
        loadVar(mv, TOBJECT, methodWeaver.getFiberVar());
        mv.visitMethodInsn(INVOKEVIRTUAL, FIBER_CLASS, "down", "()" + D_FIBER);
        MethodInsnNode mi = getMethodInsn();
        if (mi.desc.indexOf(fiberArg) == -1) {
            // Don't add another fiberarg if it already has one. It'll already
            // have one if we have copied jsr instructions and modified the
            // same instruction node earlier.
            mi.desc = mi.desc.replace(")", fiberArg);
        }
        mi.accept(mv);
    }
View Full Code Here

Examples of org.objectweb.asm.tree.MethodInsnNode

        }
        releaseVar(stateVar, 1);
    }

    private String getReceiverTypename() {
        MethodInsnNode min = getMethodInsn();
        return min.owner;
    }
View Full Code Here

Examples of org.objectweb.asm.tree.MethodInsnNode

        // method call sites. If the class is already woven, we don't need this
        // functionality.
        if (!classFlow.isWoven) {
            int methodStatus = detector.getPausableStatus(owner, name, desc);
            if (methodStatus == Detector.PAUSABLE_METHOD_FOUND) {
                MethodInsnNode min = (MethodInsnNode)instructions.get(instructions.size()-1);
                pausableMethods.add(min);
            }
        }
    }
View Full Code Here

Examples of org.objectweb.asm.tree.MethodInsnNode

                    case INVOKEVIRTUAL:
                    case INVOKESPECIAL:
                    case INVOKESTATIC:
                    case INVOKEINTERFACE:
                        // pop args, push return value
                        MethodInsnNode min = ((MethodInsnNode) ain);
                        String desc = min.desc;
                        if (flow.isPausableMethodInsn(min) && frame.numMonitorsActive > 0) {
                            throw new KilimException("Error: Can not call pausable nethods from within a synchronized block\n" +
                                    "Caller: " + this.flow.classFlow.name.replace('/', '.') + "." + this.flow.name + this.flow.desc +
                                    "\nCallee: " + ((MethodInsnNode)ain).name);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.