0
@@ -2,6 +2,8 @@ class Pyasm
0
+ VM_CALL_FCALL_BIT = 0x08
0
@@ -11,7 +13,7 @@ class Pyasm
0
def initialize(fname, type = nil, name = "<module>", lineno = 0)
0
@argc, @nlocals, @stacksize, @flags, @filename, @lineno, @name, @stack, @nopop, @type =
0
0, 0, 1, CO_NOFREE, fname, lineno, name, [], 0, type
0
- @flags |= CO_NEWLOCALS if type == :class
0
+ @flags |= CO_NEWLOCALS if [:class, :method].include?(type)
0
@bytecode, @varsyms, @labels, @lines, @jumps = [], [], {}, [], {}
0
@@ -200,7 +202,7 @@ class Pyasm
0
bytes = @bytecode.slice! idx..-1
0
@@ -220,7 +222,9 @@ class Pyasm
0
bytes = @bytecode.slice! idx..-1
0
@@ -228,7 +232,7 @@ class Pyasm
0
- pop_top unless @nopop > 0
0
+ pop_top unless @nopop > 0 or @stack.empty?
0
@@ -277,7 +281,7 @@ class Pyasm
0
# this is a bit redundant, but decompyle requires it
0
+ if type == :method and @type == nil
Comments
No one has commented yet.