Commit Graph

27 Commits

Author SHA1 Message Date
Jaroslav Tulach
ba19813511
Speeding up "hello world" example by 16% 2023-11-19 16:38:31 +01:00
Paweł Grabarz
42a7cb2d23
[Gui2] Opening projects and language server connection (#7813)
# Important Notes
- Binary LS endpoint is not yet handled.
- The parsing of provided source is not entirely correct, as each line (including imports) is treated as node. The usage of actual enso AST for nodes is not yet implemented.
- Modifications to the graph state are not yet synchronized back to the language server.
2023-09-22 03:43:25 +00:00
Hubert Plociniczak
24f263b20b
Towards shallow nesting in IR (#7681)
Refactoring deeply nested IR classes to shallow nesting.
Fixes #7017

# Important Notes
It's a big PR but fairly consistent. Split multiple hierarchy levels into subpackages.
2023-08-31 15:42:53 +00:00
Dmitry Bushev
b97fc39214
Remove SQL versions repo (#6242)
close #6232

Changelog:
- remove: `SqlVersionsRepo`
- update: `SuggestionsDatabaseModuleUpdateNotification` message removing the version
- update: cleanup versions repo usages in the language server
2023-04-11 19:22:30 +00:00
Hubert Plociniczak
6769ab0ee7
Downgrade hashing to SHA-1 and other optimizations (#5791)
This change downgrades hashing algorithm used in caching IR and library bindings to SHA-1. It is sufficient and significantly faster for the purpose of simple checksum we use it for.

Additionally, don't calculate the digest for serialized bytes - if we get the expected object type then we are confident about the integrity.

Don't initialize Jackson's ObjectMapper for every metadata serialization/de-serialization. Initialization is very costly.

Avoid unnecessary conversions between Scala and Java. Those back-and-forth `asScala` and `asJava` are pretty expensive.

Finally fix an SBT warning when generating library cache.

Closes https://github.com/enso-org/enso/issues/5763

# Important Notes
The change cuts roughly 0.8-1s from the overall startup.
This change will certainly lead to invalidation of existing caches. It is advised to simply start with a clean slate.
2023-03-09 07:36:59 +00:00
Hubert Plociniczak
941512e0ba
Optimize import/export resolution (#5700)
This change adds serialization and deserialization of library bindings.
In order to be functional, one needs to first generate IR and
serialize bindings using `--compiled <path-to-library>` command. The bindings
will be stored under the library with `.bindings` suffix.
Bindings are being generated during `buildEngineDistribution` task, thus not
requiring any extra steps.

When resolving import/exports the compiler will first try to load
module's bindings from cache. If successful, it will not schedule its
imports/exports for immediate compilation, as we always did, but use the
bindings info to infer the dependent modules.

The current change does not make any optimizations when it comes to
compiling the modules, yet. It only delays the actual
compilation/loading IR from cache so that it can be done in bulk.
Further optimizations will come from this opportunity such as parallel
loading of caches or lazily inferring only the necessary modules.

Part of https://github.com/enso-org/enso/issues/5568 work.
2023-03-01 08:53:29 +00:00
Hubert Plociniczak
a04425576a
Force recompilation if imported module has changed (#3703)
IR cache never really took into account a situation when a binding from the imported module has changed. In other words, it would continue to happily use the serialized metadata without noticing that it changed.

This change forces cache invalidation when any of the imported modules was invalidated (or rather not loaded from cache).

# Important Notes
Added simple test infrastructure that simulates file modifications that would trigger the initial cache invalidation.
If they succeed, cache invalidation is propagated thus causing an error.
2022-09-15 13:41:58 +00:00
Hubert Plociniczak
96e50648dd
Remove 'here' and make method name resolution case-sensitive (#3538)
Modified UppercaseNames to now resolve methods without an explicit `here` to point to the current module.
`here` was also often used instead of `self` which was allowed by the compiler.
Therefore UppercaseNames pass is now GlobalNames and does some extra work -
it translated method calls without an explicit target into proper applications.

# Important Notes
There was a long-standing bug in scopes usage when compiling standalone expressions.
This resulted in AliasAnalysis generating incorrect graphs and manifested itself only in unit tests
and when running `eval`, thus being a bit hard to locate.
See `runExpression` for details.

Additionally, method name resolution is now case-sensitive.

Obsolete passes like UndefinedVariables and ModuleThisToHere were removed. All tests have been adapted.
2022-07-07 10:31:06 +00:00
Jaroslav Tulach
dc30e44b60
Register instruments/language in their own compilation units to fix the sbt build issues (#3509)
New plan to [fix the `sbt` build](https://www.pivotaltracker.com/n/projects/2539304/stories/182209126) and its annoying:
```
log.error(
"Truffle Instrumentation is not up to date, " +
"which will lead to runtime errors\n" +
"Fixes have been applied to ensure consistent Instrumentation state, " +
"but compilation has to be triggered again.\n" +
"Please re-run the previous command.\n" +
"(If this for some reason fails, " +
s"please do a clean build of the $projectName project)"
)
```
When it is hard to fix `sbt` incremental compilation, let's restructure our project sources so that each `@TruffleInstrument` and `@TruffleLanguage` registration is in individual compilation unit. Each such unit is either going to be compiled or not going to be compiled as a batch - that will eliminate the `sbt` incremental compilation issues without addressing them in `sbt` itself.

fa2cf6a33ec4a5b2e3370e1b22c2b5f712286a75 is the first step - it introduces `IdExecutionService` and moves all the `IdExecutionInstrument` API up to that interface. The rest of the `runtime` project then depends only on `IdExecutionService`. Such refactoring allows us to move the `IdExecutionInstrument` out of `runtime` project into independent compilation unit.
2022-06-13 14:09:08 +00:00
Ara Adkins
1cd2706ba8
Load IR Caches from Disk (#1996) 2021-09-18 13:48:13 +01:00
Ara Adkins
297a8012d1
Design the support for IR serialization (#1868) 2021-07-15 13:14:32 +01:00
Dmitry Bushev
d67f7a2b31
Add HTML Documentation API (#1758)
Add support for the HTML documentation chunks
2021-06-01 15:43:22 +03:00
Ara Adkins
f7c8c1ea4a
Enable the docker pipeline for releases (#1500) 2021-02-23 14:12:24 +00:00
Marcin Kostrzewa
8668079337
Opt-in TCO (#1219) 2020-10-15 16:52:26 +02:00
Ara Adkins
f5ffbe8fa7
Add a markdown style guide (#1022) 2020-07-21 13:59:40 +01:00
Dmitry Bushev
30d136a141
Integration with the Searcher Database (#994) 2020-07-20 11:00:49 +03:00
Marcin Kostrzewa
0b9558d962
Standard Library Nodes DSL (#932) 2020-06-24 19:02:42 +02:00
Ara Adkins
94c7e77e03
Update references to Luna to be Enso (#931) 2020-06-24 12:07:24 +01:00
Marcin Kostrzewa
1b1d465bd7
Fix uncached versions of the function call flow. (#844) 2020-06-19 15:15:43 +02:00
Ara Adkins
d1ab83b4f1
Update the configuration for new default branch 2020-06-15 14:25:55 +01:00
Dmitry Bushev
f5584b2000
Add Searcher Design Doc (#821) 2020-06-10 17:51:04 +03:00
Ara Adkins
456bfc887b
Move the diagram out of the repo (#816) 2020-06-08 14:48:39 +01:00
Radosław Waśko
033db71100
Add task fixing Instruments compilation. (#814)
Incremental compilation of instruments may lead to runtime errors when
only some of the instruments are recompiled (because the unchanged
instruments are not registered by the Annotation Processor).
To fix this, we add a task that ensures all instruments are recompiled
when at least one of them changes.
2020-06-08 13:56:03 +02:00
Ara Adkins
811d2363ad
Set up LFS in this repository (#813) 2020-06-08 11:03:39 +01:00
Marcin Kostrzewa
45801c6eb1
Describe the Internal Execution Queue in Runtime Server (#779)
Co-authored-by: Ara Adkins <me@ara.io>
2020-05-27 15:22:31 +02:00
Dmitry Bushev
34009e1111
Add the Runtime Cache Design Docs (#764)
* doc: add runtime cache design

* Apply suggestions from code review

doc: review edits

Co-authored-by: Ara Adkins <iamrecursion@users.noreply.github.com>

* doc: fix formatting

* doc: benchmark result

* doc: add sections

* doc: update cache backend

* doc: remove redundant eviction section

* doc: rename eviction strategy section

* doc: merge two eviction sections

Co-authored-by: Ara Adkins <iamrecursion@users.noreply.github.com>
2020-05-20 16:34:23 +03:00
Ara Adkins
d2f93488b3
Restructure the developer documentation (#751) 2020-05-15 11:41:26 +01:00