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

Dev/memory #92

Merged
merged 13 commits into from
Nov 19, 2024
Merged

Dev/memory #92

merged 13 commits into from
Nov 19, 2024

Conversation

nerodesu017
Copy link
Collaborator

@nerodesu017 nerodesu017 commented Oct 21, 2024

Pull Request Overview

This pull request adds support for the next op codes:

  • DROP
  • I64_LOAD
  • I32_LOAD8_S
  • I32_LOAD8_U
  • I32_LOAD16_S
  • I32_LOAD16_U
  • I64_LOAD8_S
  • I64_LOAD8_U
  • I64_LOAD16_S
  • I64_LOAD16_U
  • I64_LOAD32_S
  • I64_LOAD32_U
  • I64_STORE
  • I32_STORE8
  • I32_STORE16
  • I64_STORE8
  • I64_STORE16
  • I64_STORE32
  • MEMORY_SIZE
  • MEMORY_GROW
  • REF_NULL (partially)
  • REF_FUNC (partially)
  • and a part of the FC_EXTENSIONS:
    • I32_TRUNC_SAT_F32_S
    • I32_TRUNC_SAT_F32_U
    • I32_TRUNC_SAT_F64_S
    • I32_TRUNC_SAT_F64_U
    • I64_TRUNC_SAT_F32_S
    • I64_TRUNC_SAT_F32_U
    • I64_TRUNC_SAT_F64_S
    • I64_TRUNC_SAT_F64_U
    • MEMORY_INIT
    • DATA_DROP
    • MEMORY_COPY
    • MEMORY_FILL

Testing Strategy

This pull request was tested by running the provided tests.

TODO or Help Wanted

This pull request still needs all of you guys to let me know exactly what to change since code is not complete and there's a lot to discuss. Also, I might've not documented it properly, so anything that seems strange, please do ask me about it and I will be sure to answer to the best of my abilities.

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/core/reader/types/mod.rs Outdated Show resolved Hide resolved
src/core/reader/types/memarg.rs Outdated Show resolved Hide resolved
tests/memory_fill.rs Show resolved Hide resolved
src/core/reader/types/element.rs Outdated Show resolved Hide resolved
src/core/reader/types/element.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/store.rs Outdated Show resolved Hide resolved
src/execution/value_stack.rs Show resolved Hide resolved
src/execution/interpreter_loop.rs Outdated Show resolved Hide resolved
src/core/reader/types/opcode/mod.rs Outdated Show resolved Hide resolved
src/validation/read_constant_expression.rs Outdated Show resolved Hide resolved
Copy link

codecov bot commented Oct 27, 2024

Codecov Report

Attention: Patch coverage is 74.91197% with 285 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/validation/code.rs 55.95% 53 Missing and 69 partials ⚠️
src/core/reader/types/data.rs 15.95% 75 Missing and 4 partials ⚠️
src/execution/interpreter_loop.rs 92.85% 14 Missing and 27 partials ⚠️
src/core/error.rs 0.00% 16 Missing ⚠️
src/validation/read_constant_expression.rs 71.42% 7 Missing and 3 partials ⚠️
src/execution/mod.rs 81.25% 9 Missing ⚠️
src/execution/value_stack.rs 88.88% 2 Missing ⚠️
src/validation/mod.rs 92.30% 0 Missing and 2 partials ⚠️
src/validation/validation_stack.rs 60.00% 1 Missing and 1 partial ⚠️
src/core/reader/types/memarg.rs 50.00% 0 Missing and 1 partial ⚠️
... and 1 more
Files with missing lines Coverage Δ
src/execution/store.rs 100.00% <100.00%> (+46.66%) ⬆️
src/execution/value.rs 88.99% <100.00%> (+6.15%) ⬆️
src/lib.rs 28.16% <ø> (ø)
src/validation/globals.rs 100.00% <100.00%> (+24.39%) ⬆️
src/core/reader/types/memarg.rs 80.00% <50.00%> (+30.00%) ⬆️
src/core/reader/types/mod.rs 46.91% <94.11%> (+4.73%) ⬆️
src/execution/value_stack.rs 83.78% <88.88%> (+5.65%) ⬆️
src/validation/mod.rs 81.02% <92.30%> (+4.75%) ⬆️
src/validation/validation_stack.rs 92.09% <60.00%> (-0.65%) ⬇️
src/execution/mod.rs 89.75% <81.25%> (-1.47%) ⬇️
... and 5 more

... and 2 files with indirect coverage changes


🚨 Try these New Features:

@nerodesu017 nerodesu017 force-pushed the dev/memory branch 6 times, most recently from 4f2385a to 55997e3 Compare November 18, 2024 11:05
Signed-off-by: nerodesu017 <[email protected]>
Signed-off-by: nerodesu017 <[email protected]>
Signed-off-by: nerodesu017 <[email protected]>
Signed-off-by: nerodesu017 <[email protected]>
cemonem
cemonem previously approved these changes Nov 18, 2024
@george-cosma
Copy link
Collaborator

Marked merge when ready

@george-cosma george-cosma added this pull request to the merge queue Nov 19, 2024
Merged via the queue into DLR-FT:main with commit 70038a4 Nov 19, 2024
9 checks passed
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