|
![]() Quark Platform Documentation Version 1.7.0_0 Business Objects |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openquark.cal.compiler.Packager
public abstract class Packager
Warning- this class should only be used by the CAL compiler implementation. It is not part of the external API of the CAL platform.
The Packager currently is used to instrument analysis phases that occur after the compiler generates Expression values for the core functions in a module. This includes applying the global CAL optimizer, anti-alias transformations (and other optimizations done in the ExpressionAnalyzer, such as simple inlining of a few well known functions). Its end output can be used by the machines for code generation.
| Nested Class Summary | |
|---|---|
static class |
Packager.PackagerException
Exception raised on a packaging error |
| Field Summary | |
|---|---|
static String |
OPTIMIZER_LEVEL
|
| Constructor Summary | |
|---|---|
Packager(org.openquark.cal.machine.Program program,
org.openquark.cal.machine.CodeGenerator cg)
Construct a RunPackager which packages directly to a Program then executes it. |
|
| Method Summary | |
|---|---|
void |
abort(CompilerMessageLogger logger)
Abort this package. |
void |
addStatusListener(StatusListener listener)
|
void |
close(CompilerMessageLogger logger)
Close the package. |
org.openquark.cal.machine.Module |
getCurrentModule()
Return the current module. |
abstract org.openquark.cal.machine.MachineFunction |
getMachineFunction(CoreFunction coreFunction)
|
ModuleTypeInfo |
getModuleTypeInfo(ModuleName moduleName)
Gets the ModuleTypeInfo for modules that have already been wrapped by the Packager. |
static int |
getOptimizerLevel()
|
org.openquark.cal.machine.Program |
getProgram()
Return the compiled program object. |
Set<StatusListener> |
getStatusListeners()
|
void |
initAdjunct(ModuleName adjunctModuleName)
Initialize packaging of the current adjunct. |
void |
newModule(ModuleName name,
ClassLoader foreignClassLoader)
Create a new module object into which future 'stores' will place program objects. |
void |
removeStatusListener(StatusListener listener)
|
void |
setModuleIncrement(double d)
|
void |
store(CoreFunction coreFunction)
Store this core function in the package into the current module. |
void |
switchModule(ModuleName name)
Switches the current module to be the specified module. |
void |
useOptimizer()
The packager will load the optimizer so that for all modules subsequently compiled the optimizer will be run. |
void |
wrapAdjunct(CompilerMessageLogger logger)
Wrap the current adjunct: do any cleanup processing on the entire packaged contents. |
void |
wrapModule(CompilerMessageLogger logger)
Wrap the current module: do any cleanup processing on the entire packaged contents. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String OPTIMIZER_LEVEL
| Constructor Detail |
|---|
public Packager(org.openquark.cal.machine.Program program,
org.openquark.cal.machine.CodeGenerator cg)
program - Program.| Method Detail |
|---|
public void abort(CompilerMessageLogger logger)
logger - the logger to use for logging error messages.
public void close(CompilerMessageLogger logger)
throws Packager.PackagerException
logger - the logger to use for logging error messages.
Packager.PackagerExceptionpublic ModuleTypeInfo getModuleTypeInfo(ModuleName moduleName)
moduleName -
public void newModule(ModuleName name,
ClassLoader foreignClassLoader)
throws Packager.PackagerException
foreignClassLoader - the classloader to use to resolve foreign classes for the module.
Packager.PackagerException
public void store(CoreFunction coreFunction)
throws Packager.PackagerException
coreFunction - - the function to be stored
Packager.PackagerExceptionpublic abstract org.openquark.cal.machine.MachineFunction getMachineFunction(CoreFunction coreFunction)
coreFunction - a machine-independent representation of the function.
public void switchModule(ModuleName name)
throws Packager.PackagerException
name - the name of the module to switch to
Packager.PackagerExceptionpublic org.openquark.cal.machine.Program getProgram()
public void useOptimizer()
public org.openquark.cal.machine.Module getCurrentModule()
public Set<StatusListener> getStatusListeners()
public void addStatusListener(StatusListener listener)
public void removeStatusListener(StatusListener listener)
public void setModuleIncrement(double d)
public void wrapModule(CompilerMessageLogger logger)
throws Packager.PackagerException,
UnableToResolveForeignEntityException
logger -
Packager.PackagerException
UnableToResolveForeignEntityException
public void initAdjunct(ModuleName adjunctModuleName)
throws Packager.PackagerException
adjunctModuleName -
Packager.PackagerException
public void wrapAdjunct(CompilerMessageLogger logger)
throws Packager.PackagerException,
UnableToResolveForeignEntityException
logger -
Packager.PackagerException
UnableToResolveForeignEntityExceptionpublic static int getOptimizerLevel()
|
![]() Quark Platform Documentation Version 1.7.0_0 Business Objects |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||