[swfinterp] Implement equals opcode

pull/4237/head
Philipp Hagemeister 2014-11-17 04:27:51 +01:00
rodzic 3cbcff8a2d
commit eb5376044c
2 zmienionych plików z 15 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,10 @@
// input: []
// output: false
package {
public class EqualsOperator {
public static function main():Boolean{
return 1 == 2;
}
}
}

Wyświetl plik

@ -629,6 +629,11 @@ class SWFInterpreter(object):
value1 = stack.pop()
res = value1 % value2
stack.append(res)
elif opcode == 171: # equals
value2 = stack.pop()
value1 = stack.pop()
result = value1 == value2
stack.append(result)
elif opcode == 175: # greaterequals
value2 = stack.pop()
value1 = stack.pop()