as3 execute: verify code before executing

This commit is contained in:
honfika@gmail.com
2015-11-08 12:59:04 +01:00
parent d61bce6bb8
commit 6c0462caf8

View File

@@ -665,6 +665,10 @@ public class AVM2Code implements Cloneable {
lda.localRegisters = arguments;
lda.runtime = runtime;
lda.runtimeVersion = runtimeVersoin;
for (AVM2Instruction ins : code) {
ins.definition.verify(lda, constants, ins);
}
while (pos < code.size()) {
AVM2Instruction ins = code.get(pos);
if (!ins.definition.execute(lda, constants, ins)) {