Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Box Variant variants, not Variants #5452

Closed
wdanilo opened this issue Feb 5, 2023 · 0 comments · Fixed by #10734
Closed

Box Variant variants, not Variants #5452

wdanilo opened this issue Feb 5, 2023 · 0 comments · Fixed by #10734
Assignees
Labels
--low-performance -parser p-low Low priority x-new-feature Type: new feature request

Comments

@wdanilo
Copy link
Member

wdanilo commented Feb 5, 2023

This task is automatically imported from the old Task Issue Board and it was originally created by Keziah Wesley.
Original issue is here.


Currently Tree boxes its variant field, of enum type Variant. Some Variant variants are over 900 bytes, while others are small; the current wastes memory by boxing the enum rather than its variants. Fixing this will require adding a box flag to the tagged enum macro that is used for Variant.

@sylwiabr sylwiabr removed this from Issues Board Feb 8, 2023
kazcw added a commit that referenced this issue Aug 1, 2024
Implements #5453.

Syntax changes:
- Eliminate old non-decimal number syntax.
- Unspaced application like `f(x)` is now an error.
- Applying `:` to a non-QN in statement context is allowed and produces
  a `TypeAnnotated` (fixes #6152).

API changes:
- All fixed-content tokens are now distinct types.

Error improvements (fixes #5444), especially for:
- Out-of-context expressions/statements
- Statement syntaxes
- Named-app syntax
- Unspaced-application errors
- Number syntax
- Private annotations (fixes #10137)
- Parens (fixes #6741)
- Type defs (fixes #8633)
- Fix some panics caused by invalid expressions, found by parsing non-Enso code.
- Reject some operations in pattern context, e.g. `1 + 1 = 2`.
- Eliminate `export` with `all` or `hiding` (#10258).

Improve Rust parsing performance by 33%; now 20 MB/s on my bench machine:
- Stream lexer to parser.
- New, faster parser for type defs, statements, numbers.
- More efficient tree layout (fixes #5452).
Improve backend parsing performance additionally:
- Backend now uses optimized parser build (in debug builds,
  debug-assertions are still enabled).

Build improvements:
- Fix some redundancy between `sbt` and build script: now only `sbt`
  compiles JNI and generates parser's Java bindings for backend use.
  Build script generates Java to a different directory when parser
  serialization self-test is requested.
- Improve `sbt` detection of changed parser; this should reduce the need
  for clean builds in CI.

Testing:
- Add binary target for fuzzing with AFL.
@github-project-automation github-project-automation bot moved this to ❓New in Issues Board Aug 1, 2024
@kazcw kazcw moved this from ❓New to 🔧 Implementation in Issues Board Aug 1, 2024
@mergify mergify bot closed this as completed in #10734 Aug 5, 2024
@github-project-automation github-project-automation bot moved this from 🔧 Implementation to 🟢 Accepted in Issues Board Aug 5, 2024
@farmaazon farmaazon moved this from 🟢 Accepted to 🗄️ Archived in Issues Board Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
--low-performance -parser p-low Low priority x-new-feature Type: new feature request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants