All Superinterfaces:
IEGeneric, IEStatement, IInstruction, IInstructionOperand, IResizableInstruction

@Ser public interface IECall extends IEStatement
IR statement used to represent calls to sub-routines.

Default memory access information is set to null to indicate it should be determined by the IR itself.

  • Method Details

    • setFailsafePrototype

      void setFailsafePrototype(boolean enabled)
    • isFailsafePrototype

      boolean isFailsafePrototype()
    • getPrototype

      IWildcardPrototype getPrototype()
    • setPrototype

      void setPrototype(IWildcardPrototype prototype, boolean failsafe)
      Dangerous method, will be removed from API. The prototype compatibility with the current call attributes (returns, params, etc.) is not verified.
      Parameters:
      prototype -
      failsafe -
    • getCallSite

      IEGeneric getCallSite()
    • setCallsite

      void setCallsite(IEGeneric callsite)
    • isStaticCallsite

      boolean isStaticCallsite()
    • getStaticCallsite

      INativeMethodItem getStaticCallsite()
    • getDynamicTargetCandidates

      List<IEVar> getDynamicTargetCandidates()
    • getReturnLocation

      IEGeneric getReturnLocation()
      Retrieve the return address for this call. The return address may be null if the call-to-sub is a regular call that returns at the subsequent instruction.
      Returns:
      the return address, possibly null
    • setReturnLocation

      void setReturnLocation(IEGeneric loc)
      Set the optional return location (address) for the call. Null means a normal call, i.e., the return address is the address that immediately follows the call.
      Parameters:
      loc - the optional return address
    • getCountOfReturns

      int getCountOfReturns()
      Retrieve the number of return values.
      Returns:
    • getReturnExpressions

      List<IEGeneric> getReturnExpressions()
      Retrieve a read-only list of return expressions. In most cases, the list will return 0 or 1 arguments.
      Returns:
    • getReturnExpression

      IEGeneric getReturnExpression(int index)
      Get the Nth return expression of this ECall. This method is safe and will return null if the index is out of bounds.
      Parameters:
      index -
      Returns:
    • setReturnExpression

      void setReturnExpression(int index, IEGeneric exp)
      Update a return expression.
      Parameters:
      index - the index must be valid, i.e. be in the [0, count_returns) range else the method will throw
      exp - non-null IRE
    • getCountOfArguments

      int getCountOfArguments()
      Retrieve the number of arguments.
      Returns:
    • getArguments

      List<IEGeneric> getArguments()
      Retrieve a read-only list of arguments provided to this ECall.
      Returns:
    • getArgument

      IEGeneric getArgument(int index)
      Get the Nth argument of this ECall. This method is safe and will return null if the index is out of bounds.
      Parameters:
      index -
      Returns:
    • getSpoiledExpressions

      List<IEGeneric> getSpoiledExpressions()
      Retrieve a read-only list of expressions spoiled by this ECall.
      Returns:
    • addSpoiledVariables

      void addSpoiledVariables(List<IEVar> spoiledVariables)
      Use only if a dummy/failsafe prototype was set
    • getStackPointerDeltaAfterExecution

      int getStackPointerDeltaAfterExecution()
    • setStackPointerDeltaAfterExecution

      void setStackPointerDeltaAfterExecution(int delta)
      Use only if a dummy/failsafe prototype was set
    • setReturnExpressionUnused

      void setReturnExpressionUnused(boolean enabled)
      Set a hint (for the AST generator) indicating whether the return value of this call, if any, appears to be used by subsequent instructions in the CFG.
      Parameters:
      enabled -
    • isReturnExpressionUnused

      boolean isReturnExpressionUnused()
      Retrieve a hint (for the AST generator) indicating whether the return value of this call, if any, appears to be used by subsequent instructions in the CFG.
      Returns:
    • setMemoryAccessInfo

      void setMemoryAccessInfo(MemoryAccessInfo info)
      Parameters:
      info -
    • getMemoryAccessInfo

      MemoryAccessInfo getMemoryAccessInfo()
      Returns:
    • setNonReturning

      void setNonReturning(Boolean forcedNonReturning)
      Force the value of the internal non-returning flag to a custom value.
      Parameters:
      forcedNonReturning - null to reset to the internal ECall's logic; else, true or false, which may allow some optimizers to perform better
    • getNonReturning

      Boolean getNonReturning()
      Indicate whether the call is non-returning. Typically, a non-returning call is a call terminating the program, or a call performing a long branch to another area of code, without the intention of returning to what would be the 'Normal' call return-address (that is, the subsequent instruction). The value of this flag is normally computed internally, by the ECall itself. If this cannot be determined, the function returns null.
      Returns:
    • setTentativeCall

      void setTentativeCall(boolean enabled)
    • isTentativeCall

      boolean isTentativeCall()
    • setHintArgumentPointsToExternalMemory

      boolean setHintArgumentPointsToExternalMemory(int argIndex, boolean enabled)
    • getHintArgumentPointsToExternalMemory

      boolean getHintArgumentPointsToExternalMemory(int argIndex)