Skip to content

Conversation

@casperisfine
Copy link
Collaborator

We use a bit of a hack here, for two reasons:

First we'd need a reference to the connection from the parsing functions, it's possible but a bit annoying.

Also if we were to fire write barriers ourselves from the connection object, we'd be very likely to promote the response objects to the old gen, which isn't desirable.

So instead we allocate an RArray and keep a reference to it on the stack. That array is used to store the elements of the response being parsed.

We use a bit of a hack here, for two reasons:

First we'd need a reference to the connection from the parsing functions,
it's possible but a bit annoying.

Also if we were to fire write barriers ourselves from the connection object,
we'd be very likely to promote the response objects to the old gen, which
isn't desirable.

So instead we allocate an RArray and keep a reference to it on the stack.
That array is used to store the elements of the response being parsed.
@casperisfine casperisfine merged commit 5663c3a into master Mar 10, 2023
@casperisfine casperisfine deleted the refactor-reader branch March 10, 2023 07:47
@casperisfine casperisfine mentioned this pull request Apr 3, 2023
40 tasks
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.

3 participants