<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Now if something like that can't, ultimately, be run from a shell or a makefile it's going to be problematic for an FPC port. It's going to be particularly problematic for the various tests that are run automatically to test the compiler's correctness: it's all very well saying that in the target environment FPC -> asm.js is used strictly to run apps in the context of Firefox but that's hardly going to be convenient for working through a large corpus of test cases.<br>
<br></blockquote><div><br></div><div>Asm.js is 100% compatible with normal JavaScript - the only difference is that it is slower. But for testing this shouldn't be a problem and you can use any JavaScript interpreter. Google V8's source code has a command-line version (which Emscripten uses or used at some point for tests too) that you can build (it is very easy, i did it at the past when i was messing with Emscripten). Here is some information: <a href="http://stackoverflow.com/questions/1802478/running-v8-javascript-engine-standalone">http://stackoverflow.com/questions/1802478/running-v8-javascript-engine-standalone</a><br>
<br></div><div>You will obviously need some sort of "interface" between the asm.js function and the outside world for tests (f.e. what "writeln" would do?) but you'd need that interface anyway since even for real asm.js use people will need to provide such interfaces<br>
</div></div><br></div></div>