diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-09-25 15:40:06 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-09-25 15:40:06 -0700 |
commit | 6dda61e5fc7c89b759033319444017aff8e3605f (patch) | |
tree | f9acab4314382b85b47d90094a5402aea4749dd4 /src | |
parent | ac75b943b75f769ba0b754ba4577c8556dcd3047 (diff) |
add option to run funcs stage in the browser
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler_funcs.html | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/compiler_funcs.html b/src/compiler_funcs.html new file mode 100644 index 00000000..92553e8a --- /dev/null +++ b/src/compiler_funcs.html @@ -0,0 +1,26 @@ +<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/tmpffWtYF.txt', 'tmp/emscripten_temp/tmpnKzHrf.func_0.ll', 'funcs', 'tmp/emscripten_temp/tmpWD6y0W.json']; // copy from emscripten.py output + + var outputElement = document.getElementById('output'); + print = function(x) { + outputElement.innerHTML += x; + }; + + // For generated code + var Module = { + print: function(x) { + outputElement.innerHTML += x; + } + }; +</script> +<script src="compiler.js"> +</script> +</body> +</html> + |