v8/test/unittests/interpreter/bytecode_expectations/ArrayLiterals.golden
jameslahm b3d004aaf9 [test] Move cctest/interpreter to unittests
... /interpreter.

This CL moves cctest/interpreter/{bytecode-expectations-printer,
test-bytecode-generator, test-interpreter-intrinsics,
interpreter-tester, test-interpreter, test-source-positions,
source-position-matcher} to unittests/interpreter/{
bytecode-expectations-printer, bytecode-generator-unittest,
interpreter-intrinsics-unittest, interpreter-tester,
interpreter-unittest, source-positions-unittest, source-position-matcher}.

Bug: v8:12781
Change-Id: I187583bd34f709dd0d7dfc0f92e18f191da0e30f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3609752
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81057}
2022-06-10 08:37:10 +00:00

204 lines
4.9 KiB
Plaintext

#
# Autogenerated by generate-bytecode-expectations.
#
---
wrap: yes
---
snippet: "
return [ 1, 2 ];
"
frame size: 0
parameter count: 1
bytecode array length: 5
bytecodes: [
/* 34 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
/* 50 S> */ B(Return),
]
constant pool: [
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
]
handlers: [
]
---
snippet: "
var a = 1; return [ a, a + 1 ];
"
frame size: 3
parameter count: 1
bytecode array length: 31
bytecodes: [
/* 42 S> */ B(LdaSmi), I8(1),
B(Star0),
/* 45 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
B(Star2),
B(LdaZero),
B(Star1),
B(Ldar), R(0),
/* 54 E> */ B(StaInArrayLiteral), R(2), R(1), U8(1),
B(LdaSmi), I8(1),
B(Star1),
B(Ldar), R(0),
/* 59 E> */ B(AddSmi), I8(1), U8(3),
B(StaInArrayLiteral), R(2), R(1), U8(1),
B(Ldar), R(2),
/* 65 S> */ B(Return),
]
constant pool: [
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
]
handlers: [
]
---
snippet: "
return [ [ 1, 2 ], [ 3 ] ];
"
frame size: 0
parameter count: 1
bytecode array length: 5
bytecodes: [
/* 34 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(4),
/* 61 S> */ B(Return),
]
constant pool: [
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
]
handlers: [
]
---
snippet: "
var a = 1; return [ [ a, 2 ], [ a + 2 ] ];
"
frame size: 5
parameter count: 1
bytecode array length: 57
bytecodes: [
/* 42 S> */ B(LdaSmi), I8(1),
B(Star0),
/* 45 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(4),
B(Star2),
B(LdaZero),
B(Star1),
B(CreateArrayLiteral), U8(1), U8(1), U8(37),
B(Star4),
B(LdaZero),
B(Star3),
B(Ldar), R(0),
/* 56 E> */ B(StaInArrayLiteral), R(4), R(3), U8(2),
B(Ldar), R(4),
B(StaInArrayLiteral), R(2), R(1), U8(4),
B(LdaSmi), I8(1),
B(Star1),
B(CreateArrayLiteral), U8(2), U8(6), U8(37),
B(Star4),
B(LdaZero),
B(Star3),
B(Ldar), R(0),
/* 68 E> */ B(AddSmi), I8(2), U8(7),
B(StaInArrayLiteral), R(4), R(3), U8(8),
B(Ldar), R(4),
B(StaInArrayLiteral), R(2), R(1), U8(4),
B(Ldar), R(2),
/* 76 S> */ B(Return),
]
constant pool: [
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
]
handlers: [
]
---
snippet: "
var a = [ 1, 2 ]; return [ ...a ];
"
frame size: 1
parameter count: 1
bytecode array length: 7
bytecodes: [
/* 42 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
B(Star0),
/* 64 S> */ B(CreateArrayFromIterable),
/* 68 S> */ B(Return),
]
constant pool: [
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
]
handlers: [
]
---
snippet: "
var a = [ 1, 2 ]; return [ 0, ...a ];
"
frame size: 6
parameter count: 1
bytecode array length: 61
bytecodes: [
/* 42 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
B(Star0),
/* 52 S> */ B(CreateArrayLiteral), U8(1), U8(1), U8(37),
B(Star2),
B(LdaSmi), I8(1),
/* 67 S> */ B(Star1),
/* 67 E> */ B(GetIterator), R(0), U8(2), U8(4),
B(Star4),
B(GetNamedProperty), R(4), U8(2), U8(6),
B(Star3),
B(CallProperty0), R(3), R(4), U8(15),
B(Star5),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
B(GetNamedProperty), R(5), U8(3), U8(17),
B(JumpIfToBooleanTrue), U8(19),
B(GetNamedProperty), R(5), U8(4), U8(8),
B(StaInArrayLiteral), R(2), R(1), U8(13),
B(Ldar), R(1),
B(Inc), U8(12),
B(Star1),
B(JumpLoop), U8(31), I8(0), U8(19),
B(Ldar), R(2),
/* 71 S> */ B(Return),
]
constant pool: [
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
]
handlers: [
]
---
snippet: "
var a = [ 1, 2 ]; return [ ...a, 3 ];
"
frame size: 3
parameter count: 1
bytecode array length: 21
bytecodes: [
/* 42 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
B(Star0),
/* 64 S> */ B(CreateArrayFromIterable),
B(Star2),
B(GetNamedProperty), R(2), U8(1), U8(1),
B(Star1),
B(LdaSmi), I8(3),
B(StaInArrayLiteral), R(2), R(1), U8(3),
B(Ldar), R(2),
/* 71 S> */ B(Return),
]
constant pool: [
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["length"],
]
handlers: [
]