Package org.jruby.runtime.opto
Class OptoFactory
java.lang.Object
org.jruby.runtime.opto.OptoFactory
A set of factory methods to construct optimizing utilities for compilation,
cache invalidation, and so on.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA factory for abstract "constant" representations of objects.private static classA constant factory that produces MethodHandle constants that drop an initial ThreadContext argument. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final OptoFactory.ConstantFactoryThe constant factory we'll be using for this run. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidprivate static Booleanstatic InvalidatornewConstantInvalidator(Ruby runtime) static final ObjectnewConstantWrapper(Class type, Object object) Create a new "constant" representation for this object, conforming to the given concrete type.static InvalidatornewGlobalInvalidator(int maxFailures) static InvalidatornewMethodInvalidator(RubyModule module)
-
Field Details
-
CONSTANT_FACTORY
The constant factory we'll be using for this run.
-
-
Constructor Details
-
OptoFactory
public OptoFactory()
-
-
Method Details
-
newConstantWrapper
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
-
indyEnabled
-
newGlobalInvalidator
-
newMethodInvalidator
-
disableIndy
private static void disableIndy()
-