Skip to content

Store context variables separately #2064

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

Open
verytactical opened this issue Feb 27, 2025 · 0 comments
Open

Store context variables separately #2064

verytactical opened this issue Feb 27, 2025 · 0 comments
Labels
kind: gas! Gas consumption and fee-related things

Comments

@verytactical
Copy link
Contributor

verytactical commented Feb 27, 2025

If there isn't too many context variables, store them separately.

At the moment we store them as a tuple in the generated FunC code

(int, slice, int, slice) __tact_context_get() inline {
    return __tact_context;
}

and in resulting assembly we unpack the tuple onto stack

__tact_context_get PROCINLINE:<{
  __tact_context GETGLOB
  4 UNTUPLE
}>

and then drop the components we don't need

__tact_context_get INLINECALLDICT
2 2 BLKDROP2
@verytactical verytactical added the kind: gas! Gas consumption and fee-related things label Feb 27, 2025
@anton-trunov anton-trunov added this to the v1.6.0 milestone Feb 27, 2025
@anton-trunov anton-trunov modified the milestones: v1.6.0, v1.6.1, v1.6.2 Feb 27, 2025
@anton-trunov anton-trunov removed this from the v1.6.5 milestone Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: gas! Gas consumption and fee-related things
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants