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

Use branching call system to avoid callstack overflow #13

Open
serin-delaunay opened this issue Sep 11, 2018 · 0 comments
Open

Use branching call system to avoid callstack overflow #13

serin-delaunay opened this issue Sep 11, 2018 · 0 comments

Comments

@serin-delaunay
Copy link
Owner

Each state transition currently expands a symbol one step deeper in the tracery call stack. This may cause stack overflows in machines that use many steps. Eli Dupree has made a prototype of a branching call system which doubles the number of execution steps every two levels deeper in the call stack. It requires an exit method before it can be used.

"run_many_steps": "[execute_run_many:#activate_run_many#]#execute_run_many#[execute_run_many:POP]",
"activate_run_many": "\\#run_many_switch_#run_many_stack#\\#",
"run_many_switch_END": "#run_step#",
"run_many_switch_CONTINUE": "[run_many_stack:POP]#run_many_steps##run_many_steps#[run_many_stack:CONTINUE]",

"run_steps_forever": "#run_many_steps#[run_many_stack:CONTINUE]#run_steps_forever#",
"run_many_stack": "END",
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

No branches or pull requests

1 participant