WebAssembly + Custom Runtime + Associative Arrays

Ferhat Kurtulmuş aferust at gmail.com
Wed Nov 11 08:35:36 UTC 2020

On Wednesday, 11 November 2020 at 08:30:09 UTC, Remi wrote:
> On Wednesday, 11 November 2020 at 02:05:25 UTC, kinke wrote:
>> Ouch, it's compiler bug - the compiler's hardcoded prototype 
>> for _aaInX() uses a `void*` as first param, not a `AA` struct 
>> wrapping the impl pointer. So this assumes the ABI/calling 
>> convention treats both types identically, which isn't 
>> currently the case for LDC's wasm ABI.
>> So using `void* _aaInX(AAImpl* aaimpl, ...)` works around this.
> That's kind of what I saw, AA* worked in x86 but AA** worked in 
> WASM and vice versa. I did try to find where the compiler 
> actually generated the call to _aaInX but couldn't find it by a 
> simple search. Thanks for the help, it seems to work in both 
> architectures now :)

Please contribute to Adam's WebAssembly when your druntime works 
is complete, or publish your own library so that others and I can 
use it :)

More information about the digitalmars-d-ldc mailing list