mirror of
https://github.com/enso-org/enso.git
synced 2024-09-11 21:27:15 +03:00
Fix source locations in Enso files (#1208)
This commit is contained in:
parent
05f4cc2e7c
commit
2783d5e706
@ -238,7 +238,7 @@ public class Module implements TruffleObject {
|
||||
if (source == null) return;
|
||||
scope.reset();
|
||||
compilationStage = CompilationStage.INITIAL;
|
||||
context.getCompiler().run(source, this);
|
||||
context.getCompiler().run(this);
|
||||
}
|
||||
|
||||
/** @return IR defined by this module. */
|
||||
|
@ -44,12 +44,11 @@ class Compiler(val context: Context) {
|
||||
* Processes the provided language sources, registering any bindings in the
|
||||
* given scope.
|
||||
*
|
||||
* @param source the source code to be processed
|
||||
* @param module the scope into which new bindings are registered
|
||||
* @return an interpreter node whose execution corresponds to the top-level
|
||||
* executable functionality in the module corresponding to `source`.
|
||||
*/
|
||||
def run(source: Source, module: Module): Unit = {
|
||||
def run(module: Module): Unit = {
|
||||
parseModule(module)
|
||||
val importedModules = importResolver.mapImports(module)
|
||||
val requiredModules =
|
||||
@ -94,7 +93,7 @@ class Compiler(val context: Context) {
|
||||
Module.CompilationStage.AFTER_CODEGEN
|
||||
)
|
||||
) {
|
||||
truffleCodegen(module.getIr, source, module.getScope)
|
||||
truffleCodegen(module.getIr, module.getSource, module.getScope)
|
||||
module.unsafeSetCompilationStage(Module.CompilationStage.AFTER_CODEGEN)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user