Removed trailing whitespace and reorganized things
This commit is contained in:
@@ -3,7 +3,6 @@ op = require("./opcodes");
|
||||
var INT_MIN = 0x80000000;
|
||||
var INT_MAX = 0x7FFFFFFF;
|
||||
|
||||
var verbose = false;
|
||||
function log(message) {
|
||||
if (verbose) console.log(message);
|
||||
}
|
||||
|
||||
@@ -2,19 +2,9 @@ parser = require("./bytecode-parser");
|
||||
c0vm = require("./c0vm.js");
|
||||
c0ffi = require("./c0ffi.js");
|
||||
|
||||
// console.log("Reading in sample bytecode file:");
|
||||
// console.log(parser.getBytes("../test/test.bc0"));
|
||||
// console.log("That was the sample bytecode file" +
|
||||
// " -- it probably took up your whole terminal screen.");
|
||||
// var file = parser.parse("../test/test.bc0");
|
||||
// console.log(file);
|
||||
// console.log(file.function_pool[0].code);
|
||||
|
||||
// UI interaction functions
|
||||
|
||||
function print(arg) {
|
||||
// $("#output").append(arg);
|
||||
|
||||
$("#output").val($("#output").val() + arg);
|
||||
}
|
||||
|
||||
@@ -53,5 +43,5 @@ $("#run").click(function() {
|
||||
$("#output").val("");
|
||||
|
||||
var file = parser.parse($("#bytecode").val());
|
||||
print(c0vm.execute(file, callbacks));
|
||||
c0vm.execute(file, callbacks, true);
|
||||
});
|
||||
|
||||
@@ -319,6 +319,10 @@ callbacks[exports.NATIVE_STRING_COMPARE] = function(args) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
callbacks[exports.NATIVE_STRING_EQUAL] = function(args) {
|
||||
return args[0] === args[1];
|
||||
}
|
||||
|
||||
exports.default_callbacks = callbacks;
|
||||
|
||||
},{}],4:[function(require,module,exports){
|
||||
@@ -327,7 +331,6 @@ op = require("./opcodes");
|
||||
var INT_MIN = 0x80000000;
|
||||
var INT_MAX = 0x7FFFFFFF;
|
||||
|
||||
var verbose = false;
|
||||
function log(message) {
|
||||
if (verbose) console.log(message);
|
||||
}
|
||||
@@ -864,19 +867,9 @@ parser = require("./bytecode-parser");
|
||||
c0vm = require("./c0vm.js");
|
||||
c0ffi = require("./c0ffi.js");
|
||||
|
||||
// console.log("Reading in sample bytecode file:");
|
||||
// console.log(parser.getBytes("../test/test.bc0"));
|
||||
// console.log("That was the sample bytecode file" +
|
||||
// " -- it probably took up your whole terminal screen.");
|
||||
// var file = parser.parse("../test/test.bc0");
|
||||
// console.log(file);
|
||||
// console.log(file.function_pool[0].code);
|
||||
|
||||
// UI interaction functions
|
||||
|
||||
function print(arg) {
|
||||
// $("#output").append(arg);
|
||||
|
||||
$("#output").val($("#output").val() + arg);
|
||||
}
|
||||
|
||||
@@ -915,7 +908,7 @@ $("#run").click(function() {
|
||||
$("#output").val("");
|
||||
|
||||
var file = parser.parse($("#bytecode").val());
|
||||
print(c0vm.execute(file, callbacks));
|
||||
c0vm.execute(file, callbacks, true);
|
||||
});
|
||||
|
||||
},{"./bytecode-parser":2,"./c0ffi.js":3,"./c0vm.js":4}],6:[function(require,module,exports){
|
||||
|
||||
Reference in New Issue
Block a user