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

Feature/runtime state #122

Merged
merged 28 commits into from
Jul 31, 2020
Merged

Feature/runtime state #122

merged 28 commits into from
Jul 31, 2020

Conversation

collinc97
Copy link
Collaborator

Changes

  • adds support for .in, .state, .out files
  • adds [registers] section to program input file
    • the registers variable can be passed into function main main(registers)
    • the registers variable can be accessed with dot syntax registers.value_balance
  • adds [state] section to state file
    • the state variable has the same functionality as the registers variable.
  • adds [record] section to state file
    • the record variable has the same functionality as the registers variable.
  • adds [state_leaf] section to state file
    • the state_leaf variable has the same functionality as the registers variable.
  • adds visibility to state file sections
    • [[public]] indicates a public section. Only the state section is public.
    • [[private]] indicates a private section. The record and state_leaf sections are private.
  • adds support for writing program return values to output registers
    • output registers live in the outputs/token_withdraw.out file.
    • output register parameters match input register parameters.
  • refactors the compiler to reason about different state files + writing to the output file.
  • refactors all tests to work with the new compiler.
  • adds additional tests for all new features.

@codecov
Copy link

codecov bot commented Jul 31, 2020

Codecov Report

Merging #122 into master will increase coverage by 0.24%.
The diff coverage is 91.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #122      +/-   ##
==========================================
+ Coverage   74.94%   75.19%   +0.24%     
==========================================
  Files         283      312      +29     
  Lines        8223     8680     +457     
==========================================
+ Hits         6163     6527     +364     
- Misses       2060     2153      +93     
Impacted Files Coverage Δ
ast/src/functions/function.rs 37.50% <0.00%> (ø)
ast/src/functions/inputs/function_input.rs 42.85% <ø> (ø)
compiler/src/errors/compiler.rs 20.83% <0.00%> (-5.49%) ⬇️
compiler/src/errors/output_bytes.rs 0.00% <0.00%> (ø)
compiler/src/errors/output_file.rs 0.00% <0.00%> (ø)
compiler/src/function/input/array.rs 59.25% <ø> (-40.75%) ⬇️
compiler/tests/import/mod.rs 0.00% <0.00%> (ø)
ast/src/functions/inputs/input.rs 28.57% <28.57%> (ø)
compiler/tests/integers/integer_tester.rs 35.71% <38.46%> (-44.29%) ⬇️
compiler/src/errors/function.rs 28.30% <57.14%> (-8.66%) ⬇️
... and 117 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 8569907...7137c98. Read the comment docs.

@collinc97 collinc97 requested a review from howardwu July 31, 2020 02:00
@howardwu
Copy link
Member

#116 #118

howardwu
howardwu previously approved these changes Jul 31, 2020
@collinc97 collinc97 merged commit 17e2adc into master Jul 31, 2020
@collinc97 collinc97 deleted the feature/runtime-state branch July 31, 2020 22:03
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