SwammiM
SwammiM
It is possible to do synchronous http requests in the browser, not with fetch but with XMLHttpRequest (or sync-fetch which makes it nicer). just sharing because it might be an...
For nested structs, something like this : ``` @struct export class StructA { val: f32 = 0; constructor(val: f32) { this.val = val; } } @struct export class StructB {...
> One caveat is that there is no stack in AS, except for the shadow stack used for garbage collection. Wait, that's confusing me - then what is __stack_pointer for?...
> `__stack_pointer` is for that shadow stack I mentioned. The shadow stack is there so managed objects in local variables don't get prematurely garbage collected. > > `memory.data(123)` reserves a...
Oh I see the flaw with this approach. If I would call the inlined constructor in a loop, and add them to an array, they will all be the same...
Thanks for all the responses! > @Mudloop also, what's your use case for AS? I'm actually building a little game engine with an electron-based editor, and I want to be...
> That wouldn't be an ideal thing to enable by default, because that would stop inlining and other optimizations. I don't think that'd work too well with generics either. Yeah,...
> Hey, @Mudloop Here's a few resources that might help you https://github.com/JairusSW/as-json/tree/master/transform/src https://github.com/JairusSW/as-object/tree/master/transform/src > > If you'd like to talk, I'm also interested in implementing this. You can email me...
> Hm, that's a good point. If you just declare a class, it'll be DCE'd. You could mitigate this by having an exported dummy function reference the class. As far...
> By the way, Binaryen _might_ be able to convert the WAT back to Wasm, depending on whether the WAT is in the S-expression format or not. Thanks, but I...