Class OptoFactory

java.lang.Object
org.jruby.runtime.opto.OptoFactory

public class OptoFactory extends Object
A set of factory methods to construct optimizing utilities for compilation, cache invalidation, and so on.
  • Field Details

    • CONSTANT_FACTORY

      private static final OptoFactory.ConstantFactory CONSTANT_FACTORY
      The constant factory we'll be using for this run.
  • Constructor Details

    • OptoFactory

      public OptoFactory()
  • Method Details

    • newConstantWrapper

      public static final Object newConstantWrapper(Class type, Object object)
      Create a new "constant" representation for this object, conforming to the given concrete type. This is currently only used by invokedynamic to cache "constant" method handle wrappers for common literal fixnums and symbols.
      Parameters:
      type - the class to which the constant should conform
      Returns:
      a "constant" representation of this object appropriate to the current JVM and runtime modes
    • newConstantInvalidator

      public static Invalidator newConstantInvalidator(Ruby runtime)
    • indyEnabled

      private static Boolean indyEnabled()
    • newGlobalInvalidator

      public static Invalidator newGlobalInvalidator(int maxFailures)
    • newMethodInvalidator

      public static Invalidator newMethodInvalidator(RubyModule module)
    • disableIndy

      private static void disableIndy()