@Override public TypeReference getFieldTypeReference() { return invoke.getDeclaredTarget().getParameterType(yuck); } @Override
@Override public TypeReference getParameterType(int i) { if (isStatic()) { return method.getParameterType(i); } else { if (i == 0) { return method.getDeclaringClass(); } else { return method.getParameterType(i - 1); } } }
@Override public TypeReference getParameterType(int i) { if (isStatic()) { return method.getParameterType(i); } else { if (i == 0) { return method.getDeclaringClass(); } else { return method.getParameterType(i - 1); } } }
@Override public TypeReference getFieldTypeReference() { return invoke.getDeclaredTarget().getParameterType(yuck); } @Override
/** * Note that by convention, getParameterType(0) == this for non-static methods. */ public TypeReference getParameterType(int i) { if (isStatic()) { return method.getParameterType(i); } else { if (i == 0) { return method.getDeclaringClass(); } else { return method.getParameterType(i - 1); } } }
/** * Note that by convention, getParameterType(0) == this for non-static methods. */ public TypeReference getParameterType(int i) { if (isStatic()) { return method.getParameterType(i); } else { if (i == 0) { return method.getDeclaringClass(); } else { return method.getParameterType(i - 1); } } }
@Override public TypeReference getParameterType(int index) { if (!isStatic()) { if (index == 0) { return myClass.getReference(); } else { return getReference().getParameterType(index - 1); } } else { return getReference().getParameterType(index); } }
@Override public TypeReference getParameterType(int index) { if (!isStatic()) { if (index == 0) { return myClass.getReference(); } else { return getReference().getParameterType(index - 1); } } else { return getReference().getParameterType(index); } }
/** * By convention, for a non-static method, getParameterType(0) is the this pointer */ @Override public TypeReference getParameterType(int i) { if (!isStatic()) { if (i == 0) { return declaringClass.getReference(); } else { return getReference().getParameterType(i - 1); } } else { return getReference().getParameterType(i); } }
/** * By convention, for a non-static method, getParameterType(0) is the this pointer */ @Override public TypeReference getParameterType(int i) { if (!isStatic()) { if (i == 0) { return declaringClass.getReference(); } else { return getReference().getParameterType(i - 1); } } else { return getReference().getParameterType(i); } }
private static boolean dispatchIndex(CallSiteReference ref, int i) { if (ref.isStatic()) { return ! ref.getDeclaredTarget().getParameterType(i).isPrimitiveType(); } else { return i==0 || ! ref.getDeclaredTarget().getParameterType(i-1).isPrimitiveType(); } }
private static boolean dispatchIndex(CallSiteReference ref, int i) { if (ref.isStatic()) { return ! ref.getDeclaredTarget().getParameterType(i).isPrimitiveType(); } else { return i==0 || ! ref.getDeclaredTarget().getParameterType(i-1).isPrimitiveType(); } }
/** * Make an Parameter Object using a Descriptor-based numbering (starting with 1). * * Number 1 is the first parameter in the methods Selector. No matter if the function has an * implicit this pointer. * * If the Function has an implicit this-pointer you can access it using getThis(). * * @param no the number in the Selector * @return new Parameter-Object for no * @throws IllegalArgumentException if the parameter is zero * @throws ArrayIndexOutOfBoundsException if no is not within bounds [1 to numberOfParameters] */ public Parameter getParameter(final int no) { // no is checked by getParameterNo(int) final int newNo = getParameterNo(no); switch (this.base) { case IMETHOD: // TODO: Try reading parameter name return new Parameter(newNo, null, this.method.getParameterType(no), ParamerterDisposition.PARAM, this.base, this.method.getReference(), this.descriptorOffset); case METHOD_REFERENCE: return new Parameter(newNo, null, this.mRef.getParameterType(no - 1), ParamerterDisposition.PARAM, this.base, this.mRef, this.descriptorOffset); default: throw new UnsupportedOperationException("No implementation of getParameter() for base " + this.base); } }
/** * Make an Parameter Object using a Descriptor-based numbering (starting with 1). * * Number 1 is the first parameter in the methods Selector. No matter if the function has an * implicit this pointer. * * If the Function has an implicit this-pointer you can access it using getThis(). * * @param no the number in the Selector * @return new Parameter-Object for no * @throws IllegalArgumentException if the parameter is zero * @throws ArrayIndexOutOfBoundsException if no is not within bounds [1 to numberOfParameters] */ public Parameter getParameter(final int no) { // no is checked by getParameterNo(int) final int newNo = getParameterNo(no); switch (this.base) { case IMETHOD: // TODO: Try reading parameter name return new Parameter(newNo, null, this.method.getParameterType(no), ParamerterDisposition.PARAM, this.base, this.method.getReference(), this.descriptorOffset); case METHOD_REFERENCE: return new Parameter(newNo, null, this.mRef.getParameterType(no - 1), ParamerterDisposition.PARAM, this.base, this.mRef, this.descriptorOffset); default: throw new UnsupportedOperationException("No implementation of getParameter() for base " + this.base); } }
public int getNumberOfParameterRegisters() { int number = isStatic() || isClinit() ? 0 : 1; for(int i = 0; i < getReference().getNumberOfParameters(); i++) { TypeReference ref = getReference().getParameterType(i); number += ref.equals(TypeReference.Double) || ref.equals(TypeReference.Long) ? 2 : 1; } return number; }
public int getNumberOfParameterRegisters() { int number = isStatic() || isClinit() ? 0 : 1; for(int i = 0; i < getReference().getNumberOfParameters(); i++) { TypeReference ref = getReference().getParameterType(i); number += ref.equals(TypeReference.Double) || ref.equals(TypeReference.Long) ? 2 : 1; } return number; }
all.add(new Parameter(i + firstInSelector, null, this.mRef.getParameterType(i), ParamerterDisposition.PARAM, this.base, this.mRef, this.descriptorOffset));
all.add(new Parameter(i + firstInSelector, null, this.mRef.getParameterType(i), ParamerterDisposition.PARAM, this.base, this.mRef, this.descriptorOffset));
if (m.getParameterType(i) == TypeReference.Double || m.getParameterType(i) == TypeReference.Long) n--; int[] params = new int[n]; params[i] = workingState.getLocal(instruction.args[arg_i]); if (m.getParameterType(i) == TypeReference.Double || m.getParameterType(i) == TypeReference.Long) arg_i++; arg_i++; for (int i = 0; i < (n-1); i++) { params[i+1] = workingState.getLocal(instruction.args[arg_i]); if (m.getParameterType(i) == TypeReference.Double || m.getParameterType(i) == TypeReference.Long) arg_i++; arg_i++;
if (m.getParameterType(i) == TypeReference.Double || m.getParameterType(i) == TypeReference.Long) n--; int[] params = new int[n]; params[i] = workingState.getLocal(instruction.args[arg_i]); if (m.getParameterType(i) == TypeReference.Double || m.getParameterType(i) == TypeReference.Long) arg_i++; arg_i++; for (int i = 0; i < (n-1); i++) { params[i+1] = workingState.getLocal(instruction.args[arg_i]); if (m.getParameterType(i) == TypeReference.Double || m.getParameterType(i) == TypeReference.Long) arg_i++; arg_i++;