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

AVM: Deadcode and basic block analysis #3870

Merged
merged 14 commits into from
Apr 20, 2022
Merged

Conversation

jannotti
Copy link
Contributor

@jannotti jannotti commented Apr 8, 2022

This PR improves assembly so that it detects typing errors if they occur within a basic block, even if there have been branches elsewhere in the code. It also allows "bad" code if the code is in a deadcode region, such as after an unconditional branch return, err, retsub...

It also continues to simplify the OpSpecs table by using helper functions to declare the opcode "Prototype" and other details, so there is less clutter.

jannotti added 2 commits April 7, 2022 21:33
Unify most assembly routines to minimize difference and ease doc gen
Flexible opcode costs and fewer assembly routines
Ignores deadcode.
Understands how jumps obscure typing info.
Detects error within basic blocks
Adds #pragma typetrack false
Makes spec creation a bit more uniform
@codecov-commenter
Copy link

codecov-commenter commented Apr 8, 2022

Codecov Report

Merging #3870 (caca024) into master (21b4bc5) will increase coverage by 0.18%.
The diff coverage is 88.64%.

@@            Coverage Diff             @@
##           master    #3870      +/-   ##
==========================================
+ Coverage   49.92%   50.10%   +0.18%     
==========================================
  Files         391      393       +2     
  Lines       68191    68301     +110     
==========================================
+ Hits        34044    34223     +179     
+ Misses      30431    30375      -56     
+ Partials     3716     3703      -13     
Impacted Files Coverage Δ
data/transactions/logic/fields.go 77.10% <0.00%> (ø)
data/transactions/logic/debugger.go 56.70% <33.33%> (ø)
data/transactions/logic/eval.go 89.87% <86.84%> (+0.06%) ⬆️
data/transactions/logic/assembler.go 83.15% <89.39%> (+0.40%) ⬆️
data/transactions/logic/opcodes.go 84.76% <92.59%> (+3.03%) ⬆️
data/transactions/logic/doc.go 60.00% <100.00%> (+2.30%) ⬆️
util/db/fullfsync_darwin.go 100.00% <0.00%> (ø)
libgoal/lockedFileUnix.go 0.00% <0.00%> (ø)
... and 17 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 21b4bc5...caca024. Read the comment docs.

jannotti and others added 2 commits April 13, 2022 14:45
…onsecutive

Retain type tracking state during consecutive type tracking enablements
Copy link
Contributor

@jasonpaulos jasonpaulos left a comment

Choose a reason for hiding this comment

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

I like the proto change a lot

jannotti and others added 2 commits April 15, 2022 11:42
Centralize OpStream initialization by introducing factory method
jasonpaulos
jasonpaulos previously approved these changes Apr 15, 2022
michaeldiamant
michaeldiamant previously approved these changes Apr 19, 2022
@jannotti jannotti marked this pull request as ready for review April 19, 2022 14:32
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.

4 participants