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

Correctly handle tail calls #33

Closed
SquidDev opened this issue Jan 30, 2020 · 0 comments
Closed

Correctly handle tail calls #33

SquidDev opened this issue Jan 30, 2020 · 0 comments

Comments

@SquidDev
Copy link
Member

Cobalt's handling of tail calls isn't entirely correct.

  • Java functions are tail called. While this was considered a feature of LuaJ, it makes implementing Detailed argument errors #31 (or rather, the function name aspects of it) rather annoying. I don't think we gain anything from it, so I'd be in favour of removing this.

  • Tail calls should be tracked in stack traces. Lua 5.3 prints (...tail calls...) (previous versions do (tail call): ?). This should be possible to do just by setting a tail call flag - I believe that's relatively similar to what PUC Lua does.

SquidDev added a commit that referenced this issue Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant