Added breakpoints and added LESS
This commit is contained in:
@@ -1 +1,28 @@
|
||||
.code{font-family:"DejaVu Sans Mono",Consolas,monospace;width:100%;border-radius:4px;padding:4px;border-color:#ddd;max-height:300px;overflow-y:auto}.brad{font-family:"Courier New",Courier,monospace;font-size:26pt;color:#166d00}.brad :hover{text-decoration:none}nav{background-color:#d8d8d8}.lbl{font-weight:bold;margin-bottom:4px}.btm-btn{margin-bottom:4px;margin-top:-14px}
|
||||
.code {
|
||||
font-family: "DejaVu Sans Mono", Consolas, monospace;
|
||||
width: 100%;
|
||||
border-radius: 4px;
|
||||
padding: 4px;
|
||||
border-color: #ddd;
|
||||
max-height: 300px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.brad {
|
||||
font-family: "Courier New", Courier, monospace;
|
||||
font-size: 26pt;
|
||||
color: #166d00;
|
||||
}
|
||||
.brad :hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
nav {
|
||||
background-color: #d8d8d8;
|
||||
}
|
||||
.lbl {
|
||||
font-weight: bold;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.btm-btn {
|
||||
margin-bottom: 4px;
|
||||
margin-top: -10px;
|
||||
}
|
||||
|
||||
@@ -29,5 +29,8 @@ nav {
|
||||
|
||||
.btm-btn {
|
||||
margin-bottom: 4px;
|
||||
margin-top: -14px;
|
||||
margin-top: -10px;
|
||||
}
|
||||
|
||||
.no_disp {
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ var INT_MIN = 0x80000000;
|
||||
var INT_MAX = 0x7FFFFFFF;
|
||||
|
||||
function log(message) {
|
||||
if (verbose) console.log(message);
|
||||
if (verbose) $("#internals").val($("#internals").val() + "\n" + message);
|
||||
}
|
||||
|
||||
function c0_assertion_failure(val) {
|
||||
@@ -500,7 +500,7 @@ function run_vm(vm) {
|
||||
}
|
||||
|
||||
var val = vm.step();
|
||||
if (val !== undefined) return val;
|
||||
if (val !== undefined) return vm;
|
||||
|
||||
if (verbose) {
|
||||
console.log("Machine vm:");
|
||||
|
||||
@@ -43,5 +43,27 @@ $("#run").click(function() {
|
||||
$("#output").val("");
|
||||
|
||||
var file = parser.parse($("#bytecode").val());
|
||||
c0vm.execute(file, callbacks, true);
|
||||
state = c0vm.execute(file, callbacks, true);
|
||||
state = c0vm.initialize_vm(file, callbacks, true);
|
||||
});
|
||||
|
||||
$("#break").click(function() {
|
||||
var input = $("#breakpoints").val().replace(/(\r\n|\n|\r)/gm,"");
|
||||
var temp = input.split(",");
|
||||
for (a in temp) {
|
||||
temp2 = temp[a].split(" ");
|
||||
state.set_breakpoint(parseInt(temp2[0], 10), parseInt(temp2[1], 10));
|
||||
}
|
||||
|
||||
$("#output").val("");
|
||||
$("#breakpoints").val("");
|
||||
$("#internals").val("");
|
||||
});
|
||||
|
||||
$("#continue").click(function () {
|
||||
c0vm.run_vm(state);
|
||||
});
|
||||
|
||||
$("#step").click(function () {
|
||||
state.step();
|
||||
});
|
||||
|
||||
@@ -332,7 +332,7 @@ var INT_MIN = 0x80000000;
|
||||
var INT_MAX = 0x7FFFFFFF;
|
||||
|
||||
function log(message) {
|
||||
if (verbose) console.log(message);
|
||||
if (verbose) $("#internals").val($("#internals").val() + "\n" + message);
|
||||
}
|
||||
|
||||
function c0_assertion_failure(val) {
|
||||
@@ -828,7 +828,7 @@ function run_vm(vm) {
|
||||
}
|
||||
|
||||
var val = vm.step();
|
||||
if (val !== undefined) return val;
|
||||
if (val !== undefined) return vm;
|
||||
|
||||
if (verbose) {
|
||||
console.log("Machine vm:");
|
||||
@@ -908,7 +908,29 @@ $("#run").click(function() {
|
||||
$("#output").val("");
|
||||
|
||||
var file = parser.parse($("#bytecode").val());
|
||||
c0vm.execute(file, callbacks, true);
|
||||
state = c0vm.execute(file, callbacks, true);
|
||||
state = c0vm.initialize_vm(file, callbacks, true);
|
||||
});
|
||||
|
||||
$("#break").click(function() {
|
||||
var input = $("#breakpoints").val().replace(/(\r\n|\n|\r)/gm,"");
|
||||
var temp = input.split(",");
|
||||
for (a in temp) {
|
||||
temp2 = temp[a].split(" ");
|
||||
state.set_breakpoint(parseInt(temp2[0], 10), parseInt(temp2[1], 10));
|
||||
}
|
||||
|
||||
$("#output").val("");
|
||||
$("#breakpoints").val("");
|
||||
$("#internals").val("");
|
||||
});
|
||||
|
||||
$("#continue").click(function () {
|
||||
c0vm.run_vm(state);
|
||||
});
|
||||
|
||||
$("#step").click(function () {
|
||||
state.step();
|
||||
});
|
||||
|
||||
},{"./bytecode-parser":2,"./c0ffi.js":3,"./c0vm.js":4}],6:[function(require,module,exports){
|
||||
|
||||
Reference in New Issue
Block a user