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

"Store" & "Load" Bytecode Instruction #1

Closed
4 tasks done
mrodz opened this issue Mar 17, 2023 · 0 comments
Closed
4 tasks done

"Store" & "Load" Bytecode Instruction #1

mrodz opened this issue Mar 17, 2023 · 0 comments
Labels
bytecode Issues related to bytecode enhancement New feature or request instruction Bytecode instruction need-documentation This issue introduces a new feature that requires fresh documentation
Milestone

Comments

@mrodz
Copy link
Owner

mrodz commented Mar 17, 2023

Spec

store [name] (==1)

  • Save variable to stack frame.
  • HashSet or Trie to store names for quick lookups (maybe)

load [name]

  • Search for a variable in the current stack frame, trickling upwards.
  • Push the variable to the end of the local stack.

Concerns

  1. Should these operations be infallible? This would increase the speed of read/write operations at the expense of safety.
  2. Possibility for a store_fast [to_eval, name] command that would combine constexpr [to_eval] and store [name].
@mrodz mrodz mentioned this issue Mar 17, 2023
44 tasks
mrodz added a commit that referenced this issue Mar 18, 2023
@mrodz mrodz closed this as completed Mar 18, 2023
@mrodz mrodz added enhancement New feature or request bytecode Issues related to bytecode need-documentation This issue introduces a new feature that requires fresh documentation instruction Bytecode instruction labels Mar 23, 2023
@mrodz mrodz added this to the Bytecode milestone Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bytecode Issues related to bytecode enhancement New feature or request instruction Bytecode instruction need-documentation This issue introduces a new feature that requires fresh documentation
Projects
None yet
Development

No branches or pull requests

1 participant