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

feat: elements #99

Merged
merged 2 commits into from
Dec 11, 2024
Merged

feat: elements #99

merged 2 commits into from
Dec 11, 2024

Conversation

nerodesu017
Copy link
Collaborator

@nerodesu017 nerodesu017 commented Nov 25, 2024

Pull Request Overview

This pull request adds support for elements and tables.

Testing Strategy

This pull request was tested using the provided tests which are ported from the official testsuite.

TODO or Help Wanted

This pull request still needs your help so that I can make it production-ready.

Formatting

  • Ran cargo fmt
  • Ran cargo check
  • Ran cargo build
  • Ran cargo doc
  • Ran nix fmt

Github Issue

This pull request partially implements #2

src/execution/mod.rs Outdated Show resolved Hide resolved
@nerodesu017 nerodesu017 requested review from george-cosma, wucke13, florianhartung and cemonem and removed request for george-cosma November 25, 2024 19:28
Copy link
Collaborator

@george-cosma george-cosma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't had the opportunity to review everything, but I've left some comments that you can ponder over tomorrow. Some are nitpicks, some are design choices.

I'd like to also highlight the fact that, at some point, we'll need to rework the constant expressions to be more expansive. It requires some linker (aka import/export) interfaces, though. But let's do this in anotther PR

I'll come back tomorrow/the day after tomorrow with more nitpicks and anything else relevant

tests/table.rs Show resolved Hide resolved
tests/table_grow.rs Show resolved Hide resolved
tests/table_grow.rs Show resolved Hide resolved
tests/table_size.rs Show resolved Hide resolved
src/core/reader/types/mod.rs Outdated Show resolved Hide resolved
src/execution/mod.rs Outdated Show resolved Hide resolved
src/execution/mod.rs Outdated Show resolved Hide resolved
src/execution/mod.rs Show resolved Hide resolved
src/execution/mod.rs Outdated Show resolved Hide resolved
src/execution/value.rs Outdated Show resolved Hide resolved
src/execution/mod.rs Outdated Show resolved Hide resolved
src/execution/mod.rs Outdated Show resolved Hide resolved
src/execution/value.rs Outdated Show resolved Hide resolved
src/execution/value.rs Outdated Show resolved Hide resolved
src/execution/mod.rs Outdated Show resolved Hide resolved
src/execution/mod.rs Outdated Show resolved Hide resolved
@george-cosma
Copy link
Collaborator

This is on your repo so I can't add a commit to it. As such, we'll do it 90's style and give you the patch file to apply, if you find it correct
Note: file renamed from proposal.patch to proposal.txt to be able to upload to github... because it filters based on file ending and not contents. Security Theater!

proposal.txt

src/execution/mod.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@george-cosma george-cosma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more nitpick. The code under src/core/reader/types/element.rs seems to do more than just parsing.
I now understand why you were asking about WasmReader in the lass call.

All code under core/reader(/types) is for parsing, no validation or execution
All code under execution/ is for .... execution
All code under validation/ is for validation

This is my (implicit) understanding of the code structure. From what I can the element.rs file contains more than that - it also does some validation. I would suggest we split it up - we first parse what there is to parse (no validation), and under validation we verify what we parsed. Similar to globals.

@george-cosma
Copy link
Collaborator

patch3.txt

@nerodesu017 nerodesu017 force-pushed the dev/elements_v2 branch 6 times, most recently from 3fcea9e to 7b56da5 Compare December 9, 2024 12:38
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

Attention: Patch coverage is 73.15914% with 226 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/core/error.rs 1.72% 57 Missing ⚠️
src/validation/code.rs 68.61% 16 Missing and 27 partials ⚠️
src/execution/value.rs 64.63% 29 Missing ⚠️
src/core/reader/types/mod.rs 58.69% 18 Missing and 1 partial ⚠️
src/execution/interpreter_loop.rs 90.82% 16 Missing and 3 partials ⚠️
src/core/reader/types/element.rs 82.29% 7 Missing and 10 partials ⚠️
src/execution/mod.rs 89.36% 8 Missing and 2 partials ⚠️
src/core/reader/types/data.rs 25.00% 4 Missing and 2 partials ⚠️
src/execution/store.rs 66.66% 6 Missing ⚠️
src/validation/validation_stack.rs 77.77% 5 Missing and 1 partial ⚠️
... and 4 more
Files with missing lines Coverage Δ
src/validation/globals.rs 94.44% <100.00%> (-5.56%) ⬇️
src/validation/mod.rs 78.47% <100.00%> (-2.55%) ⬇️
src/core/reader/types/import.rs 26.31% <0.00%> (-7.90%) ⬇️
src/execution/const_interpreter_loop.rs 50.63% <83.33%> (+14.26%) ⬆️
src/execution/value_stack.rs 82.81% <76.47%> (-0.98%) ⬇️
src/validation/read_constant_expression.rs 61.53% <66.66%> (-9.90%) ⬇️
src/core/reader/types/data.rs 17.00% <25.00%> (+1.04%) ⬆️
src/execution/store.rs 81.81% <66.66%> (-18.19%) ⬇️
src/validation/validation_stack.rs 91.11% <77.77%> (-0.99%) ⬇️
src/execution/mod.rs 90.47% <89.36%> (+0.71%) ⬆️
... and 6 more

... and 4 files with indirect coverage changes

@nerodesu017 nerodesu017 force-pushed the dev/elements_v2 branch 3 times, most recently from afdf88b to dbca01a Compare December 9, 2024 15:08
@nerodesu017
Copy link
Collaborator Author

I have disabled testsuite automatic testing because we... panic

Signed-off-by: nerodesu017 <[email protected]>

Signed-off-by: nerodesu017 <[email protected]>
Signed-off-by: nerodesu017 <[email protected]>
@cemonem cemonem added this pull request to the merge queue Dec 11, 2024
Merged via the queue into DLR-FT:main with commit f1fd142 Dec 11, 2024
9 checks passed
@nerodesu017 nerodesu017 deleted the dev/elements_v2 branch December 11, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants