/** * Sets a method call target for a direct method call. * WARNING: A method call made this way will run outside of the MOP! * @param mn the target as MethodNode, mn==null means no target */ public void setMethodTarget(MethodNode mn) { this.target = mn; if (mn!=null) { setType(target.getReturnType()); } else { setType(ClassHelper.OBJECT_TYPE); } }
public MethodCallExpression(Expression objectExpression, Expression method, Expression arguments) { this.objectExpression = objectExpression; this.method = method; if (!(arguments instanceof TupleExpression)){ this.arguments = new TupleExpression(arguments); } else { this.arguments = arguments; } //TODO: set correct type here // if setting type and a methodcall is the last expression in a method, // then the method will return null if the method itself is not void too! // (in bytecode after call: aconst_null, areturn) this.setType(ClassHelper.DYNAMIC_TYPE); this.setImplicitThis(true); }
/** * Sets a method call target for a direct method call. * WARNING: A method call made this way will run outside of the MOP! * @param mn the target as MethodNode, mn==null means no target */ public void setMethodTarget(MethodNode mn) { this.target = mn; if (mn!=null) { setType(target.getReturnType()); } else { setType(ClassHelper.OBJECT_TYPE); } }
public MethodCallExpression(Expression objectExpression, Expression method, Expression arguments) { this.objectExpression = objectExpression; this.method = method; this.arguments = arguments; //TODO: set correct type here // if setting type and a methodcall is the last expression in a method, // then the method will return null if the method itself is not void too! // (in bytecode after call: aconst_null, areturn) this.setType(ClassHelper.DYNAMIC_TYPE); this.setImplicitThis(true); }
public MethodCallExpression(Expression objectExpression, Expression method, Expression arguments) { this.objectExpression = objectExpression; this.method = method; this.arguments = arguments; //TODO: set correct type here // if setting type and a methodcall is the last expression in a method, // then the method will return null if the method itself is not void too! // (in bytecode after call: aconst_null, areturn) this.setType(ClassHelper.DYNAMIC_TYPE); this.setImplicitThis(true); }
public MethodCallExpression(Expression objectExpression, Expression method, Expression arguments) { this.objectExpression = objectExpression; this.method = method; this.arguments = arguments; //TODO: set correct type here // if setting type and a methodcall is the last expression in a method, // then the method will return null if the method itself is not void too! // (in bytecode after call: aconst_null, areturn) this.setType(ClassHelper.DYNAMIC_TYPE); this.setImplicitThis(true); }
public MethodCallExpression(Expression objectExpression, Expression method, Expression arguments) { this.objectExpression = objectExpression; this.method = method; if (!(arguments instanceof TupleExpression)){ this.arguments = new TupleExpression(arguments); } else { this.arguments = arguments; } //TODO: set correct type here // if setting type and a methodcall is the last expression in a method, // then the method will return null if the method itself is not void too! // (in bytecode after call: aconst_null, areturn) this.setType(ClassHelper.DYNAMIC_TYPE); this.setImplicitThis(true); }