#
# Autogenerated by generate-bytecode-expectations.
#

---
wrap: yes

---
snippet: "
  for (var p in null) {}
"
frame size: 2
parameter count: 1
bytecode array length: 2
bytecodes: [
                B(LdaUndefined),
  /*   57 S> */ B(Return),
]
constant pool: [
]
handlers: [
]

---
snippet: "
  for (var p in undefined) {}
"
frame size: 2
parameter count: 1
bytecode array length: 2
bytecodes: [
                B(LdaUndefined),
  /*   62 S> */ B(Return),
]
constant pool: [
]
handlers: [
]

---
snippet: "
  for (var p in undefined) {}
"
frame size: 2
parameter count: 1
bytecode array length: 2
bytecodes: [
                B(LdaUndefined),
  /*   62 S> */ 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: 42
bytecodes: [
  /*   42 S> */ B(LdaConstant), U8(0),
                B(Star), R(0),
  /*   68 S> */ B(JumpIfUndefinedOrNull), U8(36),
                B(ToObject), R(3),
                B(ForInEnumerate), R(3),
                B(ForInPrepare), R(4), U8(0),
                B(LdaZero),
                B(Star), R(7),
  /*   63 S> */ B(ForInContinue), R(7), R(6),
                B(JumpIfFalse), U8(21),
                B(ForInNext), R(3), R(7), R(4), U8(0),
                B(JumpIfUndefined), U8(7),
                B(Star), R(2),
  /*   63 S> */ B(Star), R(1),
  /*   82 S> */ B(Return),
                B(ForInStep), R(7),
                B(Star), R(7),
  /*   54 E> */ B(JumpLoop), U8(21), I8(0),
                B(LdaUndefined),
  /*   85 S> */ B(Return),
]
constant pool: [
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["potatoes"],
]
handlers: [
]

---
snippet: "
  var x = 0;
  for (var p in [1,2,3]) { x += p; }
"
frame size: 9
parameter count: 1
bytecode array length: 54
bytecodes: [
  /*   42 S> */ B(LdaZero),
                B(Star), R(0),
  /*   59 S> */ B(CreateArrayLiteral), U8(0), U8(1), U8(37),
                B(JumpIfUndefinedOrNull), U8(45),
                B(ToObject), R(3),
                B(ForInEnumerate), R(3),
                B(ForInPrepare), R(4), U8(0),
                B(LdaZero),
                B(Star), R(7),
  /*   54 S> */ B(ForInContinue), R(7), R(6),
                B(JumpIfFalse), U8(30),
                B(ForInNext), R(3), R(7), R(4), U8(0),
                B(JumpIfUndefined), U8(16),
                B(Star), R(2),
  /*   54 S> */ B(Star), R(1),
  /*   70 S> */ B(Ldar), R(2),
  /*   75 E> */ B(Add), R(0), U8(2),
                B(Mov), R(0), R(8),
                B(Star), R(0),
  /*   72 E> */ B(ForInStep), R(7),
                B(Star), R(7),
  /*   45 E> */ B(JumpLoop), U8(30), I8(0),
                B(LdaUndefined),
  /*   80 S> */ B(Return),
]
constant pool: [
  ARRAY_BOILERPLATE_DESCRIPTION_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: 7
parameter count: 1
bytecode array length: 81
bytecodes: [
  /*   42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
                B(Star), R(0),
  /*   77 S> */ B(CreateArrayLiteral), U8(1), U8(2), U8(37),
                B(JumpIfUndefinedOrNull), U8(69),
                B(ToObject), R(1),
                B(ForInEnumerate), R(1),
                B(ForInPrepare), R(2), U8(1),
                B(LdaZero),
                B(Star), R(5),
  /*   68 S> */ B(ForInContinue), R(5), R(4),
                B(JumpIfFalse), U8(54),
                B(ForInNext), R(1), R(5), R(2), U8(1),
                B(JumpIfUndefined), U8(40),
                B(Star), R(6),
                B(Ldar), R(6),
  /*   68 E> */ B(StaNamedProperty), R(0), U8(2), U8(3),
  /*  100 S> */ B(LdaNamedProperty), R(0), U8(2), U8(5),
                B(Star), R(6),
                B(LdaSmi), I8(10),
  /*  106 E> */ B(TestEqual), R(6), U8(7),
                B(JumpIfFalse), U8(4),
  /*  113 S> */ B(Jump), U8(17),
  /*  130 S> */ B(LdaNamedProperty), R(0), U8(2), U8(5),
                B(Star), R(6),
                B(LdaSmi), I8(20),
  /*  136 E> */ B(TestEqual), R(6), U8(8),
                B(JumpIfFalse), U8(4),
  /*  143 S> */ B(Jump), U8(9),
                B(ForInStep), R(5),
                B(Star), R(5),
  /*   62 E> */ B(JumpLoop), U8(54), I8(0),
                B(LdaUndefined),
  /*  152 S> */ B(Return),
]
constant pool: [
  OBJECT_BOILERPLATE_DESCRIPTION_TYPE,
  ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"],
]
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: 60
bytecodes: [
  /*   42 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
                B(Star), R(0),
  /*   72 S> */ B(CreateArrayLiteral), U8(1), U8(2), U8(37),
                B(JumpIfUndefinedOrNull), U8(48),
                B(ToObject), R(1),
                B(ForInEnumerate), R(1),
                B(ForInPrepare), R(2), U8(1),
                B(LdaZero),
                B(Star), R(5),
  /*   65 S> */ B(ForInContinue), R(5), R(4),
                B(JumpIfFalse), U8(33),
                B(ForInNext), R(1), R(5), R(2), U8(1),
                B(JumpIfUndefined), U8(19),
                B(Star), R(6),
                B(LdaZero),
                B(Star), R(8),
                B(Ldar), R(6),
  /*   65 E> */ B(StaKeyedProperty), R(0), R(8), U8(3),
  /*   83 S> */ B(LdaSmi), I8(3),
  /*   91 E> */ B(LdaKeyedProperty), R(0), U8(5),
  /*   95 S> */ B(Return),
                B(ForInStep), R(5),
                B(Star), R(5),
  /*   59 E> */ B(JumpLoop), U8(33), I8(0),
                B(LdaUndefined),
  /*   98 S> */ B(Return),
]
constant pool: [
  ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
  ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
]
handlers: [
]

