Problem
There were a few issues that were not resolved at the time of merging #650 .
Solution - Implement the following small improvements
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.
Problem
There were a few issues that were not resolved at the time of merging #650 .
Solution - Implement the following small improvements
_PyTealMapper.annotate()(cf: https://github.com/tzaffi/pyteal/blob/f2a945a8eeb396e9c544b62cd3d1a6383bfc9bff/pyteal/compiler/sourcemap.py#L844)StackFrame._frame_info_is_right_before_core()(renamed in Teal to PyTeal Source Mapper #650)StackFrame - PyTealFrame - TealMapItemhierarchy (Better Router Mapping #689)._sframes_containerare actually necessary. To see all usages: f96ef86STABLE_SLOT_GENERATION: boolconstants currently `False):_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)NatalStackFrameto provide a single frame instead of a listpyteal/tests/unit/sourcemap_constructs311_test.py
Line 1901 in 6a49be7
pyteal/tests/unit/sourcemap_constructs311_test.py
Line 1955 in 6a49be7
mjpieters's SourceMap to get faster R3SourceMap (cf: https://github.com/tzaffi/pyteal/blob/f2a945a8eeb396e9c544b62cd3d1a6383bfc9bff/pyteal/compiler/sourcemap.py#L75)_sframes_containerproperty fromclass TealComponentand whenever this is needed, simply overwrite eitherself.expr.stack_framesorself._stack_frames. (partially removed from much of hierarchy in Better Router Mapping #689)NatalStackFrame.spawn()that keeps the originalNatalStackFrameas a child._PyTealSourceMapperwill 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 #676_PyTealSourceMapper(cf: https://github.com/tzaffi/pyteal/blob/f2a945a8eeb396e9c544b62cd3d1a6383bfc9bff/pyteal/compiler/sourcemap.py#L730)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.