| Index: test/cctest/interpreter/test-bytecode-generator.cc
|
| diff --git a/test/cctest/interpreter/test-bytecode-generator.cc b/test/cctest/interpreter/test-bytecode-generator.cc
|
| index 61b8c36b1f28478dead596ea5b9af2d727352666..ad3aeea05cb6115a2bc1de0dee6a7b6f04605574 100644
|
| --- a/test/cctest/interpreter/test-bytecode-generator.cc
|
| +++ b/test/cctest/interpreter/test-bytecode-generator.cc
|
| @@ -4687,31 +4687,29 @@ TEST(ForIn) {
|
| 0},
|
| {"var x = 'potatoes';\n"
|
| "for (var p in x) { return p; }",
|
| - 5 * kPointerSize,
|
| + 8 * kPointerSize,
|
| 1,
|
| - 46,
|
| + 49,
|
| {
|
| B(LdaConstant), U8(0), //
|
| B(Star), R(1), //
|
| - B(JumpIfUndefined), U8(40), //
|
| - B(JumpIfNull), U8(38), //
|
| + B(JumpIfUndefined), U8(43), //
|
| + B(JumpIfNull), U8(41), //
|
| B(ToObject), //
|
| B(Star), R(3), //
|
| B(CallRuntime), U16(Runtime::kGetPropertyNamesFast), R(3), U8(1), //
|
| - B(ForInPrepare), R(3), //
|
| + B(ForInPrepare), R(3), R(4), R(5), R(6), //
|
| B(JumpIfUndefined), U8(26), //
|
| - B(Star), R(4), //
|
| B(LdaZero), //
|
| - B(Star), R(3), //
|
| - B(ForInDone), R(4), //
|
| - B(JumpIfTrue), U8(17), //
|
| - B(ForInNext), R(4), R(3), //
|
| + B(Star), R(7), //
|
| + B(ForInDone), R(7), R(6), //
|
| + B(JumpIfTrue), U8(18), //
|
| + B(ForInNext), R(3), R(4), R(5), R(7), //
|
| B(JumpIfUndefined), U8(7), //
|
| B(Star), R(0), //
|
| B(Star), R(2), //
|
| B(Return), //
|
| - B(Ldar), R(3), //
|
| - B(Inc), //
|
| + B(ForInStep), R(7), //
|
| B(Jump), U8(-19), //
|
| B(LdaUndefined), //
|
| B(Return), //
|
| @@ -4720,33 +4718,31 @@ TEST(ForIn) {
|
| {InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}},
|
| {"var x = 0;\n"
|
| "for (var p in [1,2,3]) { x += p; }",
|
| - 5 * kPointerSize,
|
| + 8 * kPointerSize,
|
| 1,
|
| - 52,
|
| + 55,
|
| {
|
| B(LdaZero), //
|
| B(Star), R(1), //
|
| - B(CreateArrayLiteral), U8(0), U8(0), U8(simple_flags), //
|
| - B(JumpIfUndefined), U8(43), //
|
| - B(JumpIfNull), U8(41), //
|
| + B(CreateArrayLiteral), U8(0), U8(0), U8(3), //
|
| + B(JumpIfUndefined), U8(46), //
|
| + B(JumpIfNull), U8(44), //
|
| B(ToObject), //
|
| B(Star), R(3), //
|
| B(CallRuntime), U16(Runtime::kGetPropertyNamesFast), R(3), U8(1), //
|
| - B(ForInPrepare), R(3), //
|
| + B(ForInPrepare), R(3), R(4), R(5), R(6), //
|
| B(JumpIfUndefined), U8(29), //
|
| - B(Star), R(4), //
|
| B(LdaZero), //
|
| - B(Star), R(3), //
|
| - B(ForInDone), R(4), //
|
| - B(JumpIfTrue), U8(20), //
|
| - B(ForInNext), R(4), R(3), //
|
| + B(Star), R(7), //
|
| + B(ForInDone), R(7), R(6), //
|
| + B(JumpIfTrue), U8(21), //
|
| + B(ForInNext), R(3), R(4), R(5), R(7), //
|
| B(JumpIfUndefined), U8(10), //
|
| B(Star), R(0), //
|
| B(Star), R(2), //
|
| B(Add), R(1), //
|
| B(Star), R(1), //
|
| - B(Ldar), R(3), //
|
| - B(Inc), //
|
| + B(ForInStep), R(7), //
|
| B(Jump), U8(-22), //
|
| B(LdaUndefined), //
|
| B(Return), //
|
| @@ -4758,43 +4754,41 @@ TEST(ForIn) {
|
| " if (x['a'] == 10) continue;\n"
|
| " if (x['a'] == 20) break;\n"
|
| "}",
|
| - 4 * kPointerSize,
|
| + 7 * kPointerSize,
|
| 1,
|
| - 81,
|
| + 84,
|
| {
|
| B(CreateObjectLiteral), U8(0), U8(0), U8(deep_elements_flags), //
|
| B(Star), R(0), //
|
| B(CreateArrayLiteral), U8(1), U8(1), U8(simple_flags), //
|
| - B(JumpIfUndefined), U8(69), //
|
| - B(JumpIfNull), U8(67), //
|
| + B(JumpIfUndefined), U8(72), //
|
| + B(JumpIfNull), U8(70), //
|
| B(ToObject), //
|
| B(Star), R(1), //
|
| B(CallRuntime), U16(Runtime::kGetPropertyNamesFast), R(1), U8(1), //
|
| - B(ForInPrepare), R(1), //
|
| + B(ForInPrepare), R(1), R(2), R(3), R(4), //
|
| B(JumpIfUndefined), U8(55), //
|
| - B(Star), R(2), //
|
| B(LdaZero), //
|
| - B(Star), R(1), //
|
| - B(ForInDone), R(2), //
|
| - B(JumpIfTrue), U8(46), //
|
| - B(ForInNext), R(2), R(1), //
|
| + B(Star), R(5), //
|
| + B(ForInDone), R(5), R(4), //
|
| + B(JumpIfTrue), U8(47), //
|
| + B(ForInNext), R(1), R(2), R(3), R(5), //
|
| B(JumpIfUndefined), U8(36), //
|
| - B(Star), R(3), //
|
| + B(Star), R(6), //
|
| B(StoreICSloppy), R(0), U8(2), U8(vector->GetIndex(slot4)), //
|
| B(LoadICSloppy), R(0), U8(2), U8(vector->GetIndex(slot2)), //
|
| - B(Star), R(3), //
|
| + B(Star), R(6), //
|
| B(LdaSmi8), U8(10), //
|
| - B(TestEqual), R(3), //
|
| + B(TestEqual), R(6), //
|
| B(JumpIfFalse), U8(4), //
|
| B(Jump), U8(16), //
|
| B(LoadICSloppy), R(0), U8(2), U8(vector->GetIndex(slot3)), //
|
| - B(Star), R(3), //
|
| + B(Star), R(6), //
|
| B(LdaSmi8), U8(20), //
|
| - B(TestEqual), R(3), //
|
| + B(TestEqual), R(6), //
|
| B(JumpIfFalse), U8(4), //
|
| - B(Jump), U8(7), //
|
| - B(Ldar), R(1), //
|
| - B(Inc), //
|
| + B(Jump), U8(6), //
|
| + B(ForInStep), R(5), //
|
| B(Jump), U8(-48), //
|
| B(LdaUndefined), //
|
| B(Return), //
|
| @@ -4804,37 +4798,35 @@ TEST(ForIn) {
|
| InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}},
|
| {"var x = [ 10, 11, 12 ] ;\n"
|
| "for (x[0] in [1,2,3]) { return x[3]; }",
|
| - 5 * kPointerSize,
|
| + 8 * kPointerSize,
|
| 1,
|
| - 64,
|
| + 67,
|
| {
|
| B(CreateArrayLiteral), U8(0), U8(0), U8(simple_flags), //
|
| B(Star), R(0), //
|
| B(CreateArrayLiteral), U8(1), U8(1), U8(simple_flags), //
|
| - B(JumpIfUndefined), U8(52), //
|
| - B(JumpIfNull), U8(50), //
|
| + B(JumpIfUndefined), U8(55), //
|
| + B(JumpIfNull), U8(53), //
|
| B(ToObject), //
|
| B(Star), R(1), //
|
| B(CallRuntime), U16(Runtime::kGetPropertyNamesFast), R(1), U8(1), //
|
| - B(ForInPrepare), R(1), //
|
| + B(ForInPrepare), R(1), R(2), R(3), R(4), //
|
| B(JumpIfUndefined), U8(38), //
|
| - B(Star), R(2), //
|
| B(LdaZero), //
|
| - B(Star), R(1), //
|
| - B(ForInDone), R(2), //
|
| - B(JumpIfTrue), U8(29), //
|
| - B(ForInNext), R(2), R(1), //
|
| + B(Star), R(5), //
|
| + B(ForInDone), R(5), R(4), //
|
| + B(JumpIfTrue), U8(30), //
|
| + B(ForInNext), R(1), R(2), R(3), R(5), //
|
| B(JumpIfUndefined), U8(19), //
|
| - B(Star), R(3), //
|
| + B(Star), R(6), //
|
| B(LdaZero), //
|
| - B(Star), R(4), //
|
| - B(Ldar), R(3), //
|
| - B(KeyedStoreICSloppy), R(0), R(4), U8(vector->GetIndex(slot3)), //
|
| + B(Star), R(7), //
|
| + B(Ldar), R(6), //
|
| + B(KeyedStoreICSloppy), R(0), R(7), U8(vector->GetIndex(slot3)), //
|
| B(LdaSmi8), U8(3), //
|
| B(KeyedLoadICSloppy), R(0), U8(vector->GetIndex(slot2)), //
|
| B(Return), //
|
| - B(Ldar), R(1), //
|
| - B(Inc), //
|
| + B(ForInStep), R(5), //
|
| B(Jump), U8(-31), //
|
| B(LdaUndefined), //
|
| B(Return), //
|
|
|