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

No maximum recursion depth #22

Closed
jwillp opened this issue Feb 22, 2020 · 2 comments · Fixed by #28
Closed

No maximum recursion depth #22

jwillp opened this issue Feb 22, 2020 · 2 comments · Fixed by #28
Assignees
Labels
enhancement resolved Issue has been resolved (but might not be merged)

Comments

@jwillp
Copy link

jwillp commented Feb 22, 2020

Hi, I just stumbled across this project, and this looks very interesting.
I was playing around with it a bit and noticed that there is no maximum recursion depth.

When calling a recursive function with no stop condition, it just loops forever:

function recursive(a) { recursive(a); }

It could be a good idea to set a hard limit like PHP, especially since this language targets clients.

@smuuf
Copy link
Owner

smuuf commented Feb 22, 2020

Hi, this is an interesting proposition. I will think about it.

@jwillp
Copy link
Author

jwillp commented Feb 22, 2020

@smuuf I have a working attempt on a fork if you want (along with other changes).
master...Morebec:master

smuuf added a commit that referenced this issue Dec 19, 2020
…1024).

- This maximum stack size can be changed (it's a public static property
  of the Context class) before creating the Context object.
  - If set to 0, there is no limit to the callstack size.
- This resolves #22.
@smuuf smuuf mentioned this issue Dec 19, 2020
@smuuf smuuf added enhancement resolved Issue has been resolved (but might not be merged) labels Dec 19, 2020
@smuuf smuuf self-assigned this Dec 22, 2021
@smuuf smuuf closed this as completed in #28 Mar 27, 2022
smuuf added a commit that referenced this issue Mar 27, 2022
…1024).

- This maximum stack size can be changed (it's a public static property
  of the Context class) before creating the Context object.
  - If set to 0, there is no limit to the callstack size.
- This resolves #22.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement resolved Issue has been resolved (but might not be merged)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants