Oberon || Library || Module Index || Search Engine || Definition || Module
(* log levels *) CONST logLoading = 0; CONST logLoadingResult = 1; CONST logCompiling = 2; (* includes 3 and 4 *) CONST logStoring = 5; CONST logChecks = 6; CONST logErrors = 7;
CONST noSrcFound = 0; CONST compilationFailed = 1; CONST loadFailed = 2; CONST refCycle = 3; CONST errors = 4; TYPE ErrorCode = SHORTINT; (* noSrcFound ... *) TYPE ErrorEvent = POINTER TO ErrorEventRec; TYPE ErrorEventRec = RECORD (Events.EventRec) code: ErrorCode; modname: ConstStrings.String; END; VAR error: Events.EventType; VAR errormsg: ARRAY errors OF Events.Message;
PROCEDURE UpToDate(context: Compilers.Context; header: CompilerObjects.Header) : BOOLEAN;
PROCEDURE LoadObject(compiler: Compilers.Compiler; context: Compilers.Context; modname: ConstStrings.String; type: CompilerObjects.ObjectType; arch: Architectures.Architecture; VAR header: CompilerObjects.Header; VAR object: CompilerObjects.Object; errors: RelatedEvents.Object) : BOOLEAN;
PROCEDURE LoadText(compiler: Compilers.Compiler; context: Compilers.Context; modname: ConstStrings.String; type: CompilerObjects.ObjectType; arch: Architectures.Architecture; VAR header: CompilerObjects.Header; VAR text: PersistentTexts.Text; errors: RelatedEvents.Object) : BOOLEAN;
PROCEDURE LoadHeader(compiler: Compilers.Compiler; context: Compilers.Context; modname: ConstStrings.String; type: CompilerObjects.ObjectType; arch: Architectures.Architecture; VAR header: CompilerObjects.Header; errors: RelatedEvents.Object) : BOOLEAN;
Targets are specified by a module name (modname), an object type (CompilerObjects.public or CompilerObjects.private), and the architecture arch which may be NIL for architecture-independent targets.
All compilation results within the database consist of a header and a persistent text (see PersistentTexts). The latter encapsulates a module object that is part of a modularized structure (see ModularizedStructures). The header (of type CompilerObjects.Header) provides meta informations of a compilation result including all its dependencies (see CompilerKeys).
LoadHeader just loads the header of a target, LoadText loads both, the header and the persistent text, and LoadObject works like LoadText but unpacks the encapsulated object out of the persistent text.
UpToDate allows to check whether a target of the database whose header is given is up-to-date.
A log object of type CompilerLogs.Log is part of the context objects. The log allows to follow the recursion of the loading algorithm. The nesting level of the recursion is reflected by the nesting level of the log. The amount of log messages depends on the log levels which are given in ascending order:
Oberon || Library || Module Index || Search Engine || Definition || Module