From b90385b079862b0d397eb822fd2a443343f63eda Mon Sep 17 00:00:00 2001 From: Adam Boniecki Date: Mon, 21 Aug 2017 00:13:21 +0200 Subject: [PATCH] Remove excess padding from EXTENDED_ARG --- batavia/VirtualMachine.js | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/batavia/VirtualMachine.js b/batavia/VirtualMachine.js index de88a6885..66866d81e 100644 --- a/batavia/VirtualMachine.js +++ b/batavia/VirtualMachine.js @@ -837,7 +837,7 @@ VirtualMachine.prototype.unpack_code = function(code) { lo = code.co_code.val[pos++] hi = code.co_code.val[pos++] extra = (lo << 16) | (hi << 24) - // emulate four NOPs + // emulate NOP unpacked_code[opcode_start_pos] = { 'opoffset': opcode_start_pos, 'opcode': dis.NOP, @@ -845,27 +845,6 @@ VirtualMachine.prototype.unpack_code = function(code) { 'args': [], 'next_pos': pos } - unpacked_code[opcode_start_pos + 1] = { - 'opoffset': opcode_start_pos + 1, - 'opcode': dis.NOP, - 'op_method': this.dispatch_table[dis.NOP], - 'args': [], - 'next_pos': pos - } - unpacked_code[opcode_start_pos + 2] = { - 'opoffset': opcode_start_pos + 2, - 'opcode': dis.NOP, - 'op_method': this.dispatch_table[dis.NOP], - 'args': [], - 'next_pos': pos - } - unpacked_code[opcode_start_pos + 3] = { - 'opoffset': opcode_start_pos + 3, - 'opcode': dis.NOP, - 'op_method': this.dispatch_table[dis.NOP], - 'args': [], - 'next_pos': pos - } continue }