git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
719f267
)
cutlastpush now handles newobject, newarray, too
author
kramm
<kramm>
Fri, 2 Jan 2009 19:46:28 +0000
(19:46 +0000)
committer
kramm
<kramm>
Fri, 2 Jan 2009 19:46:28 +0000
(19:46 +0000)
lib/as3/code.c
patch
|
blob
|
history
diff --git
a/lib/as3/code.c
b/lib/as3/code.c
index
8a729d4
..
2374392
100644
(file)
--- a/
lib/as3/code.c
+++ b/
lib/as3/code.c
@@
-1153,6
+1153,11
@@
code_t* cut_last_push(code_t*c)
} else if(c->opcode == OPCODE_CALLSUPER) {
c->opcode = OPCODE_CALLSUPERVOID;
return c;
+ } else if(c->opcode == OPCODE_NEWOBJECT ||
+ c->opcode == OPCODE_NEWARRAY) {
+ // we can discard these if they're not eating up stack parameters
+ if(!c->data[0])
+ return code_cutlast(c);
}
else
break;