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 stack series instead of recursion for GC #24

Merged
merged 1 commit into from
Jul 22, 2015
Merged

Conversation

hostilefork
Copy link
Member

Addresses problem of C execution stack overflow when given
deeply nested blocks, such as this:

    a: copy []
    loop 200'000 [a: append/only copy [] a]
    recycle

Works standalone whereas previously in r3 it would crash. Yet
test build crashes on this (and other things before it) and alerts
address sanitizer. So there are more things to be fixed.

To clear the air a bit, I got rid of the macros that just set flags
as names like MARK_SERIES are pretty nebulous as to how
much they do or don't do.

@hostilefork
Copy link
Member Author

Going ahead and merging this.

I'd tested this more or less before, but the ROUTINE!/STRUCT! stuff doubled the size of the patch. I'm not testing the FFI code ATM (there are a couple of test for it, but this is just using the "stub"). So if there are problems let me know.

Addresses problem of C execution stack overflow when given
deeply nested blocks, such as this:

        a: copy []
        loop 200'000 [a: append/only copy [] a]
        recycle

Works standalone whereas previously in r3 it would crash.  Yet
test build crashes on this (and other things before it) and alerts
address sanitizer.   So there are more things to be fixed.
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

Successfully merging this pull request may close these issues.

None yet

2 participants