add library_async.js

For kripken/emscripten-fastcomp#39

OK, so I'll remove the macro.


On Tue, Jul 8, 2014 at 3:07 PM, Alon Zakai <notifications@github.com> wrote:

> In src/library_async.js:
>
> > +            callback = {{{ makeGetValueAsm('___async_cur_frame', 8, 'i32') }}};
> > +            // the signature of callback is always vi
> > +            // the only argument is ctx
> > +            dynCall_vi(callback, (___async_cur_frame + 8)|0);
> > +            if(___async) return;
> > +            // unwind normal stack frame
> > +            stackRestore({{{ makeGetValueAsm('___async_cur_frame', 4, 'i32') }}});
> > +            // pop the last async stack frame
> > +            _emscripten_async_stack_restore(___async_cur_frame);
> > +            ___async_cur_frame = {{{ makeGetValueAsm('___async_cur_frame', 0, 'i32') }}};
> > +        }
> > +    },
> > +
> > +    emscripten_set_async__deps: ['__async'],
> > +    emscripten_set_async: function() {
> > +#if ASM_JS
>
> -O0 is still asm.js (ASM_JS=2, which means it doesn't claim to validate,
> but it is still asm.js)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/kripken/emscripten/pull/2482/files#r14683017>.
>