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

Seems the default return stack size is too small #77

Closed
ruv opened this issue Nov 22, 2024 · 1 comment
Closed

Seems the default return stack size is too small #77

ruv opened this issue Nov 22, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@ruv
Copy link
Contributor

ruv commented Nov 22, 2024

Post4 reports error "return stack overflow" when loading:
https://github.com/ForthHub/fep-recognizer/blob/master/implementation/index.fth

In this program include is nested up to 5 levels. Only files are loaded, no program from the loaded files is run.

post4 -r 77 -i index.fth

— fails.

post4 -r 78 -i index.fth

— works fine.

@SirWumpus
Copy link
Owner

I'm considering making all the stacks dynamic, grow as needed through malloc(). For the JNI build, I've already done this to handle array unboxing on the data stack, but the CLI build the stacks remain fixed size. In particular having a dynamic return stack would more closely resemble how the return stack would grow downwards on a dedicated (embedded) Forth system.

@SirWumpus SirWumpus self-assigned this Nov 23, 2024
@SirWumpus SirWumpus added the enhancement New feature or request label Nov 23, 2024
SirWumpus added a commit that referenced this issue Nov 24, 2024
stack now grows as necessary.  Currently the data stack only grows
when unboxing Java arrays, otherwise it does not grow currently.
The float stack is dynamic, but it does not grow currently.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants