forked from emscripten-core/emscripten
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompiler_phase.html
More file actions
33 lines (29 loc) · 797 Bytes
/
Copy pathcompiler_phase.html
File metadata and controls
33 lines (29 loc) · 797 Bytes
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
27
28
29
30
31
32
<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>