Info given for every member found by completion
A do-nothing work scheduler that responds immediately with MissingResponse.
(Since version 2.10.0) SI-6458: Instrumentation logic will be moved out of the compiler.
Asks for a computation to be done quickly on the presentation compiler thread
Sets sync var response
to doc comment information for a given symbol.
Sets sync var response
to doc comment information for a given symbol.
The symbol whose doc comment should be retrieved (might come from a classfile)
The source file that's supposed to contain the definition
The symbol where 'sym' is observed
All symbols that can contribute to the generated documentation together with their source files.
A response that will be set to the following:
If source
contains a definition of a given symbol that has a doc comment,
the (expanded, raw, position) triplet for a comment, otherwise ("", "", NoPosition).
Note: This operation does not automatically load sources that are not yet loaded.
Removes source files and toplevel symbols, and issues a new typer run.
Removes source files and toplevel symbols, and issues a new typer run.
Returns () to syncvar response
on completion.
Asks for a computation to be done on presentation compiler thread, returning a response with the result or an exception
Sets sync var response
to the position of the definition of the given link in
the given sourcefile.
Sets sync var response
to the position of the definition of the given link in
the given sourcefile.
The symbol referenced by the link (might come from a classfile)
The source file that's supposed to contain the definition
A response that will be set to the following:
If source
contains a definition that is referenced by the given link
the position of that definition, otherwise NoPosition.
Note: This operation does not automatically load source
. If source
is unloaded, it stays that way.
If source is not yet loaded, loads it, and starts a new run, otherwise continues with current pass.
If source is not yet loaded, loads it, and starts a new run, otherwise continues with current pass. Waits until source is fully type checked and returns body in response.
The source file that needs to be fully typed.
The response, which is set to the fully attributed tree of source
.
If the unit corresponding to source
has been removed in the meantime
the a NoSuchUnitError is raised in the response.
Set sync var response
to the parse tree of source
with all top-level symbols entered.
Set sync var response
to the parse tree of source
with all top-level symbols entered.
The source file to be analyzed
If set to true
, source file will be kept as a loaded unit afterwards.
If keepLoaded is false
the operation is run at low priority, only after
everything is brought up to date in a regular type checker run.
The response.
Makes sure a set of compilation units is loaded and parsed.
Makes sure a set of compilation units is loaded and parsed.
Returns () to syncvar response
on completion.
Afterwards a new background compiler run is started with
the given sources at the head of the list of to-be-compiled sources.
Cancels current compiler run and start a fresh one where everything will be re-typechecked (but not re-loaded).
Sets sync var response
to list of members that are visible
as members of the scope enclosing pos
.
Tells the compile server to shutdown, and not to restart again
If source if not yet loaded, get an outline view with askParseEntered.
If source if not yet loaded, get an outline view with askParseEntered. If source is loaded, wait for it to be typechecked. In both cases, set response to parsed (and possibly typechecked) tree.
If set to true
, source file will be kept as a loaded unit afterwards.
Asks to do unit corresponding to given source file on present and subsequent type checking passes.
Asks to do unit corresponding to given source file on present and subsequent type checking passes. If the file is in the 'crashedFiles' ignore list it is removed and typechecked normally.
Sets sync var response
to the smallest fully attributed tree that encloses position pos
.
Sets sync var response
to the smallest fully attributed tree that encloses position pos
.
Note: Unlike for most other ask... operations, the source file belonging to pos
needs not be loaded.
Sets sync var response
to list of members that are visible
as members of the tree enclosing pos
, possibly reachable by an implicit.
Returns the smallest context that contains given pos
, throws FatalError if none exists.
Return the compilation unit attached to a source file, or None if source is not loaded.
Locates smallest context that encloses position as an optional value.
Locate smallest tree that encloses position
Run operation op
on a compilation unit associated with given source
.
Run operation op
on a compilation unit associated with given source
.
If source has a loaded compilation unit, this one is passed to op
.
Otherwise a new compilation unit is created, but not added to the set of loaded units.
Returns parse tree for source source
.
Returns parse tree for source source
. No symbols are entered. Syntax errors are reported.
This method is thread-safe and as such can safely run outside of the presentation compiler thread.
Returns the top level classes and objects that were deleted in the editor since last time recentlyDeleted() was called.
Removes the CompilationUnit corresponding to the given SourceFile from consideration for recompilation.
The scheduler by which client and compiler communicate Must be initialized before starting compilerRunner
The scheduler by which client and compiler communicate Must be initialized before starting compilerRunner
(compilerControl: StringAdd).self
(compilerControl: StringFormat).self
(Since version 2.10.2) Use method that accepts fragments
Set sync var response
to a pair consisting of
Set sync var response
to a pair consisting of
The source file to be analyzed
The response.
(Since version 2.10.0) SI-6458: Instrumentation logic will be moved out of the compiler.
(Since version 2.10.0) use parseTree(source) instead
Sets sync var response
to the fully attributed & typechecked tree contained in source
.
Sets sync var response
to the fully attributed & typechecked tree contained in source
.
(Since version 2.10.1) Use askLoadedTyped
instead to avoid race conditions in the typechecker
Deprecated because of race conditions in the typechecker when the background compiler
is interrupted while typing the same source
.
SI-6578
The compilation unit corresponding to a position
The compilation unit corresponding to a position
(Since version 2.10.0) use getUnitOf(pos.source) or onUnitOf(pos.source) instead
The compilation unit corresponding to a source file if it does not yet exist create a new one atomically Note: We want to get roid of this operation as it messes compiler invariants.
The compilation unit corresponding to a source file if it does not yet exist create a new one atomically Note: We want to get roid of this operation as it messes compiler invariants.
(Since version 2.10.0) use getUnitOf(s) or onUnitOf(s) instead
(compilerControl: ArrowAssoc[CompilerControl]).x
(Since version 2.10.0) Use leftOfArrow
instead
(compilerControl: Ensuring[CompilerControl]).x
(Since version 2.10.0) Use resultOfEnsuring
instead
Interface of interactive compiler to a client such as an IDE The model the presentation compiler consists of the following parts:
unitOfFile: The map from sourcefiles to loaded units. A sourcefile/unit is loaded if it occurs in that map.
manipulated by: removeUnitOf, reloadSources.
A call to reloadSources will add the given sources to the loaded units, and start a new background compiler pass to compile all loaded units (with the indicated sources first). Each background compiler pass has its own typer run. The background compiler thread can be interrupted each time an AST node is completely typechecked in the following ways:
Actions under 1-3 can themselves be interrupted if they involve typechecking AST nodes. High-priority actions under 5 cannot; they always run to completion. So these high-priority actions should to be short.
Normally, an interrupted action continues after the interrupting action is finished. However, if the interrupting action created a new typer run, the interrupted action is aborted. If there's an outstanding response, it will be set to a Right value with a FreshRunReq exception.