Skip to content

Avoid Addr argument to caml_send* (take 2)#10499

Closed
xavierleroy wants to merge 1 commit intoocaml:trunkfrom
xavierleroy:send-no-addr-3
Closed

Avoid Addr argument to caml_send* (take 2)#10499
xavierleroy wants to merge 1 commit intoocaml:trunkfrom
xavierleroy:send-no-addr-3

Conversation

@xavierleroy
Copy link
Contributor

This is another follow-up to #10461.

As in @lthls 's original proposal, caml_send* no longer take a single "cache" argument that is a derived pointer, but they take a base array and an integer offset.

What is new here is that we avoid keeping a derived pointer live altogether, since this interacts badly with the polling point that is automatically inserted in caml_send.

Instead of passing a single "cache" argument that is a derived pointer,
pass a a base array and an integer offset.
This was referenced Jul 9, 2021
Copy link
Contributor

@garrigue garrigue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is clearly fine semantically.
I don't know much about the performance implications: compared to take 1, it replaces manually computing a pointer by a call to int_array_ref. Is the latter consistently as efficient? Or maybe even more efficient, if optimized?

@xavierleroy
Copy link
Contributor Author

I merged #10498 (an alternate solution to the same problem) instead. I'll keep this one open for a while.

@xavierleroy
Copy link
Contributor Author

There's no compelling reason to merge this PR soon, given that #10498 does the job, so I'll just close the PR.

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