Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(540)

Unified Diff: test/cctest/interpreter/bytecode_expectations/ForOf.golden

Issue 1717293002: [Interpreter] Refactor bytecode generator test suite. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Reflow REPEAT_249 macro. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/cctest/interpreter/bytecode_expectations/ForOf.golden
diff --git a/test/cctest/interpreter/bytecode_expectations/ForOf.golden b/test/cctest/interpreter/bytecode_expectations/ForOf.golden
new file mode 100644
index 0000000000000000000000000000000000000000..f3ad010de861d0fa595c3a1249a7679392a915c7
--- /dev/null
+++ b/test/cctest/interpreter/bytecode_expectations/ForOf.golden
@@ -0,0 +1,250 @@
+#
+# Autogenerated by generate-bytecode-expectations.
+#
+
+---
+pool type: mixed
+execute: yes
+wrap: yes
+
+---
+snippet: "
+ for (var p of [0, 1, 2]) {}
+"
+frame size: 7
+parameter count: 1
+bytecode array length: 86
+bytecodes: [
+ B(StackCheck),
+ B(CreateArrayLiteral), U8(0), U8(0), U8(3),
+ B(Star), R(5),
+ B(LdaConstant), U8(1),
+ B(KeyedLoadIC), R(5), U8(3),
+ B(Star), R(4),
+ B(Call), R(4), R(5), U8(1), U8(1),
+ B(Star), R(1),
+ B(Ldar), R(1),
+ B(Star), R(6),
+ B(LoadIC), R(6), U8(2), U8(7),
+ B(Star), R(5),
+ B(Call), R(5), R(6), U8(1), U8(5),
+ B(Star), R(2),
+ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::k_IsJSReceiver), R(4), U8(1),
+ B(LogicalNot),
+ B(JumpIfFalse), U8(11),
+ B(Ldar), R(2),
+ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(4), U8(1),
+ B(Ldar), R(2),
+ B(Star), R(4),
+ B(LoadIC), R(4), U8(3), U8(9),
+ B(JumpIfToBooleanTrue), U8(19),
+ B(Ldar), R(2),
+ B(Star), R(4),
+ B(LoadIC), R(4), U8(4), U8(11),
+ B(Star), R(0),
+ B(StackCheck),
+ B(Ldar), R(0),
+ B(Star), R(3),
+ B(Jump), U8(-61),
+ B(LdaUndefined),
+ B(Return),
+]
+constant pool: [
+ InstanceType::FIXED_ARRAY_TYPE,
+ InstanceType::SYMBOL_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ var x = 'potatoes';
+ for (var p of x) { return p; }
+"
+frame size: 8
+parameter count: 1
+bytecode array length: 85
+bytecodes: [
+ B(StackCheck),
+ B(LdaConstant), U8(0),
+ B(Star), R(3),
+ B(Star), R(6),
+ B(LdaConstant), U8(1),
+ B(KeyedLoadIC), R(6), U8(3),
+ B(Star), R(5),
+ B(Call), R(5), R(6), U8(1), U8(1),
+ B(Star), R(1),
+ B(Ldar), R(1),
+ B(Star), R(7),
+ B(LoadIC), R(7), U8(2), U8(7),
+ B(Star), R(6),
+ B(Call), R(6), R(7), U8(1), U8(5),
+ B(Star), R(2),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::k_IsJSReceiver), R(5), U8(1),
+ B(LogicalNot),
+ B(JumpIfFalse), U8(11),
+ B(Ldar), R(2),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
+ B(Ldar), R(2),
+ B(Star), R(5),
+ B(LoadIC), R(5), U8(3), U8(9),
+ B(JumpIfToBooleanTrue), U8(18),
+ B(Ldar), R(2),
+ B(Star), R(5),
+ B(LoadIC), R(5), U8(4), U8(11),
+ B(Star), R(0),
+ B(StackCheck),
+ B(Ldar), R(0),
+ B(Star), R(4),
+ B(Return),
+ B(LdaUndefined),
+ B(Return),
+]
+constant pool: [
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::SYMBOL_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ for (var x of [10, 20, 30]) {
+ if (x == 10) continue;
+ if (x == 20) break;
+ }
+"
+frame size: 7
+parameter count: 1
+bytecode array length: 108
+bytecodes: [
+ B(StackCheck),
+ B(CreateArrayLiteral), U8(0), U8(0), U8(3),
+ B(Star), R(5),
+ B(LdaConstant), U8(1),
+ B(KeyedLoadIC), R(5), U8(3),
+ B(Star), R(4),
+ B(Call), R(4), R(5), U8(1), U8(1),
+ B(Star), R(1),
+ B(Ldar), R(1),
+ B(Star), R(6),
+ B(LoadIC), R(6), U8(2), U8(7),
+ B(Star), R(5),
+ B(Call), R(5), R(6), U8(1), U8(5),
+ B(Star), R(2),
+ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::k_IsJSReceiver), R(4), U8(1),
+ B(LogicalNot),
+ B(JumpIfFalse), U8(11),
+ B(Ldar), R(2),
+ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(4), U8(1),
+ B(Ldar), R(2),
+ B(Star), R(4),
+ B(LoadIC), R(4), U8(3), U8(9),
+ B(JumpIfToBooleanTrue), U8(41),
+ B(Ldar), R(2),
+ B(Star), R(4),
+ B(LoadIC), R(4), U8(4), U8(11),
+ B(Star), R(0),
+ B(StackCheck),
+ B(Ldar), R(0),
+ B(Star), R(3),
+ B(Star), R(4),
+ B(LdaSmi8), U8(10),
+ B(TestEqual), R(4),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(-69),
+ B(Ldar), R(3),
+ B(Star), R(4),
+ B(LdaSmi8), U8(20),
+ B(TestEqual), R(4),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(4),
+ B(Jump), U8(-83),
+ B(LdaUndefined),
+ B(Return),
+]
+constant pool: [
+ InstanceType::FIXED_ARRAY_TYPE,
+ InstanceType::SYMBOL_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ var x = { 'a': 1, 'b': 2 };
+ for (x['a'] of [1,2,3]) { return x['a']; }
+"
+frame size: 6
+parameter count: 1
+bytecode array length: 103
+bytecodes: [
+ B(StackCheck),
+ B(CreateObjectLiteral), U8(0), U8(0), U8(9),
+ B(Star), R(3),
+ B(Star), R(2),
+ B(CreateArrayLiteral), U8(1), U8(1), U8(3),
+ B(Star), R(4),
+ B(LdaConstant), U8(2),
+ B(KeyedLoadIC), R(4), U8(3),
+ B(Star), R(3),
+ B(Call), R(3), R(4), U8(1), U8(1),
+ B(Star), R(0),
+ B(Ldar), R(0),
+ B(Star), R(5),
+ B(LoadIC), R(5), U8(3), U8(7),
+ B(Star), R(4),
+ B(Call), R(4), R(5), U8(1), U8(5),
+ B(Star), R(1),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::k_IsJSReceiver), R(3), U8(1),
+ B(LogicalNot),
+ B(JumpIfFalse), U8(11),
+ B(Ldar), R(1),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(3), U8(1),
+ B(Ldar), R(1),
+ B(Star), R(3),
+ B(LoadIC), R(3), U8(4), U8(9),
+ B(JumpIfToBooleanTrue), U8(28),
+ B(Ldar), R(2),
+ B(Star), R(3),
+ B(Ldar), R(1),
+ B(Star), R(4),
+ B(LoadIC), R(4), U8(5), U8(11),
+ B(StoreICSloppy), R(3), U8(6), U8(13),
+ B(StackCheck),
+ B(Ldar), R(2),
+ B(Star), R(3),
+ B(LoadIC), R(3), U8(6), U8(15),
+ B(Return),
+ B(LdaUndefined),
+ B(Return),
+]
+constant pool: [
+ InstanceType::FIXED_ARRAY_TYPE,
+ InstanceType::FIXED_ARRAY_TYPE,
+ InstanceType::SYMBOL_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+]
+handlers: [
+]
+

Powered by Google App Engine
This is Rietveld 408576698