Added compiler and virtual machine JS

This commit is contained in:
Dale Weiler 2012-11-12 13:57:34 +00:00
parent d7058e8ada
commit 44cc17a0e1
4 changed files with 78171 additions and 18 deletions

File diff suppressed because one or more lines are too long

22093
javascripts/vm.js Normal file

File diff suppressed because it is too large Load diff

BIN
qcvm Executable file

Binary file not shown.

View file

@ -8,7 +8,7 @@
<link rel="stylesheet" href="stylesheets/styles.css">
<link rel="stylesheet" href="stylesheets/pygment_trac.css">
<script src="javascripts/scale.fix.js"></script>
<script src="javascripts/compiler.js"></script>
<script src="javascript/vm.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@ -56,6 +56,34 @@
<script type="text/javascript" src="http://www.ohloh.net/p/602517/widgets/project_partner_badge.js"></script>
</footer>
</div>
<script type='text/javascript'>
var Module = {
preRun: [],
noInitialRun: true,
postRun: [],
print: (function() {
var element = document.getElementById('output');
element.value = ''; // clear browser cache
return function(text) {
// These replacements are necessary if you render to raw HTML
//text = text.replace(/&/g, "&amp;");
//text = text.replace(/</g, "&lt;");
//text = text.replace(/>/g, "&gt;");
//text = text.replace('\n', '<br>', 'g');
element.value += text + "\n";
element.scrollTop = 99999; // focus on bottom
};
})(),
printErr: function(text) {
if (0) { // XXX disabled for safety typeof dump == 'function') {
dump(text + '\n'); // fast, straight to the real console
} else {
console.log(text);
}
}
};
</script>
<script src="javascripts/compiler.js"></script>
<!--[if !IE]><script>fixScale(document);</script><![endif]-->
</body>
</body>
</html>