More recent efforts such as asm . Emscripten is a toolchain for compiling to asm . An embedded developer can write performance-critical code in the asm . Unity和Unreal可以将你的游戏通过asm . Both Unity and Unreal can export your game to WebGL with asm . The society 's mission is to promote and advance the microbial sciences.
在这种情况下,所有汇编代码都必须放在asm {}块中。 In such case, all the assembly code must be placed inside asm {} block. 接下来我必须想想办法让其它的扩展代码同asm .js的代码能够互相通信。 Next I had to figure out how other extension code can communicate with the asm . js code. 我所期望的工作应该是作为asm.js相对简单的超集的编译器,来打破asm . What I would rather expect to work would be a compiler for a relatively simple superset of asm . 作为第一个步骤,WebAssembly团队旨在提供同asm . As a first step,the WebAssembly team aims to offer about the same functionality as asm . 这些转换为asm .js所必需,这样优化编译器才可以提前生成高效的本地代码。 These conversions are required by asm . js, so that an optimising compiler can produce highly efficient native code ahead-of-time. 如果你想知道是否“JavaScript的无处不在”是真的可能,那就没有比看asm .js更合适的了。 If you're wondering whether'JavaScript everywhere' is really a possibility, look no further than asm . js. 这里有一个早期原型附带演示页面[1,2],他们展示了从类似WebAssembly的二进制格式解码为asm . There was an early prototype with demos[1, 2], which showed that decoding a binary WebAssembly-like format into asm . 事实上,在一些基准测试比如Box2D、FASTA和copy中,asm .js与Clang比较接近,或者比Clang到GCC还接近Clang。 In fact, on some benchmarks, like Box2D, FASTA and copy, asm . js is as close or closer to Clang than Clang is to GCC. 有一些方法可以缓解这些问题,例如使用serviceworkers另起线程在后台完成工作,或使用asm . There are ways to mitigate this, such as using service workers to do jobs in the background and on another thread, using asm . 所有支持JavaScript较新版本的浏览器都应该能支持运行asm .js代码,因为它是该规范的子集。 All browsers with support for the newest edition of JavaScript should be able to run asm . js code, as it is a subset of that specification. 我们已经对Chrome41中的TurboFan进行了Beta测试,这一版本极大地提高了各种数值运算代码的性能,例如asm .js。 We're already beta testing TurboFan in Chrome 41, which significantly improves the performance of numeric code like asm . js. Js差不多的功能(这样开发人员将能够像使用Emscripten工具来编译asm .js代码一样,使用相同的工具到WebAssembly)。 Js(and developers will be able to use the same Emscripten tool for WebAssembly as they use for compiling asm . js code today). Js,情况也类似,并且Emscripten做了一系列对工具链的优化,还做了运行LLVM的优化器和Emscripten的asm .js优化器。 Js, and Emscripten did a bunch of toolchain optimizations, running LLVM's optimizer and also Emscripten's asm . js optimizer. 不过JavaScript引擎是被优化过的并被设计成能将所有的那些高级特性直接翻译成字节码-因此像asm . But JavaScript engines are optimized and designed to translate all those advanced features directly into bytecode- so an intermediate step like asm . 在生成的代码中,变量MEM8实际上是一个类型缓冲区的逐字节“视图”,它充当asm .js代码的堆(heap)。 In the generated code, the variable MEM8 is actually a byte-by-byte"view" of a typed buffer, which serves as the"heap" of the asm . js code. 目前几乎所有基于asm .js的应用程序都是使用Emscripten或Mandreel编译为asm .js的C/C++应用程序。 Almost all of the current applications based on asm . js are C/C++ applications compiled to asm . js using Emscripten or Mandreel. Unity与Mozilla宣布,它们已经将Unity游戏引擎带到了Web上,并且是采用了WebGL标准和Mozilla的asm .js技术。 Unity and Mozilla today announced that they are bringing the Unity game engine to the web using the WebGL standard and Mozilla's asm . js. 近日,Mozilla和Unity宣布,他们将联手使用WebGL标准和Mozilla的asm .js技术,把Unity的流行游戏引擎带到Web上。 Unity and Mozilla today announced that they are bringing the Unity game engine to the web using the WebGL standard and Mozilla's asm . js. 更好的是,Mozilla在2014年对HumbleMozillaBundle进行了整合,让你可以买到一堆利用asm .js的游戏。 Even better, Mozilla coordinated the Humble Mozilla Bundle in 2014, which allowed you to buy a bunch of gamest that took advantage of asm . js. OdinMonkey是Mozilla在Firefox中使用的asm .js提前编译器,它是IonMonkey(SpiderMonkey的JIT编译器)的一个组件。 OdinMonkey, Mozilla's asm . js ahead-of-time compiler used in Firefox, is a component of IonMonkey, the JIT compiler of SpiderMonkey. Emscripten项目提供了可以编译C和C++(或其他任何可转换为LLVMIR的语言)代码为asm .js的工具。[2]. The Emscripten project provides tools that can be used to compile C and C++ codebases(or any other languages that can be converted to LLVM IR) into asm . js.[2]. 微软在MicrosoftEdge使用的JavaScript引擎Chakra中实现了asm .js支持,执行验证以产生高度优化的JIT代码。 Microsoft is implementing support for asm . js in Chakra, the JavaScript engine used by Microsoft Edge, performing validation to produce highly optimised JIT code. 部分浏览器的实现针对asm .js进行了特别优化:MozillaFirefox是第一个实现针对asm .js优化的网页浏览器,自Firefox22开始使用。 Some browser implementations are especially optimised for asm . js: Mozilla Firefox was the first web browser to implement asm . js-specific optimizations, starting with Firefox 22. Emscripten将C/C++代码传入LLVM,并将LLVM生成的字节码转换成JavaScript(具体的,Asm .js,是JavaScript的一个子集). Emscripten takes in C/C++ code, passes it through LLVM, and converts the LLVM-generated bytecode into JavaScript(specifically, Asm . js, a subset of JavaScript). GNU内联汇编语句asm volatile("":::"memory");或者__asm ____volatile__("":::"memory");阻止GCC编译器跨越它乱序读/写指令。 The GNU inline assembler statement asm volatile("":::"memory"); or even__asm ____volatile__("":::"memory"); forbids GCC compiler to reorder read and write commands around it.
Display more examples
Results: 75 ,
Time: 0.1471