enso/engine
Jaroslav Tulach 096d8fdca0
Avoid crashing the engine when JS debugger statement is used (#3547)
Try following enso program:
```
main =
here.debug

foreign js debug = """
debugger;

```
it crashes the engine with exception:
```
Execution finished with an error: java.lang.ClassCastException: class com.oracle.truffle.js.runtime.builtins.JSFunctionObject$Unbound cannot be cast to class org.enso.interpreter.runtime.callable.CallerInfo (com.oracle.truffle.js.runtime.builtins.JSFunctionObject$Unbound and org.enso.interpreter.runtime.callable.CallerInfo are in unnamed module of loader com.oracle.graalvm.locator.GraalVMLocator$GuestLangToolsLoader @55cb6996)
at <java> org.enso.interpreter.runtime.callable.function.Function$ArgumentsHelper.getCallerInfo(Function.java:352)
at <java> org.enso.interpreter.instrument.ReplDebuggerInstrument$ReplExecutionEventNodeImpl.onEnter(ReplDebuggerInstrument.java:179)
at <java> org.graalvm.truffle/com.oracle.truffle.api.instrumentation.ProbeNode$EventProviderChainNode.innerOnEnter(ProbeNode.java:1397)
at <java> org.graalvm.truffle/com.oracle.truffle.api.instrumentation.ProbeNode$EventChainNode.onEnter(ProbeNode.java:912)
at <java> org.graalvm.truffle/com.oracle.truffle.api.instrumentation.ProbeNode.onEnter(ProbeNode.java:216)
at <java> com.oracle.truffle.js.nodes.JavaScriptNodeWrapper.execute(JavaScriptNodeWrapper.java:44)
at <java> com.oracle.truffle.js.nodes.control.DiscardResultNode.execute(DiscardResultNode.java:88)
at <java> com.oracle.truffle.js.nodes.function.FunctionBodyNode.execute(FunctionBodyNode.java:73)
at <java> com.oracle.truffle.js.nodes.JavaScriptNodeWrapper.execute(JavaScriptNodeWrapper.java:45)
at <java> com.oracle.truffle.js.nodes.function.FunctionRootNode.executeInRealm(FunctionRootNode.java:150)
at <java> com.oracle.truffle.js.runtime.JavaScriptRealmBoundaryRootNode.execute(JavaScriptRealmBoundaryRootNode.java:93)
at <js> <js> poly_enso_eval(Unknown)
at <epb> <epb> null(Unknown)
at <enso> Prg.debug(Prg.enso:27-28)
```
2022-06-25 05:58:24 +00:00
..
language-server Implement execute parameter of applyEdit command (#3541) 2022-06-23 15:33:45 +00:00
launcher/src Update profiling CLI arguments (#3461) 2022-05-24 16:01:26 +03:00
polyglot-api/src Implement execute parameter of applyEdit command (#3541) 2022-06-23 15:33:45 +00:00
runner Fail bin/enso --run when there is an error in the script (#3544) 2022-06-23 11:16:20 +00:00
runtime Fix System.nanoTime definition (#3543) 2022-06-24 10:46:31 +00:00
runtime-instrument-id-execution/src/main/java/org/enso/interpreter/instrument Single (+patchable) LiteralNode (#3536) 2022-06-21 09:42:23 +00:00
runtime-instrument-repl-debugger/src/main/java/org/enso/interpreter/instrument Avoid crashing the engine when JS debugger statement is used (#3547) 2022-06-25 05:58:24 +00:00
runtime-instrument-runtime-server/src/main/java/org/enso/interpreter/instrument Register instruments/language in their own compilation units to fix the sbt build issues (#3509) 2022-06-13 14:09:08 +00:00
runtime-language-epb/src/main/java/org/enso/interpreter/epb Register instruments/language in their own compilation units to fix the sbt build issues (#3509) 2022-06-13 14:09:08 +00:00
runtime-with-instruments/src/test Implement execute parameter of applyEdit command (#3541) 2022-06-23 15:33:45 +00:00
README.md Add a markdown style guide (#1022) 2020-07-21 13:59:40 +01:00

The Enso Engine

The Enso engine is the codebase responsible for compiling and executing Enso code, as well as providing language server functionality to users of the language. It is subdivided into two major components:

  • Language Server: The Enso language service.
  • Polyglot API: The truffle-boundary safe API for communication between the language server and the runtime.
  • Runner: The command-line interface for Enso.
  • Runtime: The compiler and interpreter for Enso.