.ruby
.ruby
the classSlot approach is sort of like: ```c++ //store SomeClass type into slot 1 wrenGetVariable(vm, "module", "SomeClass", 1); //get the handle to the class WrenHandle* handle = wrenGetSlotHandle(vm, 1); //save...
I was thinking along the lines of `wrenGetSlotForeign(WrenVM* vm, int slot, uint32_t* out_tag)` for the original suggestion. ```c++ uint32_t typeTag = 0; Vec3* instance = static_cast(wrenGetSlotForeign(vm, 0, &typeTag)); ``` Because...
That makes sense, thanks for the suggestion!
Thanks for the PR! We can likely include this fix in 0.5.
> Nothing is simple, everything is trades of in computing. Which is exactly why they clarified the trade off being made. Thanks @nitz !
from a quick glance there seems to be some duplication for some of the logic, with this kind of nuance it would be ideal to share it. Have you tried...
A quick look at the source seems to suggest it is... https://github.com/wren-lang/wren/blob/main/src/vm/wren_value.c#L684 I haven't checked if every path goes via this one, but seems to be the case. Edit: It...
`wren_utils.c` or maybe a new one should be fine to start with
Thanks for the info @haberman, it sounds pretty interesting for sure. Despite the compiler specific extensions (which we already rely on for e.g computed goto, specifically cos of perf) I...
It is currently intended and required to be on the same line yea.