diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-10-08 11:47:14 -0400 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-10-08 11:47:14 -0400 |
commit | 0a229cf5a240a1ebf4ff5d0ebb501a286bc96202 (patch) | |
tree | 2797d054788e88863d77f9826dde94fb4c276c69 /src/compiler_phase.html | |
parent | 05b6aa32a5f1633797f7eae390b3a8048b29ca69 (diff) | |
parent | ae5ef852920ce67449af7693f05a767a87aed976 (diff) |
Merge branch 'incoming'
Diffstat (limited to 'src/compiler_phase.html')
-rw-r--r-- | src/compiler_phase.html | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/compiler_phase.html b/src/compiler_phase.html new file mode 100644 index 00000000..8ca631e8 --- /dev/null +++ b/src/compiler_phase.html @@ -0,0 +1,33 @@ +<html> +<body> +<h2>Run the emscripten compiler in a web page, just for laughs</h2> +Open the web console to see stderr output +<hr> +<pre id="output"></pre> +<script> + arguments = ['tmp/emscripten_temp/tmpbTF9CI.txt', 'tmp/emscripten_temp/tmpz8Yvie.pre.ll', 'pre']; // copy from emscripten.py output + + var outputElement = document.getElementById('output'); + print = function(x) { + outputElement.innerHTML += 'output hidden, profiling mode'; + print = function(){}; + //outputElement.innerHTML += x; + }; + + // For generated code + var Module = { + print: function(x) { + throw 'what?' + } + }; + + var startTime = Date.now(); +</script> +<script src="compiler.js"> +</script> +<script> + outputElement.innerHTML += '<br>total time: ' + (Date.now() - startTime); +</script> +</body> +</html> + |