v8/test/cctest/interpreter/bytecode_expectations/Generators.golden
Yolanda Chen b63dfdb2fd [interpreter] Release temp register earlier to reduce frame size
Some temp register slots are only used in a short range at the begining
of a statement or expression. They can be released earlier to save a
slot for later use. After the change, we can see frame size reduced in
the switch, class literal and ForOf tests.

Bug: v8:12940
Change-Id: I17b412d89353206fc01248cb3eefd2c678bc4ebb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3688565
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Yolanda Chen <yolanda.chen@intel.com>
Cr-Commit-Position: refs/heads/main@{#81021}
2022-06-09 08:13:43 +00:00

315 lines
10 KiB
Plaintext

#
# Autogenerated by generate-bytecode-expectations.
#
---
wrap: no
test function name: f
---
snippet: "
function* f() { }
f();
"
frame size: 3
parameter count: 1
bytecode array length: 41
bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(Mov), R(closure), R(1),
B(Mov), R(this), R(2),
/* 11 E> */ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(1), U8(2),
B(Star0),
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(1), U8(0),
B(ResumeGenerator), R(0), R(0), U8(1),
B(Star1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
B(Ldar), R(1),
/* 11 E> */ B(Throw),
B(Ldar), R(1),
B(Return),
B(LdaUndefined),
/* 16 S> */ B(Return),
]
constant pool: [
Smi [20],
Smi [10],
Smi [7],
]
handlers: [
]
---
snippet: "
function* f() { yield 42 }
f();
"
frame size: 3
parameter count: 1
bytecode array length: 74
bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(1),
B(Mov), R(this), R(2),
/* 11 E> */ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(1), U8(2),
B(Star0),
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(1), U8(0),
B(ResumeGenerator), R(0), R(0), U8(1),
B(Star1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
B(Ldar), R(1),
/* 11 E> */ B(Throw),
B(Ldar), R(1),
B(Return),
/* 16 S> */ B(LdaSmi), I8(42),
B(Star1),
B(LdaFalse),
B(Star2),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(1), U8(2),
/* 16 E> */ B(SuspendGenerator), R(0), R(0), U8(1), U8(1),
B(ResumeGenerator), R(0), R(0), U8(1),
B(Star1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(4), U8(2), I8(0),
B(Ldar), R(1),
/* 16 E> */ B(Throw),
B(Ldar), R(1),
B(Return),
B(LdaUndefined),
/* 25 S> */ B(Return),
]
constant pool: [
Smi [20],
Smi [53],
Smi [10],
Smi [7],
Smi [10],
Smi [7],
]
handlers: [
]
---
snippet: "
function* f() { for (let x of [42]) yield x }
f();
"
frame size: 13
parameter count: 1
bytecode array length: 201
bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(4),
B(Mov), R(this), R(5),
/* 11 E> */ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(4), U8(2),
B(Star0),
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
B(ResumeGenerator), R(0), R(0), U8(4),
B(Star4),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
B(Ldar), R(4),
/* 11 E> */ B(Throw),
B(Ldar), R(4),
B(Return),
/* 30 S> */ B(CreateArrayLiteral), U8(4), U8(0), U8(37),
B(Star6),
B(GetIterator), R(6), U8(1), U8(3),
B(Star5),
B(GetNamedProperty), R(5), U8(5), U8(5),
B(Star4),
B(LdaFalse),
B(Star6),
B(Mov), R(context), R(9),
B(LdaTrue),
B(Star6),
/* 25 S> */ B(CallProperty0), R(4), R(5), U8(7),
B(Star10),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
B(GetNamedProperty), R(10), U8(6), U8(9),
B(JumpIfToBooleanTrue), U8(56),
B(GetNamedProperty), R(10), U8(7), U8(11),
B(Star10),
B(LdaFalse),
B(Star6),
B(Mov), R(10), R(1),
/* 25 S> */ B(Mov), R(1), R(3),
/* 36 S> */ B(LdaFalse),
B(Star11),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(10), U8(2),
/* 36 E> */ B(SuspendGenerator), R(0), R(0), U8(10), U8(1),
B(ResumeGenerator), R(0), R(0), U8(10),
B(Star10),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(8), U8(2), I8(0),
B(Ldar), R(10),
/* 36 E> */ B(Throw),
B(LdaSmi), I8(1),
B(Star7),
B(Mov), R(10), R(8),
B(Jump), U8(17),
B(Ldar), R(10),
/* 16 E> */ B(JumpLoop), U8(70), I8(0), U8(13),
B(LdaSmi), I8(-1),
B(Star8),
B(Star7),
B(Jump), U8(5),
B(Star8),
B(LdaZero),
B(Star7),
B(LdaTheHole),
B(SetPendingMessage),
B(Star9),
B(Ldar), R(6),
B(JumpIfToBooleanTrue), U8(35),
B(Mov), R(context), R(10),
B(GetNamedProperty), R(5), U8(10), U8(14),
B(JumpIfUndefinedOrNull), U8(26),
B(Star11),
B(CallProperty0), R(11), R(5), U8(16),
B(JumpIfJSReceiver), U8(19),
B(Star12),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
B(Jump), U8(11),
B(Star10),
B(LdaZero),
B(TestReferenceEqual), R(7),
B(JumpIfTrue), U8(5),
B(Ldar), R(10),
B(ReThrow),
B(Ldar), R(9),
B(SetPendingMessage),
B(Ldar), R(7),
B(SwitchOnSmiNoFeedback), U8(11), U8(2), I8(0),
B(Jump), U8(8),
B(Ldar), R(8),
B(ReThrow),
B(Ldar), R(8),
B(Return),
B(LdaUndefined),
/* 44 S> */ B(Return),
]
constant pool: [
Smi [20],
Smi [103],
Smi [10],
Smi [7],
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
Smi [15],
Smi [7],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
Smi [6],
Smi [9],
]
handlers: [
[59, 133, 139],
[152, 171, 173],
]
---
snippet: "
function* g() { yield 42 }
function* f() { yield* g() }
f();
"
frame size: 7
parameter count: 1
bytecode array length: 182
bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(1),
B(Mov), R(this), R(2),
/* 38 E> */ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(1), U8(2),
B(Star0),
/* 38 E> */ B(SuspendGenerator), R(0), R(0), U8(1), U8(0),
B(ResumeGenerator), R(0), R(0), U8(1),
B(Star1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
B(Ldar), R(1),
/* 38 E> */ B(Throw),
B(Ldar), R(1),
B(Return),
/* 43 S> */ B(LdaGlobal), U8(4), U8(0),
B(Star5),
/* 50 E> */ B(CallUndefinedReceiver0), R(5), U8(2),
B(Star6),
B(GetIterator), R(6), U8(4), U8(6),
B(Star3),
B(GetNamedProperty), R(3), U8(5), U8(8),
B(Star5),
B(LdaUndefined),
B(Star4),
B(LdaZero),
B(Star2),
B(Ldar), R(2),
B(SwitchOnSmiNoFeedback), U8(6), U8(2), I8(1),
B(CallProperty1), R(5), R(3), R(4), U8(10),
B(Jump), U8(59),
B(GetNamedProperty), R(3), U8(8), U8(12),
B(JumpIfUndefinedOrNull), U8(10),
B(Star6),
B(CallProperty1), R(6), R(3), R(4), U8(14),
B(Jump), U8(45),
B(Ldar), R(4),
B(Return),
B(GetNamedProperty), R(3), U8(9), U8(16),
B(JumpIfUndefinedOrNull), U8(10),
B(Star6),
B(CallProperty1), R(6), R(3), R(4), U8(18),
B(Jump), U8(28),
B(GetNamedProperty), R(3), U8(8), U8(20),
B(JumpIfUndefinedOrNull), U8(17),
B(Star6),
B(CallProperty0), R(6), R(3), U8(22),
B(Jump), U8(2),
B(JumpIfJSReceiver), U8(8),
B(Star6),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
B(CallRuntime), U16(Runtime::kThrowThrowMethodMissing), R(0), U8(0),
B(Star1),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(1), U8(1),
B(GetNamedProperty), R(1), U8(10), U8(24),
B(JumpIfToBooleanTrue), U8(23),
B(Ldar), R(1),
/* 43 E> */ B(SuspendGenerator), R(0), R(0), U8(6), U8(1),
B(ResumeGenerator), R(0), R(0), U8(6),
B(Star4),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(Star2),
B(JumpLoop), U8(101), I8(0), U8(26),
B(GetNamedProperty), R(1), U8(11), U8(27),
B(Star3),
B(LdaSmi), I8(1),
B(TestReferenceEqual), R(2),
B(JumpIfFalse), U8(5),
B(Ldar), R(3),
B(Return),
B(LdaUndefined),
/* 54 S> */ B(Return),
]
constant pool: [
Smi [20],
Smi [152],
Smi [10],
Smi [7],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["g"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
Smi [11],
Smi [28],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["throw"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
]
handlers: [
]