最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

firefox - How is it possible that my program which uses WebAssembly Globals seems to work in the Eclipse Lun3r browser on ReactO

programmeradmin3浏览0评论

So, ReactOS 0.4.15 has been released, and with it there came support for a few new Internet browsers, including the Eclipse Lun3r 33.3.3a1 browser. That's probably the most advanced browser that runs on ReactOS 0.4.15.

Now, when I try to open my Analog Clock in AEC in it, it doesn't work. And, when I open the browser console, I receive this error message:

Which is expected. I didn't expect Eclipse Lun3r to support advanced WebAssembly features such as WebAssembly global variables.

However, when I tried to run my implementation of the Hurwitz'es Algorithm in AEC, to my amazement, it worked:

How is that possible? My Hurwitz'es Algorithm implementation uses WebAssembly global variables, just not from JavaScript, but from WebAssembly itself. For example, at the 22nd line of the generated WebAssembly code, we have this:

  (global $stack_pointer (mut i32) (i32.const 0)) ;;We can declare stack pointer only here because,
                                                  ;;in WebAssembly, "imports must occur before all
                                                  ;;non-import definitions".

And the assembly code is full of instructions such as this one:

    (global.set $stack_pointer ;;Allocate the space for the arguments of that function on the system stack.
      (i32.add
        (global.get $stack_pointer)
        (i32.const 2)
      )
    )
 

And so on. So how can that possibly work in Eclipse Lun3r?

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论