Closed vixalien closed 11 months ago
Maybe it's time to review this next?
Sorry it's taking so long, I'm a bit busy these days. I'll review this by the end of the week.
Sorry it's taking so long, I'm a bit busy these days. I'll review this by the end of the week.
Hey! No worries. Take your time, and you don't have to review these ASAP. I just create a PR for every thing I change so the changes don't get lost. Please don't feel pressured to review this and take your time!
I've rebased the code and removed the bytes.ts
file. I plan to reintroduce plausible tests later.
This PR is significant because it implements passing around arguments in their raw pointer form instead of allocating new ArrayBuffers.
This is done by creating a
BigUint64Array
, passed as an argument to FFI functions (gi_(function|method|callback)_invoke
). The FFI functions directly manipulate and set the pointers as indices of theBigUint64Array
, and we can get the assigned pointers directly from the BigUint64Array. Here's some pseudocode to explain this:Thanks for taking a look at this.
I also created a new file,
examples/bytes.ts
, a temporary file to test things out since deno_gi doesn't have actual tests at the moment (I'm working on it...). You can delete this before merging. Thanks!