Class NormalValueCompiler

java.lang.Object
org.jruby.ir.targets.simple.NormalValueCompiler
All Implemented Interfaces:
ValueCompiler

public class NormalValueCompiler extends Object implements ValueCompiler
  • Constructor Details

  • Method Details

    • pushRuntime

      public void pushRuntime()
      Description copied from interface: ValueCompiler
      Push the JRuby runtime on the stack. Stack required: none
      Specified by:
      pushRuntime in interface ValueCompiler
    • pushArrayClass

      public void pushArrayClass()
      Description copied from interface: ValueCompiler
      Push the Array class on the stack. Stack required: none
      Specified by:
      pushArrayClass in interface ValueCompiler
    • pushHashClass

      public void pushHashClass()
      Description copied from interface: ValueCompiler
      Push the Hash class on the stack. Stack required: none
      Specified by:
      pushHashClass in interface ValueCompiler
    • pushObjectClass

      public void pushObjectClass()
      Description copied from interface: ValueCompiler
      Push the Object class on the stack. Stack required: none
      Specified by:
      pushObjectClass in interface ValueCompiler
    • pushSymbolClass

      public void pushSymbolClass()
      Specified by:
      pushSymbolClass in interface ValueCompiler
    • pushUndefined

      public void pushUndefined()
      Description copied from interface: ValueCompiler
      Push the UNDEFINED constant on the stack. Stack required: none
      Specified by:
      pushUndefined in interface ValueCompiler
    • pushFixnum

      public void pushFixnum(long l)
      Description copied from interface: ValueCompiler
      Stack required: none
      Specified by:
      pushFixnum in interface ValueCompiler
      Parameters:
      l - long value to push as a Fixnum
    • pushFloat

      public void pushFloat(double d)
      Description copied from interface: ValueCompiler
      Stack required: none
      Specified by:
      pushFloat in interface ValueCompiler
      Parameters:
      d - double value to push as a Float
    • pushString

      public void pushString(ByteList bl, int cr)
      Description copied from interface: ValueCompiler
      Stack required: none
      Specified by:
      pushString in interface ValueCompiler
      Parameters:
      bl - ByteList for the String to push
    • pushChilledString

      public void pushChilledString(ByteList bl, int cr, String file, int line)
      Specified by:
      pushChilledString in interface ValueCompiler
    • pushFrozenString

      public void pushFrozenString(ByteList bl, int cr, String file, int line)
      Description copied from interface: ValueCompiler
      Stack required: none
      Specified by:
      pushFrozenString in interface ValueCompiler
      Parameters:
      bl - ByteList for the String to push
    • pushFrozenString

      public void pushFrozenString(ByteList bl, int cr)
      Description copied from interface: ValueCompiler
      Stack required: none
      Specified by:
      pushFrozenString in interface ValueCompiler
      Parameters:
      bl - ByteList for the String to push
    • pushEmptyString

      public void pushEmptyString(org.jcodings.Encoding encoding)
      Description copied from interface: ValueCompiler
      Push a new empty string on the stack Stack required: none
      Specified by:
      pushEmptyString in interface ValueCompiler
    • pushBufferString

      public void pushBufferString(org.jcodings.Encoding encoding, int size)
      Description copied from interface: ValueCompiler
      Push a new empty string on the stack preallocated to the given size Stack required: none
      Specified by:
      pushBufferString in interface ValueCompiler
    • buildDynamicString

      public void buildDynamicString(org.jcodings.Encoding encoding, int size, boolean frozen, boolean chilled, boolean debugFrozen, String file, int line, List<ValueCompiler.DStringElement> elements)
      Specified by:
      buildDynamicString in interface ValueCompiler
    • pushByteList

      public void pushByteList(ByteList bl)
      Description copied from interface: ValueCompiler
      Stack required: none
      Specified by:
      pushByteList in interface ValueCompiler
      Parameters:
      bl - ByteList to push
    • pushRange

      public void pushRange(Runnable begin, Runnable end, boolean exclusive)
      Description copied from interface: ValueCompiler
      Build and save a literal range.

      Stack required: context

      Specified by:
      pushRange in interface ValueCompiler
      Parameters:
      begin - a runnable that will emit code for the begin value
      end - a runnable that will emit code for the end value
      exclusive - whether this is an exclusive range
    • pushRange

      public void pushRange(long begin, long end, boolean exclusive)
      Description copied from interface: ValueCompiler
      Build and save a literal fixnum..fixnum range.

      Stack required: context

      Specified by:
      pushRange in interface ValueCompiler
      Parameters:
      begin - begin value
      end - end value
      exclusive - whether this is an exclusive range
    • pushEndlessRange

      public void pushEndlessRange(long end, boolean exclusive)
      Description copied from interface: ValueCompiler
      Build and save a literal fixnum.. range.

      Stack required: context

      Specified by:
      pushEndlessRange in interface ValueCompiler
      Parameters:
      end - end value
      exclusive - whether this is an exclusive range
    • pushBeginlessRange

      public void pushBeginlessRange(long begin, boolean exclusive)
      Description copied from interface: ValueCompiler
      Build and save a literal ..fixnum range.

      Stack required: context

      Specified by:
      pushBeginlessRange in interface ValueCompiler
      Parameters:
      begin - begin value
      exclusive - whether this is an exclusive range
    • pushRange

      public void pushRange(ByteList begin, int beginCR, ByteList end, int endCR, boolean exclusive)
      Description copied from interface: ValueCompiler
      Build and save a literal string..string range.

      Stack required: context

      Specified by:
      pushRange in interface ValueCompiler
      Parameters:
      begin - begin value
      end - end value
      exclusive - whether this is an exclusive range
    • pushRegexp

      public void pushRegexp(ByteList source, int options)
      Description copied from interface: ValueCompiler
      Build and save a literal regular expression.

      Stack required: none

      Specified by:
      pushRegexp in interface ValueCompiler
      Parameters:
      options - options for the regexp
    • pushSymbol

      public void pushSymbol(ByteList bytes)
      Description copied from interface: ValueCompiler
      Push a symbol on the stack. Stack required: none
      Specified by:
      pushSymbol in interface ValueCompiler
      Parameters:
      bytes - the ByteList for the symbol
    • pushSymbolProc

      public void pushSymbolProc(ByteList bytes)
      Description copied from interface: ValueCompiler
      Push a Symbol.to_proc on the stack. Stack required: none
      Specified by:
      pushSymbolProc in interface ValueCompiler
      Parameters:
      bytes - the ByteList for the symbol
    • pushRubyEncoding

      public void pushRubyEncoding(org.jcodings.Encoding encoding)
      Description copied from interface: ValueCompiler
      Push a RubyEncoding on the stack. Stack required: none
      Specified by:
      pushRubyEncoding in interface ValueCompiler
      Parameters:
      encoding - the encoding to push
    • pushEncoding

      public void pushEncoding(org.jcodings.Encoding encoding)
      Description copied from interface: ValueCompiler
      Push an encoding on the stack. Stack required: none
      Specified by:
      pushEncoding in interface ValueCompiler
      Parameters:
      encoding - the encoding to push
    • pushNil

      public void pushNil()
      Description copied from interface: ValueCompiler
      Load nil onto the stack. Stack required: none
      Specified by:
      pushNil in interface ValueCompiler
    • pushBoolean

      public void pushBoolean(boolean b)
      Description copied from interface: ValueCompiler
      Load a boolean onto the stack. Stack required: none
      Specified by:
      pushBoolean in interface ValueCompiler
      Parameters:
      b - the boolean to push
    • pushBignum

      public void pushBignum(BigInteger bigint)
      Description copied from interface: ValueCompiler
      Load a Bignum onto the stack. Stack required: none
      Specified by:
      pushBignum in interface ValueCompiler
      Parameters:
      bigint - the value of the Bignum to push
    • pushCallSite

      public void pushCallSite(String className, String siteName, String scopeFieldName, CallBase call)
      Description copied from interface: ValueCompiler
      Load a CallSite onto the stack
      Specified by:
      pushCallSite in interface ValueCompiler
    • pushConstantLookupSite

      public void pushConstantLookupSite(String className, String siteName, ByteList name)
      Description copied from interface: ValueCompiler
      Load a ConstantLookupSite onto the stack
      Specified by:
      pushConstantLookupSite in interface ValueCompiler
    • cacheValuePermanentlyLoadContext

      public String cacheValuePermanentlyLoadContext(String what, Class type, Object key, Runnable construction)
    • cacheValuePermanently

      public String cacheValuePermanently(String what, Class type, Object key, boolean sync, Runnable construction)
    • cacheValuePermanently

      public String cacheValuePermanently(String what, Class type, Object key, boolean sync, MethodType signature, Runnable loadState, Runnable construction)
    • pushFixnumArray

      public void pushFixnumArray(List<Long> values)
      Specified by:
      pushFixnumArray in interface ValueCompiler
    • pushFloatArray

      public void pushFloatArray(List<Double> values)
      Specified by:
      pushFloatArray in interface ValueCompiler