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

Mapper module reorg / ABI pack and unpack #172

Merged
merged 2 commits into from
Jan 5, 2021

Conversation

g-r-a-n-t
Copy link
Member

@g-r-a-n-t g-r-a-n-t commented Dec 18, 2020

What was wrong?

1.) See #129
2.) The code responsible for adding non-user defined functions needed during runtime was a bit scattered.

How was it fixed?

1.) Added runtime functions for packing and unpacking arrays and used them in our dynamically generated encoding/decoding functions.
2.) Added a module named runtime to the compiler that is used to build a vector of functions needed during runtime. This better consolidates some pieces of code that had been scattered. It should make runtime-building quite a bit easier in the future. This module exposes a simple API: runtime::build(context, contract) and runtime::build_with_abi_dispatcher(context, contract).

To-Do

  • OPTIONAL: Update Spec if applicable

  • Add entry to the release notes (may forgo for trivial changes)

  • Clean up commit history

@g-r-a-n-t g-r-a-n-t marked this pull request as draft December 18, 2020 23:08
@codecov-io
Copy link

codecov-io commented Dec 18, 2020

Codecov Report

Merging #172 (f3a52e7) into master (33f779b) will decrease coverage by 1.55%.
The diff coverage is 43.43%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #172      +/-   ##
==========================================
- Coverage   79.52%   77.96%   -1.56%     
==========================================
  Files          44       45       +1     
  Lines        3218     3300      +82     
==========================================
+ Hits         2559     2573      +14     
- Misses        659      727      +68     
Impacted Files Coverage Δ
compiler/src/yul/mappers/assignments.rs 97.82% <ø> (ø)
compiler/src/yul/mappers/declarations.rs 100.00% <ø> (ø)
compiler/src/yul/mappers/functions.rs 0.00% <0.00%> (ø)
compiler/src/yul/mod.rs 0.00% <ø> (ø)
compiler/src/yul/operations/data.rs 80.95% <ø> (ø)
compiler/src/yul/runtime/abi_dispatcher.rs 30.76% <0.00%> (ø)
compiler/src/yul/runtime/functions/data.rs 0.00% <ø> (ø)
compiler/src/yul/runtime/functions/mod.rs 0.00% <0.00%> (ø)
compiler/src/yul/runtime/mod.rs 0.00% <0.00%> (ø)
semantics/src/traversal/contracts.rs 100.00% <ø> (ø)
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 33f779b...f3a52e7. Read the comment docs.

compiler/src/yul/constructor.rs Show resolved Hide resolved
compiler/src/yul/constructor.rs Show resolved Hide resolved
compiler/src/yul/constructor.rs Show resolved Hide resolved
compiler/src/yul/runtime/functions/abi.rs Show resolved Hide resolved
compiler/src/yul/runtime/functions/abi.rs Show resolved Hide resolved
compiler/src/yul/runtime/mod.rs Outdated Show resolved Hide resolved
compiler/src/yul/runtime/mod.rs Outdated Show resolved Hide resolved
semantics/src/lib.rs Show resolved Hide resolved
semantics/src/traversal/contracts.rs Outdated Show resolved Hide resolved
semantics/src/traversal/contracts.rs Outdated Show resolved Hide resolved
@g-r-a-n-t g-r-a-n-t force-pushed the data-operations branch 2 times, most recently from 97b63c1 to 5f240d1 Compare January 5, 2021 22:19
@g-r-a-n-t g-r-a-n-t marked this pull request as ready for review January 5, 2021 22:20
@g-r-a-n-t g-r-a-n-t merged commit ff79a05 into ethereum:master Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants