This is a list of thing we need to implement for Wasm MVP
wasm.instantiateModule() or new WebAssembly.Module() (@Cellule #1808)Wasm Object from the global scope #1834print(Wasm.instantiateModule(buffer, ffi).exports.a);Good list for tracking. Can we add debugging there as well?
This is more to track what is missing to be spec compliant.
Debugging is, in my opinion, an extra feature that we need to look into
Yeah I agree.
f32min/max is done.
trunc and nearest done.
@Cellule PR #1514 adds current_memory and we also got a working version of unreachable_operator Should be able to open a PR shortly.
Updated the list with everything I know we still needs to do for MVP
@LouisLaf for visibility
@Cellule, fyi @MikeHolman
a small update,
i32.trunc_u/f32 (0x9f)
i32.trunc_u/f64 (0xa0)
i32.trunc_s/f64 (0xa0) //needs to throw an overflow exception
i32.trunc_s/f64 (0xa0) //needs to throw an overflow exception
@Cellule hey do you know if anyone is implementing f32.reinterpret/i32? if not, i think it's perfect for my afternoon pastime :-)
@Cellule actually it seems that f32.reinterpret/i32 is already fully implemented. Reinterpret_ITF , on the other hand, seems to be missing the codegen part.
DEF2_WMS( I1toF1Mem , Reinterpret_ITF, NumberUtilities::ReinterpretBits ) // reinterpret bits of int to float
DEF2_WMS( F1toI1Scr , Reinterpret_FTI, NumberUtilities::ToSpecial ) // reinterpret bits of float to int
I was also thinking maybe we could try to merge these
NUMBER_UTIL_INLINE uint64 NumberUtilities::ToSpecial(double value)
{
return *(reinterpret_cast<uint64 *>(&value));
}
NUMBER_UTIL_INLINE uint32 NumberUtilities::ToSpecial(float value)
{
return *(reinterpret_cast<uint32 *>(&value));
}
NUMBER_UTIL_INLINE float NumberUtilities::ReinterpretBits(int value)
{
return *(reinterpret_cast<float *>(&value));
}
into
template<typename T, typename U>
inline T Reinterpret(U src)
{
Assert(sizeof(T) == sizeof(U));
return *(reinterpret_cast<T*> (&src));
}
@Cellule oops, i take that back :-) im sry. it looks the only thing that was missing is Reinterpret_ITF -> Reinterpret_Prim in IRBuilderAsmJs :-)
I'm working on adding new JS API. In particular so far have implemented (or partially implemented)
WebAssembly.compile, WebAssembly.Module, WebAssembly.Instance, WebAssembly.RuntimeError, WebAssembly.CompileError
Closed in favor https://github.com/Microsoft/ChakraCore/projects/1 for tracking
Most helpful comment
I'm working on adding new JS API. In particular so far have implemented (or partially implemented)
WebAssembly.compile, WebAssembly.Module, WebAssembly.Instance, WebAssembly.RuntimeError, WebAssembly.CompileError