Package org.jruby.compiler
Interface Compilable<T>
- Type Parameters:
T- result value to compile
- All Known Implementing Classes:
CompiledIRMethod,DefineMethodMethod,InterpretedIRBlockBody,InterpretedIRBodyMethod,InterpretedIRMethod,MixedModeIRBlockBody,MixedModeIRMethod
public interface Compilable<T>
Blocks and methods both share same full build mechanism so they implement this to be buildable.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidcompleteBuild(ThreadContext context, T buildResult) default voidcompleteBuild(T buildResult) Deprecated.default booleanforceBuild(ThreadContext context) Force this Compilable to finish its build process.default StringgetClassName(ThreadContext context) Deprecated.getFile()intgetLine()getName()default StringDeprecated.default StringgetOwnerName(ThreadContext context) default booleanIndicates whether this Compilable has completed its build process.static StringresolveFullName(ThreadContext context, RubyModule implementationClass) Resolve the fully qualified name.voidsetCallCount(int count)
-
Method Details
-
setCallCount
void setCallCount(int count) -
completeBuild
Deprecated. -
completeBuild
-
forceBuild
Force this Compilable to finish its build process. Override this andisBuildComplete()for implementations that have a build process.- Parameters:
context- the current thread context- Returns:
- true if the forced build completed; false otherwise
-
isBuildComplete
default boolean isBuildComplete()Indicates whether this Compilable has completed its build process. Override this andforceBuild(ThreadContext)for implementations that have a build process.- Returns:
- true if the build has completed; false otherwise.
-
getIRScope
IRScope getIRScope() -
ensureInstrsReady
InterpreterContext ensureInstrsReady() -
getOwnerName
Deprecated.Return the owning module/class name.- Returns:
- method/block owner's name
-
getOwnerName
-
getName
String getName()- Returns:
- method/closure identifier
-
getFile
String getFile()- Returns:
- method/block source file
-
getLine
int getLine()- Returns:
- method/block source file line
-
getImplementationClass
RubyModule getImplementationClass() -
getClassName
Deprecated. -
resolveFullName
Resolve the fully qualified name.- Parameters:
implementationClass-- Returns:
- class/module name e.g. Foo::Bar::Baz
-