我希望在 Firefox Nightly 中发现编译消息,但它没有发生。有专门的开关吗?
最佳答案
还没有测试过,但 here 中似乎有一个验证器.
快速浏览一下测试就会发现它可以按如下方式使用:
var asm = require('asm.js');
try {
report = asm.validate(String(function f(stdlib, foreign, heap) {
"use asm";
// this is what we're validating
function f() {
var x = 0, y = 0;
x = ((x|0)%(y|0))|0;
}
return {};
}));
console.log('Validated!');
} catch(e) {
console.error(e);
}
关于javascript - 有没有办法验证 asm.js 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20453245/