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 interface
A factory for abstract "constant" representations of objects. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Invalidator
newConstantInvalidator
(Ruby runtime) static final Object
newConstantWrapper
(Class type, Object object) Create a new "constant" representation for this object, conforming to the given concrete type.static Invalidator
newGlobalInvalidator
(int maxFailures) static Invalidator
newMethodInvalidator
(RubyModule module)
-
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
-
newGlobalInvalidator
-
newMethodInvalidator
-