-
Forth 200x draft 19-1 section 13.3.3.1 Compilation semantics:
16 locals per definition, but is there an upper limit as to the max. definition depth for supporting locals? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
What do you mean by "definition depth"? If you mean how many local variables in total can exist at once during program execution, — there is no such upper limit for programs (after which an environment dependency must be declared) or minimum requirement for systems. Typically, locals are stored on the return stack, so this falls under 4.1.2 Ambiguous conditions:
I think a similar ambiguous condition should be declared in 13.4.1.2 to cover the case where local variables are stored somewhere else (e.g., on a separate stack of local variables). |
Beta Was this translation helpful? Give feedback.
What do you mean by "definition depth"?
If you mean how many local variables in total can exist at once during program execution, — there is no such upper limit for programs (after which an environment dependency must be declared) or minimum requirement for systems.
Typically, locals are stored on the return stack, so this falls under 4.1.2 Ambiguous conditions:
I think a similar ambiguous condition should be declared in 13.4.1.2 to cover the case where local variables are stored somewhere else (e.g., on a separate stack of local variables).