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

Executefromvar #777

Merged
merged 6 commits into from
Nov 13, 2024
Merged

Executefromvar #777

merged 6 commits into from
Nov 13, 2024

Conversation

SethDusek
Copy link
Collaborator

@SethDusek SethDusek commented Oct 25, 2024

Fix recursion being possible in executefromvar/executefromreg, add rewriting operations for Expr to replace DeserializeContext/DeserializeRegister nodes and also to do constant substitution faster.

close #776

Rather than serialize ergotree and then parse it back with ConstantStore, constant substitution is now done by doing a tree traversal and rewriting ConstantPlaceholder nodes with Constant
@SethDusek SethDusek force-pushed the executefromvar branch 3 times, most recently from 91b9c97 to dc97321 Compare October 25, 2024 09:36
Use serializer flags to avoid traversing tree to check for existence of deserialize nodes
@coveralls
Copy link

Pull Request Test Coverage Report for Build 11518872756

Details

  • 211 of 321 (65.73%) changed or added relevant lines in 39 files are covered.
  • 32 unchanged lines in 9 files lost coverage.
  • Overall coverage decreased (-0.4%) to 78.632%

Changes Missing Coverage Covered Lines Changed/Added Lines %
ergotree-ir/src/ergo_tree.rs 15 16 93.75%
ergotree-ir/src/mir/deserialize_register.rs 10 11 90.91%
ergo-lib/src/wallet/multi_sig.rs 0 2 0.0%
ergotree-ir/src/mir/bit_inversion.rs 0 2 0.0%
ergotree-ir/src/mir/byte_array_to_bigint.rs 0 2 0.0%
ergotree-ir/src/mir/byte_array_to_long.rs 0 2 0.0%
ergotree-ir/src/mir/calc_sha256.rs 0 2 0.0%
ergotree-ir/src/mir/coll_append.rs 0 2 0.0%
ergotree-ir/src/mir/collection.rs 6 8 75.0%
ergotree-ir/src/mir/decode_point.rs 0 2 0.0%
Files with Coverage Reduction New Missed Lines %
ergo-p2p/src/peer_info.rs 1 68.42%
ergotree-ir/src/chain/ergo_box/register/id.rs 1 82.61%
ergotree-ir/src/serialization/sigma_byte_reader.rs 1 85.19%
ergotree-ir/src/pretty_printer.rs 2 81.82%
ergotree-ir/src/serialization/expr.rs 2 94.9%
ergotree-ir/src/serialization/types.rs 3 82.93%
ergotree-ir/src/mir/expr.rs 4 68.86%
ergo-p2p/src/peer_spec.rs 6 76.56%
ergotree-ir/src/mir/constant.rs 12 61.56%
Totals Coverage Status
Change from base Build 11196333782: -0.4%
Covered Lines: 11021
Relevant Lines: 14016

💛 - Coveralls

@SethDusek SethDusek marked this pull request as ready for review November 2, 2024 19:40
@SethDusek SethDusek requested a review from kushti November 2, 2024 19:40
@SethDusek SethDusek merged commit 250f065 into develop Nov 13, 2024
13 checks passed
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.

Fix executeFromVar/executeFromReg
3 participants