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 void
completeBuild
(ThreadContext context, T buildResult) default void
completeBuild
(T buildResult) Deprecated.default boolean
forceBuild
(ThreadContext context) Force this Compilable to finish its build process.default String
getClassName
(ThreadContext context) Deprecated.getFile()
int
getLine()
getName()
default String
Deprecated.default String
getOwnerName
(ThreadContext context) default boolean
Indicates whether this Compilable has completed its build process.static String
resolveFullName
(ThreadContext context, RubyModule implementationClass) Resolve the fully qualified name.void
setCallCount
(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
-