Details
-
Improvement
-
Resolution: Duplicate
-
Normal
-
None
-
None
-
None
Description
withParseErrorThrowing is an inline function which has a body evaluated by name.
I had hoped (and still do) that inlining such would eliminate the closure. Alas some experiment I did a while ago showed that this is not the case. So we'd have to make it a macro to eliminate the allocation for sure.
The other thing is that withParseErrorThrowing wasn't supposed to introduce another try/catch if one is already inside one. but that's not implemented. The code path always has the try/catch. This is wholesale broken as that state is global, so not thread safe. It needs to be in the PState.