Closed Acaccia closed 4 months ago
Attention: Patch coverage is 95.01558%
with 16 lines
in your changes missing coverage. Please review.
Project coverage is 86.23%. Comparing base (
93eace4
) to head (f46c59e
).
Files | Patch % | Lines |
---|---|---|
clar2wasm/src/deserialize.rs | 95.66% | 10 Missing and 3 partials :warning: |
clar2wasm/src/wasm_generator.rs | 85.71% | 1 Missing and 2 partials :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@krl here is the crosscheck testing for serialization/deserialization: https://github.com/stacks-network/clarity-wasm/blob/93eace432d3cac709c3ade3998ee703b6a7aa020/clar2wasm/tests/wasm-generation/values.rs#L17-L27
There will be more testing for the new features in the next PR that will actually implement the new features.
This is the first part of completing #307 .
This PR rewrites completely the tuple deserialization function to allow for the missing functionalities. For now, the missing functionalities implemented are
To satisfy those conditions, the new algorithm in pseudo-code became
These contains new functionalities that had to be created:
i32
locals, the logic to handle it is directly inside the deserialization algo.br_table
instruction to jump after the block labelled like the currently parsed field (I suggest compiling a few examples to see what it looks like).TODO
for now but is nearly complete already. I decided to cut it from this PR and add it in a future one because it will require quite a lot of code to handle the testing.