Class NormalInvocationCompiler

java.lang.Object
org.jruby.ir.targets.simple.NormalInvocationCompiler
All Implemented Interfaces:
InvocationCompiler

public class NormalInvocationCompiler extends Object implements InvocationCompiler
  • Field Details

    • SUPER_SPLAT_UNRESOLVED

      public static final String SUPER_SPLAT_UNRESOLVED
    • SUPER_NOSPLAT_UNRESOLVED

      public static final String SUPER_NOSPLAT_UNRESOLVED
    • SUPER_SPLAT_RESOLVED

      public static final String SUPER_SPLAT_RESOLVED
    • SUPER_NOSPLAT_RESOLVED

      public static final String SUPER_NOSPLAT_RESOLVED
  • Constructor Details

    • NormalInvocationCompiler

      public NormalInvocationCompiler(IRBytecodeAdapter compiler)
  • Method Details

    • invokeOther

      public void invokeOther(String file, String scopeFieldName, CallBase call, int arity)
      Description copied from interface: InvocationCompiler
      Invoke a method on an object other than self.

      Stack required: context, self, all arguments, optional block

      Specified by:
      invokeOther in interface InvocationCompiler
      Parameters:
      call - the call to be invoked
    • invokeArrayDeref

      public void invokeArrayDeref(String file, String scopeFieldName, CallBase call)
      Description copied from interface: InvocationCompiler
      Invoke the array dereferencing method ([]) on an object other than self.

      If this invokes against a Hash with a frozen string, it will follow an optimized path.

      Stack required: context, self, target, arg0

      Specified by:
      invokeArrayDeref in interface InvocationCompiler
      Parameters:
      file -
    • invoke

      public void invoke(String file, int lineNumber, String scopeFieldName, CallBase call, int arity)
    • invokeOtherOneFixnum

      public void invokeOtherOneFixnum(String file, CallBase call, long fixnum)
      Description copied from interface: InvocationCompiler
      Invoke a fixnum-receiving method on an object other than self.

      Stack required: context, self, receiver (fixnum will be handled separately)

      Specified by:
      invokeOtherOneFixnum in interface InvocationCompiler
    • invokeOtherOneFloat

      public void invokeOtherOneFloat(String file, CallBase call, double flote)
      Description copied from interface: InvocationCompiler
      Invoke a float-receiving method on an object other than self.

      Stack required: context, self, receiver (float will be handled separately)

      Specified by:
      invokeOtherOneFloat in interface InvocationCompiler
    • invokeSelf

      public void invokeSelf(String file, String scopeFieldName, CallBase call, int arity)
      Description copied from interface: InvocationCompiler
      Invoke a method on self. Stack required: context, caller, self, all arguments, optional block
      Specified by:
      invokeSelf in interface InvocationCompiler
      Parameters:
      file - the filename of the script making this call
      call - to be invoked on self
      arity - of the call.
    • invokeInstanceSuper

      public void invokeInstanceSuper(String file, String name, int arity, boolean hasClosure, boolean literalClosure, boolean[] splatmap, int flags)
      Description copied from interface: InvocationCompiler
      Invoke a superclass method from an instance context.

      Stack required: context, caller, self, start class, arguments[, block]

      Specified by:
      invokeInstanceSuper in interface InvocationCompiler
      Parameters:
      file - the filename of the script making this call
      name - name of the method to invoke
      arity - arity of the arguments on the stack
      hasClosure - whether a block is passed
      literalClosure - whether the block passed is a literal closure
      splatmap - a map of arguments to be splatted back into arg list
      flags -
    • invokeClassSuper

      public void invokeClassSuper(String file, String name, int arity, boolean hasClosure, boolean literalClosure, boolean[] splatmap, int flags)
      Description copied from interface: InvocationCompiler
      Invoke a superclass method from a class context.

      Stack required: context, caller, self, start class, arguments[, block]

      Specified by:
      invokeClassSuper in interface InvocationCompiler
      Parameters:
      file - the filename of the script making this call
      name - name of the method to invoke
      arity - arity of the arguments on the stack
      hasClosure - whether a block is passed
      literalClosure - whether the block passed is a literal closure
      splatmap - a map of arguments to be splatted back into arg list
      flags -
    • invokeUnresolvedSuper

      public void invokeUnresolvedSuper(String file, String name, int arity, boolean hasClosure, boolean literalClosure, boolean[] splatmap, int flags)
      Description copied from interface: InvocationCompiler
      Invoke a superclass method from an unresolved context.

      Stack required: context, caller, self, arguments[, block]

      Specified by:
      invokeUnresolvedSuper in interface InvocationCompiler
      Parameters:
      file - the filename of the script making this call
      name - name of the method to invoke
      arity - arity of the arguments on the stack
      hasClosure - whether a block is passed
      literalClosure - whether the block passed is a literal closure
      splatmap - a map of arguments to be splatted back into arg list
      flags -
    • invokeZSuper

      public void invokeZSuper(String file, String name, int arity, boolean hasClosure, boolean[] splatmap, int flags)
      Description copied from interface: InvocationCompiler
      Invoke a superclass method from a zsuper in a block.

      Stack required: context, caller, self, arguments[, block]

      Specified by:
      invokeZSuper in interface InvocationCompiler
      Parameters:
      file - the filename of the script making this call
      name - name of the method to invoke
      arity - arity of the arguments on the stack
      hasClosure - whether a block is passed
      splatmap - a map of arguments to be splatted back into arg list
      flags -
    • invokeEQQ

      public void invokeEQQ(EQQInstr call)
      Description copied from interface: InvocationCompiler
      Perform a === call appropriate for a case/when statement. Stack required: context, case value, when value
      Specified by:
      invokeEQQ in interface InvocationCompiler
    • asString

      public void asString(AsStringInstr call, String scopeFieldName, String file)
      Description copied from interface: InvocationCompiler
      Coerces the receiver to a String using to_s, unless it is already a String Stack required: context, caller, receiver
      Specified by:
      asString in interface InvocationCompiler
    • setCallInfo

      public void setCallInfo(int flags)
      Description copied from interface: InvocationCompiler
      Sets the current callInfo, when it cannot be passed other ways Stack required: none
      Specified by:
      setCallInfo in interface InvocationCompiler
    • invokeBlockGiven

      public void invokeBlockGiven(String methodName, String file)
      Description copied from interface: InvocationCompiler
      Invoke block_given? or iterator? with awareness of any built-in methods.
      Specified by:
      invokeBlockGiven in interface InvocationCompiler
    • invokeFrameName

      public void invokeFrameName(String methodName, String file)
      Description copied from interface: InvocationCompiler
      Invoke __method__ or __callee__ with awareness of any built-in methods.
      Specified by:
      invokeFrameName in interface InvocationCompiler