Package ast

Examples of ast.FunctionDeclaration


 
  /** Generate code for a function call. */
  @Override
  public Value visitCall(Call nd) {
    String calleeName = nd.getCallee().getName();
    FunctionDeclaration calleeDecl = nd.getCallTarget();
    Module calleeModule = calleeDecl.getModule();
    ArrayList<Type> parmTypes = new ArrayList<Type>(calleeDecl.getNumParameter());
    for(Parameter parm : calleeDecl.getParameters())
      parmTypes.add(SootTypeUtil.getSootType(parm.type()));
    Type rettp = SootTypeUtil.getSootType(calleeDecl.getReturnType().getDescriptor());
   
    // compute reference to callee
    SootClass calleeSootClass = fcg.getModuleCodeGenerator().getProgramCodeGenerator().getSootClass(calleeModule);
    SootMethodRef callee = Scene.v().makeMethodRef(calleeSootClass, calleeName, parmTypes, rettp, true);
   
View Full Code Here

TOP

Related Classes of ast.FunctionDeclaration

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.