butter icon indicating copy to clipboard operation
butter copied to clipboard

Reduce stack frame size for parser functions

Open neverRare opened this issue 2 years ago • 0 comments

As found out in #14, the parser functions have huge stack frame size that causes stack overflow too early even for parsing codes that isn't deeply nested.

This may also be an opportunity to refactor the parser codes.


Update: With handful of guess-works without actually measuring stack usage, I found out that building in release mode helps significantly. It seems like majority of stack values are debug stuffs. Even better, using Linux (I'm using Alpine WSL) instead of Windows also help even in debug mode. Thus, this seems like a Windows issue (MSVC issue?). Nevertheless, this still hints memory issue within the parser and could annoy contributors using Windows, so it is still better to address this issue, but this wouldn't be prioritized.

neverRare avatar Oct 16 '21 23:10 neverRare