aboutsummaryrefslogtreecommitdiff
path: root/src/compiler_funcs.html
blob: 92553e8a778ecfb33d28d20c05b84ca2d21d4307 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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>