gno icon indicating copy to clipboard operation
gno copied to clipboard

WIP: handle loop variables

Open jaekwon opened this issue 1 year ago • 4 comments

TODO

jaekwon avatar Jun 25 '24 08:06 jaekwon

Codecov Report

Attention: Patch coverage is 82.11921% with 135 lines in your changes missing coverage. Please review.

Project coverage is 63.26%. Comparing base (05cd4f5) to head (1cbc993). Report is 20 commits behind head on master.

Files with missing lines Patch % Lines
gnovm/pkg/gnolang/preprocess.go 93.29% 25 Missing and 8 partials :warning:
gnovm/tests/file.go 23.80% 28 Missing and 4 partials :warning:
gnovm/pkg/gnolang/types.go 0.00% 15 Missing :warning:
gnovm/pkg/gnolang/nodes_string.go 38.88% 10 Missing and 1 partial :warning:
gnovm/pkg/gnolang/values.go 77.08% 9 Missing and 2 partials :warning:
gnovm/pkg/gnolang/nodes.go 67.85% 5 Missing and 4 partials :warning:
gnovm/pkg/gnolang/op_call.go 52.94% 6 Missing and 2 partials :warning:
gnovm/pkg/gnolang/transcribe.go 50.00% 3 Missing and 2 partials :warning:
gnovm/pkg/gnolang/machine.go 69.23% 4 Missing :warning:
gnovm/pkg/gnolang/op_expressions.go 77.77% 2 Missing and 2 partials :warning:
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2429      +/-   ##
==========================================
+ Coverage   63.10%   63.26%   +0.16%     
==========================================
  Files         564      563       -1     
  Lines       79273    80475    +1202     
==========================================
+ Hits        50023    50912     +889     
- Misses      25886    26163     +277     
- Partials     3364     3400      +36     
Flag Coverage Δ
contribs/gnodev 60.57% <ø> (-0.05%) :arrow_down:
contribs/gnofaucet 14.82% <ø> (-0.95%) :arrow_down:
gno.land 67.38% <ø> (-0.19%) :arrow_down:
gnovm 67.60% <82.11%> (+0.36%) :arrow_up:
misc/genstd 79.72% <ø> (ø)
tm2 62.35% <ø> (+0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jun 26 '24 01:06 codecov[bot]

Fixes https://github.com/gnolang/gno/issues/1135

Kouteki avatar Jul 01 '24 08:07 Kouteki

This PR is in a good spot because the tests pass and much of the code is written without actually creating/using any HeapItemValues. There are two minor tasks to be done here, barring any other issues:

  1. copy findGotoLoopStmts to findForLoopStmts and do something similar.
  2. modify the runtime to create a new &HeapItemValue every iteration of GetPointerToHeapDefine, and auto-deref when GetPointerToHeapUse.

jaekwon avatar Jul 03 '24 03:07 jaekwon

Expanding on 2 above, the next thing to try, 2.a, would be to actually copy the values to FuncValue.Captured, and uncomment the portion in preprocess.go, search for "actually uncomment".

jaekwon avatar Jul 03 '24 03:07 jaekwon

Thank you Maxwell for the main readme description and for completing this PR.

jaekwon avatar Jul 27 '24 00:07 jaekwon

This PR is ready for review, cc: @jaekwon @thehowl @mvertes @deelawn @leohhhn . 🙏

ltzmaxwell avatar Jul 29 '24 14:07 ltzmaxwell

all resolved. I'll merge it.

ltzmaxwell avatar Oct 22 '24 18:10 ltzmaxwell

https://www.youtube.com/watch?v=04854XqcfCY

thehowl avatar Oct 22 '24 18:10 thehowl