Skip to content

Conversation

@tlively
Copy link
Member

@tlively tlively commented Dec 4, 2024

Remove the pos member variable that keeps track of the current
position in the input buffer and instead thread the position through all
the calls to the parsing methods. In a future PR that paralellizes the
parsing of function bodies, this will enable the parsing methods to be
called in parallel without unsafely modifying shared state. Using a
parameter for every method rather than just those used while parsing
function bodies makes it impossible by construction to have data races
on the position.

Remove the `pos` member variable that keeps track of the current
position in the input buffer and instead thread the position through all
the calls to the parsing methods. In a future PR that paralellizes the
parsing of function bodies, this will enable the parsing methods to be
called in parallel without unsafely modifying shared state. Using a
parameter for every method rather than just those used while parsing
function bodies makes it impossible by construction to have data races
on the position.
@tlively tlively marked this pull request as draft December 4, 2024 03:28
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.

2 participants