Skip to content

AVM: frame pointers#4319

Merged
jannotti merged 16 commits intoalgorand:masterfrom
jannotti:avm-frame-pointers
Sep 28, 2022
Merged

AVM: frame pointers#4319
jannotti merged 16 commits intoalgorand:masterfrom
jannotti:avm-frame-pointers

Conversation

@jannotti
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

@ahangsu ahangsu left a comment

Choose a reason for hiding this comment

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

took a quick pass, looks like interesting fine grained manipulation over stack. I think the subroutine scheme in Pyteal will benefit from it, by getting rid of allocating scratch slots (plausibly trivially).

Comment thread data/transactions/logic/frames.go Outdated
Comment thread data/transactions/logic/frames.go Outdated
Comment thread data/transactions/logic/eval.go Outdated
Comment thread data/transactions/logic/eval.go Outdated
@jannotti jannotti force-pushed the avm-frame-pointers branch from 0822b24 to ec9f161 Compare August 2, 2022 18:31
@jannotti jannotti force-pushed the avm-frame-pointers branch 3 times, most recently from 969600e to ab8ed01 Compare August 7, 2022 16:47
Comment thread data/transactions/logic/doc.go Outdated
Comment thread data/transactions/logic/frames_test.go Outdated
Comment thread data/transactions/logic/eval.go Outdated
@jannotti jannotti force-pushed the avm-frame-pointers branch 2 times, most recently from 144bcc6 to d7b245f Compare August 29, 2022 19:05
Copy link
Copy Markdown
Contributor

@tzaffi tzaffi left a comment

Choose a reason for hiding this comment

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

Looking very good.

Still reading, but I wanted to provide some feedback at this juncture.

Comment thread data/transactions/logic/frames_test.go Outdated
Comment thread data/transactions/logic/frames_test.go Outdated
Comment thread data/transactions/logic/doc.go Outdated
Comment thread data/transactions/logic/eval.go Outdated
Comment thread data/transactions/logic/eval.go Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 30, 2022

Codecov Report

Merging #4319 (74fa7eb) into master (d3c10f4) will increase coverage by 0.11%.
The diff coverage is 90.00%.

@@            Coverage Diff             @@
##           master    #4319      +/-   ##
==========================================
+ Coverage   54.09%   54.21%   +0.11%     
==========================================
  Files         401      402       +1     
  Lines       51659    51830     +171     
==========================================
+ Hits        27947    28101     +154     
- Misses      21355    21364       +9     
- Partials     2357     2365       +8     
Impacted Files Coverage Δ
data/transactions/logic/doc.go 61.53% <ø> (ø)
data/transactions/logic/assembler.go 85.39% <82.55%> (-0.58%) ⬇️
data/transactions/logic/debugger.go 61.46% <100.00%> (ø)
data/transactions/logic/eval.go 89.40% <100.00%> (+0.09%) ⬆️
data/transactions/logic/frames.go 100.00% <100.00%> (ø)
data/transactions/logic/opcodes.go 84.56% <100.00%> (+0.09%) ⬆️
ledger/roundlru.go 90.56% <0.00%> (-5.67%) ⬇️
cmd/algoh/blockWatcher.go 77.77% <0.00%> (-3.18%) ⬇️
ledger/blockqueue.go 84.48% <0.00%> (-1.15%) ⬇️
cmd/tealdbg/debugger.go 72.69% <0.00%> (-0.81%) ⬇️
... and 7 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Comment thread data/transactions/logic/eval_test.go Outdated
Copy link
Copy Markdown
Contributor

@tzaffi tzaffi left a comment

Choose a reason for hiding this comment

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

Very useful functionality. Very much looking forward to seeing how PyTeal subroutines become sleeker and easier to handle thanks to all this.

I left several comments, some more nitpicky than others.

My biggest suggestion is that a solid e2e test for the functionality be included before a final merge.

Comment thread data/transactions/logic/opcodes.go Outdated
Comment thread data/transactions/logic/frames.go Outdated
Comment thread data/transactions/logic/eval.go Outdated
Comment thread data/transactions/logic/frames.go Outdated
Comment thread data/transactions/logic/frames.go Outdated
Comment thread data/transactions/logic/frames_test.go Outdated
Comment thread data/transactions/logic/frames.go Outdated
Comment thread data/transactions/logic/eval.go Outdated
Comment thread data/transactions/logic/frames.go Outdated
Comment thread data/transactions/logic/frames.go Outdated
Comment thread data/transactions/logic/frames.go Outdated
Comment thread data/transactions/logic/TEAL_opcodes.md Outdated
Copy link
Copy Markdown
Contributor

@tzaffi tzaffi left a comment

Choose a reason for hiding this comment

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

Good juncture to leave comments. Still reading

Comment thread data/transactions/logic/opcodes.go Outdated
Comment thread data/transactions/logic/doc.go Outdated
Comment thread data/transactions/logic/assembler_test.go Outdated
Comment thread data/transactions/logic/assembler.go Outdated
Copy link
Copy Markdown
Contributor

@tzaffi tzaffi left a comment

Choose a reason for hiding this comment

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

Submitting a couple of more questions.

Comment thread data/transactions/logic/frames.go Outdated
Comment thread data/transactions/logic/frames_test.go Outdated
@jannotti jannotti force-pushed the avm-frame-pointers branch 2 times, most recently from 2ea3c34 to 3d4c884 Compare September 19, 2022 03:00
Comment thread data/transactions/logic/assembler.go Outdated
Comment thread data/transactions/logic/assembler.go
Comment thread data/transactions/logic/assembler.go
Comment thread data/transactions/logic/assembler.go
jannotti and others added 8 commits September 27, 2022 13:24
Also, a lot of cleanup of type tracking with frame_*

And, caught some examples of us not testing opcodes in "nonsense"
tests because the opcode was a substring of another opcode, like & is
a substring of &&. (Caught, because "bury" is a substring of
"frame_bury")

This means there is a change to the "old" compiled constants.  This is
normally not done, but here we added to an old nonsense test, we added
the corresponding bytes to the compiled output.
jasonpaulos
jasonpaulos previously approved these changes Sep 27, 2022
Copy link
Copy Markdown
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.

Except for the possibility of increasing costs for dupn or proto (maybe that investigation ought to be a separate issue?), this looks good to me

Copy link
Copy Markdown
Contributor

@tzaffi tzaffi left a comment

Choose a reason for hiding this comment

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

I expect to add some more question in the afternoon, but might as well put some up now.

Comment thread data/transactions/logic/opcodes.go Outdated
Comment thread data/transactions/logic/opcodes.go Outdated
Comment thread data/transactions/logic/opcodes.go
Comment thread data/transactions/logic/frames.go
tzaffi
tzaffi previously approved these changes Sep 28, 2022
Copy link
Copy Markdown
Contributor

@tzaffi tzaffi left a comment

Choose a reason for hiding this comment

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

All of the items that I have previously brought up have been considered.

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.

5 participants