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

Unified Diff: test/cctest/interpreter/bytecode_expectations/ForIn.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/ForIn.golden
diff --git a/test/cctest/interpreter/bytecode_expectations/ForIn.golden b/test/cctest/interpreter/bytecode_expectations/ForIn.golden
new file mode 100644
index 0000000000000000000000000000000000000000..fd6c7ede82296612ee787a8b2a1ebad60542c0be
--- /dev/null
+++ b/test/cctest/interpreter/bytecode_expectations/ForIn.golden
@@ -0,0 +1,263 @@
+#
+# Autogenerated by generate-bytecode-expectations.
+#
+
+---
+pool type: mixed
+execute: yes
+wrap: yes
+
+---
+snippet: "
+ for (var p in null) {}
+"
+frame size: 2
+parameter count: 1
+bytecode array length: 3
+bytecodes: [
+ B(StackCheck),
+ B(LdaUndefined),
+ B(Return),
+]
+constant pool: [
+]
+handlers: [
+]
+
+---
+snippet: "
+ for (var p in undefined) {}
+"
+frame size: 2
+parameter count: 1
+bytecode array length: 3
+bytecodes: [
+ B(StackCheck),
+ B(LdaUndefined),
+ B(Return),
+]
+constant pool: [
+]
+handlers: [
+]
+
+---
+snippet: "
+ for (var p in undefined) {}
+"
+frame size: 2
+parameter count: 1
+bytecode array length: 3
+bytecodes: [
+ B(StackCheck),
+ B(LdaUndefined),
+ B(Return),
+]
+constant pool: [
+]
+handlers: [
+]
+
+---
+snippet: "
+ var x = 'potatoes';
+ for (var p in x) { return p; }
+"
+frame size: 8
+parameter count: 1
+bytecode array length: 46
+bytecodes: [
+ B(StackCheck),
+ B(LdaConstant), U8(0),
+ B(Star), R(1),
+ B(JumpIfUndefined), U8(39),
+ B(JumpIfNull), U8(37),
+ B(ToObject),
+ B(JumpIfNull), U8(34),
+ B(Star), R(3),
+ B(ForInPrepare), R(4),
+ B(LdaZero),
+ B(Star), R(7),
+ B(ForInDone), R(7), R(6),
+ B(JumpIfTrue), U8(22),
+ B(ForInNext), R(3), R(7), R(4),
+ B(JumpIfUndefined), U8(10),
+ B(Star), R(0),
+ B(StackCheck),
+ B(Ldar), R(0),
+ B(Star), R(2),
+ B(Return),
+ B(ForInStep), R(7),
+ B(Star), R(7),
+ B(Jump), U8(-23),
+ B(LdaUndefined),
+ B(Return),
+]
+constant pool: [
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ var x = 0;
+ for (var p in [1,2,3]) { x += p; }
+"
+frame size: 9
+parameter count: 1
+bytecode array length: 58
+bytecodes: [
+ B(StackCheck),
+ B(LdaZero),
+ B(Star), R(1),
+ B(CreateArrayLiteral), U8(0), U8(0), U8(3),
+ B(JumpIfUndefined), U8(48),
+ B(JumpIfNull), U8(46),
+ B(ToObject),
+ B(JumpIfNull), U8(43),
+ B(Star), R(3),
+ B(ForInPrepare), R(4),
+ B(LdaZero),
+ B(Star), R(7),
+ B(ForInDone), R(7), R(6),
+ B(JumpIfTrue), U8(31),
+ B(ForInNext), R(3), R(7), R(4),
+ B(JumpIfUndefined), U8(19),
+ B(Star), R(0),
+ B(StackCheck),
+ B(Ldar), R(0),
+ B(Star), R(2),
+ B(Ldar), R(1),
+ B(Star), R(8),
+ B(Ldar), R(2),
+ B(Add), R(8),
+ B(Star), R(1),
+ B(ForInStep), R(7),
+ B(Star), R(7),
+ B(Jump), U8(-32),
+ B(LdaUndefined),
+ B(Return),
+]
+constant pool: [
+ InstanceType::FIXED_ARRAY_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ var x = { 'a': 1, 'b': 2 };
+ for (x['a'] in [10, 20, 30]) {
+ if (x['a'] == 10) continue;
+ if (x['a'] == 20) break;
+ }
+"
+frame size: 8
+parameter count: 1
+bytecode array length: 95
+bytecodes: [
+ B(StackCheck),
+ B(CreateObjectLiteral), U8(0), U8(0), U8(9),
+ B(Star), R(1),
+ B(Star), R(0),
+ B(CreateArrayLiteral), U8(1), U8(1), U8(3),
+ B(JumpIfUndefined), U8(80),
+ B(JumpIfNull), U8(78),
+ B(ToObject),
+ B(JumpIfNull), U8(75),
+ B(Star), R(1),
+ B(ForInPrepare), R(2),
+ B(LdaZero),
+ B(Star), R(5),
+ B(ForInDone), R(5), R(4),
+ B(JumpIfTrue), U8(63),
+ B(ForInNext), R(1), R(5), R(2),
+ B(JumpIfUndefined), U8(51),
+ B(Star), R(6),
+ B(Ldar), R(0),
+ B(Star), R(7),
+ B(Ldar), R(6),
+ B(StoreICSloppy), R(7), U8(2), U8(7),
+ B(StackCheck),
+ B(Ldar), R(0),
+ B(Star), R(6),
+ B(LoadIC), R(6), U8(2), U8(3),
+ B(Star), R(7),
+ B(LdaSmi8), U8(10),
+ B(TestEqual), R(7),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(20),
+ B(Ldar), R(0),
+ B(Star), R(6),
+ B(LoadIC), R(6), U8(2), U8(5),
+ B(Star), R(7),
+ B(LdaSmi8), U8(20),
+ B(TestEqual), R(7),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(8),
+ B(ForInStep), R(5),
+ B(Star), R(5),
+ B(Jump), U8(-64),
+ B(LdaUndefined),
+ B(Return),
+]
+constant pool: [
+ InstanceType::FIXED_ARRAY_TYPE,
+ InstanceType::FIXED_ARRAY_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ var x = [ 10, 11, 12 ] ;
+ for (x[0] in [1,2,3]) { return x[3]; }
+"
+frame size: 9
+parameter count: 1
+bytecode array length: 70
+bytecodes: [
+ B(StackCheck),
+ B(CreateArrayLiteral), U8(0), U8(0), U8(3),
+ B(Star), R(0),
+ B(CreateArrayLiteral), U8(1), U8(1), U8(3),
+ B(JumpIfUndefined), U8(57),
+ B(JumpIfNull), U8(55),
+ B(ToObject),
+ B(JumpIfNull), U8(52),
+ B(Star), R(1),
+ B(ForInPrepare), R(2),
+ B(LdaZero),
+ B(Star), R(5),
+ B(ForInDone), R(5), R(4),
+ B(JumpIfTrue), U8(40),
+ B(ForInNext), R(1), R(5), R(2),
+ B(JumpIfUndefined), U8(28),
+ B(Star), R(6),
+ B(Ldar), R(0),
+ B(Star), R(7),
+ B(LdaZero),
+ B(Star), R(8),
+ B(Ldar), R(6),
+ B(KeyedStoreICSloppy), R(7), R(8), U8(5),
+ B(StackCheck),
+ B(Ldar), R(0),
+ B(Star), R(6),
+ B(LdaSmi8), U8(3),
+ B(KeyedLoadIC), R(6), U8(3),
+ B(Return),
+ B(ForInStep), R(5),
+ B(Star), R(5),
+ B(Jump), U8(-41),
+ B(LdaUndefined),
+ B(Return),
+]
+constant pool: [
+ InstanceType::FIXED_ARRAY_TYPE,
+ InstanceType::FIXED_ARRAY_TYPE,
+]
+handlers: [
+]
+
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/Eval.golden ('k') | test/cctest/interpreter/bytecode_expectations/ForOf.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698