在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:jterrace/js.js开源软件地址:https://github.com/jterrace/js.js开源编程语言:JavaScript 100.0%开源软件介绍:js.js is a JavaScript interpreter in JavaScript. Instead of trying to create an interpreter from scratch, SpiderMonkey is compiled into LLVM and then emscripten translates the output into JavaScript. DemosSee several running demos here. PaperAcademic paper to appear at WebApps 2012 located here. StatusThe compiled version of js.js is 3MB and only 594KB after gzip compression. Using the Sunspider benchmark, the interpreter is about 200 times slower than Spidermonkey's native interpreter with the JIT compiler turned off. More optimizations and benchmarks are coming soon. Example UseHere is an example of how to use the API: var jsObjs = JSJS.Init(); var rval = JSJS.EvaluateScript(jsObjs.cx, jsObjs.glob, "1 + 1"); var d = JSJS.ValueToNumber(jsObjs.cx, rval); window.alert(d); //2 JSJS.End(jsObjs); More examples are available in the FilesThe following files are located in the
To run the shell, you want to run one of these: js js.O2.min.js -e "print('hello');" node js.O2.min.js -e "print('hello');" To include the API in your website, include the minified libjs like this: <script type="text/javascript" src="libjs.O2.min.js"></script> Alternatively, you can use the wrapper script directly with a non-minified version (useful for debugging and modifications): <script type="text/javascript" src="libjs.O2.js"></script> <script type="text/javascript" src="jsjs-wrapper.js"></script> |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论