-
Notifications
You must be signed in to change notification settings - Fork 131
Open
Labels
Description
Problem
There were a few issues that were not resolved at the time of merging #650 .
Solution - Implement the following small improvements
- (Teal to PyTeal Source Mapper #650 already addressed) Clarify the legend for
_PyTealMapper.annotate()
(cf: https://github.com/tzaffi/pyteal/blob/f2a945a8eeb396e9c544b62cd3d1a6383bfc9bff/pyteal/compiler/sourcemap.py#L844)Rename confusingStackFrame._frame_info_is_right_before_core()
(renamed in Teal to PyTeal Source Mapper #650)Prune unused methods in theStackFrame - PyTealFrame - TealMapItem
hierarchy (Better Router Mapping #689)Final status checks (ensure all changes are actually necessary) (Better Router Mapping #689)- which of the usages of
._sframes_container
are actually necessary. To see all usages: f96ef86
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.audit the following test files and either remove, unskip, or provide clear commentary as to why the skipped test needs to stay in (Better Router Mapping #689 unified usingSTABLE_SLOT_GENERATION: bool
constants currently `False):- tests/integration/sourcemap_monkey_integ_test.py
- tests/unit/sourcemap_constructs311_test.py
- tests/unit/sourcemap_constructs_allpy_test.py
- tests/unit/sourcemap_monkey_unit_test.py
- tests/unit/sourcemap_test.py
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.At the end of Better router mapping #676 pay close attention to_PyTealSourceMap._infer()
and see which lines are still being hit. Probably, there will be some situations that are no longer needed. (Better Router Mapping #689 tightened this up)RefactorNatalStackFrame
to provide a single frame instead of a listCoverage triage- first item to notice: we could do better on subroutines such as the recursive fibonacci example:
- with scratch slots:
pyteal/tests/unit/sourcemap_constructs311_test.py
Line 1901 in 6a49be7
( # 41 - Recursive Subroutine (scratch slots) - with frame pointers:
pyteal/tests/unit/sourcemap_constructs311_test.py
Line 1955 in 6a49be7
( # 42 - Recursive Subroutine (frame pointers)
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.Pull in updated version ofmjpieters
's SourceMap to get faster R3SourceMap (cf: https://github.com/tzaffi/pyteal/blob/f2a945a8eeb396e9c544b62cd3d1a6383bfc9bff/pyteal/compiler/sourcemap.py#L75)Investigate the feasibility of removing the_sframes_container
property fromclass TealComponent
and whenever this is needed, simply overwrite eitherself.expr.stack_frames
orself._stack_frames
. (partially removed from much of hierarchy in Better Router Mapping #689)- If feasible, implement it
- Also consider having a new method
NatalStackFrame.spawn()
that keeps the originalNatalStackFrame
as a child.
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.It's likely that_PyTealSourceMapper
will never be exposed to the end-user. In that case, the logic for caching build items is overly complex. This should be simplified at the end or shortly after Better router mapping #676Less clunky workflow and artifact access in_PyTealSourceMapper
(cf: https://github.com/tzaffi/pyteal/blob/f2a945a8eeb396e9c544b62cd3d1a6383bfc9bff/pyteal/compiler/sourcemap.py#L730)To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Dependencies
None
Urgency
Medium - while the urgency of any improvement individually is Low, addressing at least a few of these issues in the short term will improve the feature's usefuleness.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity