Class _BaseCompiler[in Compiler]

Abstract base class for the Compiler and ICompiler classes.

class _BaseCompiler

more...

Summary

alwaysRecompIf true, a load method finding a valid
compileInMemoryIf true (the default) intermediate compilation steps are performed in memory
ignoreSourcesIf true, sources are ignored, and only
languageLanguage code used to load language-specific string tables
launchOnLinkIf true, the __main__ function (that is, the entry point) of the loaded modules is executed before returning it
pathThe search path for modules loaded by name
saveMandatoryIf true, when saveModule option is true too and a module can't be serialized, the compiler raises an exception
saveModulesIf true, once compiled a source that is located on a local file system, the compiler will also try to save the
sourceEncodingThe encoding of the source file
addFalconPath()Adds the default system paths to the path searched by this compiler.
setDirective()Compiles a script on the fly.

Detailed description

Abstract base class for the Compiler and ICompiler classes.

This base class is used to put some common properties at disposal of both the subclasses: the standard Compiler, and the ICompiler(Incremental Compiler) that allows live evaluation in a protected children virtual machine.

Properties

alwaysRecomp

If true, a load method finding a valid

compileInMemory

If true (the default) intermediate compilation steps are performed in memory

ignoreSources

If true, sources are ignored, and only

language

Language code used to load language-specific string tables

launchOnLink

If true, the __main__ function (that is, the entry point) of the loaded modules is executed before returning it

path

The search path for modules loaded by name

saveMandatory

If true, when saveModule option is true too and a module can't be serialized, the compiler raises an exception

saveModules

If true, once compiled a source that is located on a local file system, the compiler will also try to save the

sourceEncoding

The encoding of the source file

Methods

addFalconPath()

Adds the default system paths to the path searched by this compiler.

_BaseCompiler.addFalconPath( )

This method instructs the compiler that the default search path used by Falcon engine should be also searched when loading modules. This means that the directory in which official Falcon modules are stored, or those set in the FALCON_LOAD_PATH environment variables, or compiled in for a particular installation of Falcon, will be searched whenever loading a module.

The paths are inserted at the beginning; so, they will be the first searched. It is possible then to alter the search path by changing the Compiler.path property and i.e. prepending a desired local search path to it.

setDirective()

Compiles a script on the fly.

_BaseCompiler.setDirective( dt, value )

dtDirective to be set.
valueValue to be given to the directive.
Returns: On success, a Module instance that contains the loaded module.
Raises:
SyntaxErrorif the module contains logical srror.
IoErrorif the input data is a file stream and there have been a read failure.

Sets a directive as if the scripts that will be loaded by this compiler defined it through the directive statement. Scripts can always override a directive by setting it to a different value in their code; notice also that compilation directives are useful only if a compilation actually take places. In case a .fam or a binary module is loaded, they have no effect.


Made with faldoc 2.1.0