Moving back to .NET

Ola Fosheim Grøstad via Digitalmars-d digitalmars-d at puremagic.com
Thu Oct 8 11:09:42 PDT 2015


On Thursday, 8 October 2015 at 17:56:57 UTC, Freddy wrote:
> On Thursday, 8 October 2015 at 14:02:58 UTC, Chris wrote:
>> It'd be nice to have asm.js or even JS.
>
> The major ploblem I see right now with targeting asm.js is 
> garbage collection. This can be worked around (I think) by 
> having all pointers be fat pointers (size_t* stack_ref_count,T* 
> data) and by having write barriers (that check for null for 
> stack_ref_count) when coping pointers.

Currently effective garbage collection is not possible since you 
cannot scan the stack. I think GC features are planned for some 
future version of WebAssembly.

However, you can generate asm.js like Javascript for gc code.

Or just require nogc.

asm.js also don't have exceptions and goto, neither does it have 
umul, udiv or 64 bit integers.

Non of those are show stoppers, but efficient code gen requires 
using what asm.js does well...




More information about the Digitalmars-d mailing list