Index: test/cctest/interpreter/ArrayLiterals.golden |
diff --git a/test/cctest/interpreter/ArrayLiterals.golden b/test/cctest/interpreter/ArrayLiterals.golden |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e515be870f6973ce8f357c032c3b9ff969822b9e |
--- /dev/null |
+++ b/test/cctest/interpreter/ArrayLiterals.golden |
@@ -0,0 +1,121 @@ |
+# |
+# Autogenerated by generate-bytecode-expectations |
+# |
+ |
+--- |
+pool type: mixed |
+execute: yes |
+wrap: yes |
+ |
+--- |
+snippet: " |
+ return [ 1, 2 ]; |
+" |
+frame size: 0 |
+parameter count: 1 |
+bytecodes: [ |
+ B(StackCheck), |
+ B(CreateArrayLiteral), U8(0), U8(0), U8(3), |
+ B(Return), |
+] |
+constant pool: [ |
+ InstanceType::FIXED_ARRAY_TYPE, |
+] |
+handlers: [ |
+] |
+ |
+--- |
+snippet: " |
+ var a = 1; return [ a, a + 1 ]; |
+" |
+frame size: 4 # in multiples of sizeof(void*) |
rmcilroy
2016/02/22 21:49:49
nit - drop the comment here
Stefano Sanfilippo
2016/02/23 15:57:18
Done.
|
+parameter count: 1 |
+bytecodes: [ |
+ B(StackCheck), |
+ B(LdaSmi8), U8(1), |
+ B(Star), R(0), |
+ B(CreateArrayLiteral), U8(0), U8(0), U8(3), |
+ B(Star), R(2), |
+ B(LdaZero), |
+ B(Star), R(1), |
+ B(Ldar), R(0), |
+ B(KeyedStoreICSloppy), R(2), R(1), U8(1), |
+ B(LdaSmi8), U8(1), |
+ B(Star), R(1), |
+ B(Ldar), R(0), |
+ B(Star), R(3), |
+ B(LdaSmi8), U8(1), |
+ B(Add), R(3), |
+ B(KeyedStoreICSloppy), R(2), R(1), U8(1), |
+ B(Ldar), R(2), |
+ B(Return), |
+] |
+constant pool: [ |
+ InstanceType::FIXED_ARRAY_TYPE, |
+] |
+handlers: [ |
+] |
+ |
+--- |
+snippet: " |
+ return [ [ 1, 2 ], [ 3 ] ]; |
+" |
+frame size: 0 |
+parameter count: 1 |
+bytecodes: [ |
+ B(StackCheck), |
+ B(CreateArrayLiteral), U8(0), U8(2), U8(2), |
+ B(Return), |
+] |
+constant pool: [ |
+ InstanceType::FIXED_ARRAY_TYPE, |
+] |
+handlers: [ |
+] |
+ |
+--- |
+snippet: " |
+ var a = 1; return [ [ a, 2 ], [ a + 2 ] ]; |
+" |
+frame size: 6 # in multiples of sizeof(void*) |
+parameter count: 1 |
rmcilroy
2016/02/22 21:49:49
Could you add a bytecode length field - this would
Stefano Sanfilippo
2016/02/23 15:57:18
Done.
|
+bytecodes: [ |
+ B(StackCheck), |
+ B(LdaSmi8), U8(1), |
+ B(Star), R(0), |
+ B(CreateArrayLiteral), U8(0), U8(2), U8(2), |
+ B(Star), R(2), |
+ B(LdaZero), |
+ B(Star), R(1), |
+ B(CreateArrayLiteral), U8(1), U8(0), U8(3), |
+ B(Star), R(4), |
+ B(LdaZero), |
+ B(Star), R(3), |
+ B(Ldar), R(0), |
+ B(KeyedStoreICSloppy), R(4), R(3), U8(1), |
+ B(Ldar), R(4), |
+ B(KeyedStoreICSloppy), R(2), R(1), U8(5), |
+ B(LdaSmi8), U8(1), |
+ B(Star), R(1), |
+ B(CreateArrayLiteral), U8(2), U8(1), U8(3), |
+ B(Star), R(4), |
+ B(LdaZero), |
+ B(Star), R(3), |
+ B(Ldar), R(0), |
+ B(Star), R(5), |
+ B(LdaSmi8), U8(2), |
+ B(Add), R(5), |
+ B(KeyedStoreICSloppy), R(4), R(3), U8(3), |
+ B(Ldar), R(4), |
+ B(KeyedStoreICSloppy), R(2), R(1), U8(5), |
+ B(Ldar), R(2), |
+ B(Return), |
+] |
+constant pool: [ |
+ InstanceType::FIXED_ARRAY_TYPE, |
+ InstanceType::FIXED_ARRAY_TYPE, |
+ InstanceType::FIXED_ARRAY_TYPE, |
+] |
+handlers: [ |
+] |
+ |