Index: test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden |
diff --git a/test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden b/test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9ba7fd9be3dddfc13c2bda86d79887581dc07d22 |
--- /dev/null |
+++ b/test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden |
@@ -0,0 +1,195 @@ |
+# |
+# Autogenerated by generate-bytecode-expectations. |
+# |
+ |
+--- |
+pool type: number |
+execute: yes |
+wrap: yes |
+ |
+--- |
+snippet: " |
+ var x = 0; |
+ while (x != 10) { |
+ x = x + 10; |
+ } |
+ return x; |
+" |
+frame size: 2 |
+parameter count: 1 |
+bytecode array length: 31 |
+bytecodes: [ |
+ B(StackCheck), |
+ B(LdaZero), |
+ B(Star), R(0), |
+ B(Ldar), R(0), |
+ B(Star), R(1), |
+ B(LdaSmi8), U8(10), |
+ B(TestEqual), R(1), |
+ B(LogicalNot), |
+ B(JumpIfFalse), U8(15), |
+ B(StackCheck), |
+ B(Ldar), R(0), |
+ B(Star), R(1), |
+ B(LdaSmi8), U8(10), |
+ B(Add), R(1), |
+ B(Star), R(0), |
+ B(Jump), U8(-22), |
+ B(Ldar), R(0), |
+ B(Return), |
+] |
+constant pool: [ |
+] |
+handlers: [ |
+] |
+ |
+--- |
+snippet: " |
+ var x = false; |
+ do { |
+ x = !x; |
+ } while(x == false); |
+ return x; |
+" |
+frame size: 2 |
+parameter count: 1 |
+bytecode array length: 22 |
+bytecodes: [ |
+ B(StackCheck), |
+ B(LdaFalse), |
+ B(Star), R(0), |
+ B(StackCheck), |
+ B(Ldar), R(0), |
+ B(LogicalNot), |
+ B(Star), R(0), |
+ B(Ldar), R(0), |
+ B(Star), R(1), |
+ B(LdaFalse), |
+ B(TestEqual), R(1), |
+ B(JumpIfTrue), U8(-13), |
+ B(Ldar), R(0), |
+ B(Return), |
+] |
+constant pool: [ |
+] |
+handlers: [ |
+] |
+ |
+--- |
+snippet: " |
+ var x = 101; |
+ return void(x * 3); |
+" |
+frame size: 2 |
+parameter count: 1 |
+bytecode array length: 13 |
+bytecodes: [ |
+ B(StackCheck), |
+ B(LdaSmi8), U8(101), |
+ B(Star), R(0), |
+ B(Star), R(1), |
+ B(LdaSmi8), U8(3), |
+ B(Mul), R(1), |
+ B(LdaUndefined), |
+ B(Return), |
+] |
+constant pool: [ |
+] |
+handlers: [ |
+] |
+ |
+--- |
+snippet: " |
+ var x = 1234; |
+ var y = void (x * x - 1); |
+ return y; |
+" |
+frame size: 4 |
+parameter count: 1 |
+bytecode array length: 21 |
+bytecodes: [ |
+ B(StackCheck), |
+ B(LdaConstant), U8(0), |
+ B(Star), R(0), |
+ B(Star), R(2), |
+ B(Ldar), R(0), |
+ B(Mul), R(2), |
+ B(Star), R(3), |
+ B(LdaSmi8), U8(1), |
+ B(Sub), R(3), |
+ B(LdaUndefined), |
+ B(Star), R(1), |
+ B(Return), |
+] |
+constant pool: [ |
+ 1234, |
+] |
+handlers: [ |
+] |
+ |
+--- |
+snippet: " |
+ var x = 13; |
+ return ~x; |
+" |
+frame size: 2 |
+parameter count: 1 |
+bytecode array length: 12 |
+bytecodes: [ |
+ B(StackCheck), |
+ B(LdaSmi8), U8(13), |
+ B(Star), R(0), |
+ B(Star), R(1), |
+ B(LdaSmi8), U8(-1), |
+ B(BitwiseXor), R(1), |
+ B(Return), |
+] |
+constant pool: [ |
+] |
+handlers: [ |
+] |
+ |
+--- |
+snippet: " |
+ var x = 13; |
+ return +x; |
+" |
+frame size: 2 |
+parameter count: 1 |
+bytecode array length: 12 |
+bytecodes: [ |
+ B(StackCheck), |
+ B(LdaSmi8), U8(13), |
+ B(Star), R(0), |
+ B(Star), R(1), |
+ B(LdaSmi8), U8(1), |
+ B(Mul), R(1), |
+ B(Return), |
+] |
+constant pool: [ |
+] |
+handlers: [ |
+] |
+ |
+--- |
+snippet: " |
+ var x = 13; |
+ return -x; |
+" |
+frame size: 2 |
+parameter count: 1 |
+bytecode array length: 12 |
+bytecodes: [ |
+ B(StackCheck), |
+ B(LdaSmi8), U8(13), |
+ B(Star), R(0), |
+ B(Star), R(1), |
+ B(LdaSmi8), U8(-1), |
+ B(Mul), R(1), |
+ B(Return), |
+] |
+constant pool: [ |
+] |
+handlers: [ |
+] |
+ |