add library_async.js

For kripken/emscripten-fastcomp#39

OK I will fix this in the end, or we will lose all the comments.
On Jul 7, 2014 5:15 PM, "Alon Zakai" <notifications@github.com> wrote:

> In src/library_async.js:
>
> > + * ...
> > + * --------------------- <-- __async_stacktop
> > + *
> > + */
> > +
> > +mergeInto(LibraryManager.library, {
> > +    __async: 0, // whether a truly async function has been called
> > +    __async_stacktop: 'allocate(5*1024*1024, "i32", ALLOC_STATIC)', // where we store async stack framesk
> > +    __async_retval: 'allocate(2, "i32", ALLOC_STATIC)', // store the return value for async functions
> > +    __async_cur_frame: 0, // address to the current frame, which stores previous frame, stack pointer and async context
> > +
> > +    emscripten_async_stack_save__deps: ['__async_stacktop'],
> > +    emscripten_async_stack_save__sig: 'i',
> > +    emscripten_async_stack_save__asm: true,
> > +    emscripten_async_stack_save: function() {
> > +        return ___async_stacktop|0;
>
> indentation in emscripten is 2 spaces
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/kripken/emscripten/pull/2482/files#r14630768>.
>