public interface TruffleCompiler
CompilableTruffleAST
to machine code.Modifier and Type | Field and Description |
---|---|
static String |
FIRST_TIER_COMPILATION_SUFFIX |
static int |
FIRST_TIER_INDEX |
static int |
LAST_TIER_INDEX |
static String |
SECOND_TIER_COMPILATION_SUFFIX |
Modifier and Type | Method and Description |
---|---|
void |
doCompile(TruffleDebugContext debug,
TruffleCompilation compilation,
Map<String,Object> options,
TruffleCompilationTask task,
TruffleCompilerListener listener)
Compiles
compilable to machine code. |
String |
getCompilerConfigurationName()
Returns a unique name for the configuration in use by this compiler.
|
void |
initialize(Map<String,Object> options,
CompilableTruffleAST compilation,
boolean firstInitialization)
Initializes the compiler before the first compilation.
|
TruffleCompilation |
openCompilation(CompilableTruffleAST compilable)
Opens a new compilation for
compilable . |
TruffleDebugContext |
openDebugContext(Map<String,Object> options,
TruffleCompilation compilation)
Opens a debug context for Truffle compilation.
|
void |
shutdown()
Notifies this object that it will no longer being used and should thus perform all relevant
finalization tasks.
|
static final String FIRST_TIER_COMPILATION_SUFFIX
static final String SECOND_TIER_COMPILATION_SUFFIX
static final int FIRST_TIER_INDEX
static final int LAST_TIER_INDEX
void initialize(Map<String,Object> options, CompilableTruffleAST compilation, boolean firstInitialization)
options
- the options for initializationcompilation
- the Truffle AST that triggered the initializationfirstInitialization
- first initialization. For a multi-isolate compiler the
firstInitialization
must be true
for an initialization in the
first isolate and false
for an initialization in the following isolates.TruffleCompilation openCompilation(CompilableTruffleAST compilable)
compilable
. Each call results in a new compilation
object. The returned compilation object may be associated with external resources which are
only released by calling close
.compilable
- the Truffle AST to be compiledTruffleDebugContext openDebugContext(Map<String,Object> options, TruffleCompilation compilation)
close()
method should be called on
the returned object once the compilation is finished.options
- the options for the debug contextcompilation
- a compilation object created by
openCompilation
to be used for a single compilation or null
if the
returned context will be used for multiple Truffle compilationsTruffleDebugContext
void doCompile(TruffleDebugContext debug, TruffleCompilation compilation, Map<String,Object> options, TruffleCompilationTask task, TruffleCompilerListener listener)
compilable
to machine code.debug
- a debug context to usecompilation
- a compilation object created by
openCompilation
to be used for the compilationoptions
- option values relevant to compilationtask
- an object that holds information about the compilation process itself (e.g. which
tier, was the compilation canceled)listener
- a listener receiving events about compilation success or failureString getCompilerConfigurationName()
void shutdown()