Wasm todo #1127

Closed
Cellule opened this Issue Jun 11, 2016 · 13 comments

Projects

None yet

6 participants

@Cellule
Member
Cellule commented Jun 11, 2016 edited

This is a list of thing we need to implement for Wasm MVP

@liminzhu
Member

Good list for tracking. Can we add debugging there as well?

@Cellule
Member
Cellule commented Jun 14, 2016

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

@liminzhu
Member

Yeah I agree.

@commonlisp
Collaborator

f32min/max is done.

@commonlisp
Collaborator

trunc and nearest done.

@Krovatkin
Collaborator

@Cellule PR #1514 adds current_memory and we also got a working version of unreachable_operator Should be able to open a PR shortly.

@Cellule
Member
Cellule commented Oct 6, 2016

Updated the list with everything I know we still needs to do for MVP
@LouisLaf for visibility

@Krovatkin
Collaborator

@Cellule, fyi @MikeHolman

a small update,

  • redid globals. i should be able to open a PR as soon as we make sure it doesnt have any obvious goofs :-)
  • finishing up with

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

@Krovatkin
Collaborator

@Cellule hey do you know if anyone is implementing f32.reinterpret/i32? if not, i think it's perfect for my afternoon pastime :-)

@Krovatkin
Collaborator
Krovatkin commented Oct 21, 2016 edited

@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));
}
@Krovatkin
Collaborator

@Cellule oops, i take that back :-) im sry. it looks the only thing that was missing is Reinterpret_ITF -> Reinterpret_Prim in IRBuilderAsmJs :-)

@MikeHolman
Member

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

@Cellule
Member
Cellule commented Oct 31, 2016
@Cellule Cellule closed this Oct 31, 2016
@dilijev dilijev modified the milestone: WebAssembly Dec 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment