Simplify execution by removing nextBlock

Everything is managed by the stack, including what the execute() function does.
This commit is contained in:
Tim Mickel 2016-06-09 17:08:30 -04:00
parent 2cd6bf93bb
commit 526a260101
4 changed files with 70 additions and 57 deletions
src/engine

View file

@ -122,6 +122,7 @@ Runtime.prototype.getOpcodeFunction = function (opcode) {
Runtime.prototype._pushThread = function (id) {
this.emit(Runtime.STACK_GLOW_ON, id);
var thread = new Thread(id);
thread.pushStack(id);
this.threads.push(thread);
};