enso/engine
Jaroslav Tulach 4465d63dd8
Improved polyglot Date support (#3559)
Significantly improves the polyglot Date support (as introduced by #3374). It enhances the `Date_Spec` to run it in four flavors:
- with Enso Date (as of now)
- with JavaScript Date
- with JavaScript Date wrapped in (JavaScript) array
- with Java LocalDate allocated directly

The code is then improved by necessary modifications to make the `Date_Spec` pass.

# Important Notes
James has requested in [#181755990](https://www.pivotaltracker.com/n/projects/2539304/stories/181755990) - e.g. _Review and improve InMemory Table support for Dates, Times, DateTimes, BigIntegers_ the following program to work:
```
foreign js dateArr = """
return [1, new Date(), 7]

main =
IO.println <| (dateArr.at 1).week_of_year
```
the program works with here in provided changes and prints `27` as of today.

@jdunkerley has provided tests for proper behavior of date in `Table` and `Column`. Those tests are working as of [f16d07e](f16d07e640). One just needs to accept `List<Value>` and then query `Value` for `isDate()` when needed.

Last round of changes is related to **exception handling**. 8b686b12bd makes sure `makePolyglotError` accepts only polyglot values. Then it wraps plain Java exceptions into `WrapPlainException` with `has_type` method - 60da5e70ed - the remaining changes in the PR are only trying to get all tests working in the new setup.

The support for `Time` isn't part of this PR yet.
2022-07-21 06:32:40 +00:00
..
language-server Add command for changing expression value (#3562) 2022-07-13 15:59:47 +00:00
launcher/src Update profiling CLI arguments (#3461) 2022-05-24 16:01:26 +03:00
polyglot-api/src Add command for changing expression value (#3562) 2022-07-13 15:59:47 +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 Improved polyglot Date support (#3559) 2022-07-21 06:32:40 +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 Improved polyglot Date support (#3559) 2022-07-21 06:32:40 +00:00
runtime-with-instruments/src/test Add command for changing expression value (#3562) 2022-07-13 15:59:47 +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.