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

Better Router Mapping #689

Merged
merged 367 commits into from
Mar 17, 2023
Merged

Better Router Mapping #689

merged 367 commits into from
Mar 17, 2023

Conversation

tzaffi
Copy link
Contributor

@tzaffi tzaffi commented Mar 16, 2023

Along with several tasks hilighted below, the PR improves the hit rate on router generated code by associating most of the previously unmatched lines to specific methods or bare calls. For example, you can see the improvement by looking at some of the diffs in this PR:

image

Other tasks from #681 which were completed

  • Prune unused methods in the StackFrame - 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
  • 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 using STABLE_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
  • 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)

Related PR's and Issues

@tzaffi tzaffi marked this pull request as ready for review March 17, 2023 04:59
@tzaffi tzaffi requested review from ahangsu and bbroder-algo March 17, 2023 04:59
@tzaffi tzaffi changed the title Better router mapping 2 Better Router Mapping Mar 17, 2023
Copy link
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.

Walking across the weeds... I think I grasp a feeling of how this PR goes... leaving some comments for now

pyteal/stack_frame.py Outdated Show resolved Hide resolved
pyteal/stack_frame.py Show resolved Hide resolved
pyteal/stack_frame.py Show resolved Hide resolved
pyteal/stack_frame.py Show resolved Hide resolved
pyteal/ast/subroutine.py Outdated Show resolved Hide resolved
pyteal/ast/router.py Outdated Show resolved Hide resolved
pyteal/stack_frame.py Outdated Show resolved Hide resolved
pyteal/stack_frame.py Outdated Show resolved Hide resolved
.flake8 Outdated Show resolved Hide resolved
@bbroder-algo bbroder-algo merged commit 871e580 into master Mar 17, 2023
@tzaffi tzaffi deleted the better-router-mapping-2 branch March 17, 2023 22:13
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.

3 participants