Skip to content

Use branching call system to avoid callstack overflow #13

@serin-delaunay

Description

@serin-delaunay

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",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions