selfjs.html
<script src="secd_cod.js"></script> <script src="compiler.js"></script> <script> Array.prototype.toString=function(){return"["+this.join(",")+"]"} function main() { document.getElementById("compiler.secd.new").value=""; document.getElementById("fout").value="initialize ...\n"; setTimeout(main2,100); } function main2() { init(); printf("Reading compiler source ...\n"); flush(); setTimeout(main3,100); } function main3() { readSFrom("compiler.lisp", s); printf("compile ... \n"); flush(); setTimeout(main4,100); } function main4() { var time = new Date().getTime(); regs[s]=COMPILE(regs[s]); printf("time="+(new Date().getTime() - time) + "ms"); flush(); setTimeout(main5,100); } function main5(){ writeSTo("compiler.secd.new", s); flush(); } </script> <body onload="main()"> <textarea style="width:100%;height:100%" id="fout"></textarea> <textarea style="width:100%;height:100%" id="compiler.secd.new"></textarea> </body>