Chromium Code Reviews| 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 |
| index 2b61b6423b0d31cdaabb74f2f09b164430f09252..6a4f6a816993d5d66bc4bcb991d85e7ae450db1b 100644 |
| --- a/test/cctest/interpreter/bytecode_expectations/ForIn.golden |
| +++ b/test/cctest/interpreter/bytecode_expectations/ForIn.golden |
| @@ -73,8 +73,8 @@ bytecodes: [ |
| /* 68 S> */ B(JumpIfUndefined), U8(38), |
| B(JumpIfNull), U8(36), |
| B(ToObject), |
| - B(Star), R(3), |
| B(ForInPrepare), R(4), |
| + B(Star), R(3), |
| B(LdaZero), |
| B(Star), R(7), |
| /* 63 S> */ B(ForInDone), R(7), R(6), |
| @@ -83,8 +83,8 @@ bytecodes: [ |
| B(JumpIfUndefined), U8(10), |
| B(Star), R(0), |
| /* 54 E> */ B(StackCheck), |
| - B(Ldar), R(0), |
| B(Star), R(2), |
| + /* 73 S> */ B(Ldar), R(2), |
|
Yang
2016/05/20 08:00:55
How come we end up with an additional statement po
oth
2016/05/20 09:01:04
The older code has peephole optimized out the stat
|
| /* 85 S> */ B(Return), |
| B(ForInStep), R(7), |
| B(Star), R(7), |
| @@ -105,35 +105,33 @@ snippet: " |
| " |
| frame size: 9 |
| parameter count: 1 |
| -bytecode array length: 57 |
| +bytecode array length: 54 |
| bytecodes: [ |
| /* 30 E> */ B(StackCheck), |
| /* 42 S> */ B(LdaZero), |
| /* 42 E> */ B(Star), R(1), |
| /* 59 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(3), |
| - B(JumpIfUndefined), U8(47), |
| - B(JumpIfNull), U8(45), |
| + B(JumpIfUndefined), U8(44), |
| + B(JumpIfNull), U8(42), |
| B(ToObject), |
| - B(Star), R(3), |
| B(ForInPrepare), R(4), |
| + B(Star), R(3), |
| B(LdaZero), |
| B(Star), R(7), |
| /* 54 S> */ B(ForInDone), R(7), R(6), |
| - B(JumpIfTrue), U8(32), |
| + B(JumpIfTrue), U8(29), |
| B(ForInNext), R(3), R(7), R(4), U8(1), |
| - B(JumpIfUndefined), U8(19), |
| + B(JumpIfUndefined), U8(16), |
| B(Star), R(0), |
| /* 45 E> */ B(StackCheck), |
| - B(Ldar), R(0), |
| B(Star), R(2), |
| - /* 70 S> */ B(Ldar), R(1), |
| - B(Star), R(8), |
| - /* 75 E> */ B(Ldar), R(2), |
| - B(Add), R(8), |
| - /* 72 E> */ B(Star), R(1), |
| + /* 70 S> */ B(Ldar), R(0), |
| + B(Add), R(1), |
| + /* 72 E> */ B(Mov), R(1), R(8), |
| + B(Star), R(1), |
| B(ForInStep), R(7), |
| B(Star), R(7), |
| - B(Jump), U8(-33), |
| + B(Jump), U8(-30), |
| B(LdaUndefined), |
| /* 80 S> */ B(Return), |
| ] |
| @@ -153,41 +151,35 @@ snippet: " |
| " |
| frame size: 8 |
| parameter count: 1 |
| -bytecode array length: 94 |
| +bytecode array length: 82 |
| bytecodes: [ |
| /* 30 E> */ B(StackCheck), |
| /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1), |
| B(Star), R(1), |
| /* 42 E> */ B(Star), R(0), |
| /* 77 S> */ B(CreateArrayLiteral), U8(1), U8(1), U8(3), |
| - B(JumpIfUndefined), U8(79), |
| - B(JumpIfNull), U8(77), |
| + B(JumpIfUndefined), U8(67), |
| + B(JumpIfNull), U8(65), |
| B(ToObject), |
| - B(Star), R(1), |
| B(ForInPrepare), R(2), |
| + B(Star), R(1), |
| B(LdaZero), |
| B(Star), R(5), |
| /* 68 S> */ B(ForInDone), R(5), R(4), |
| - B(JumpIfTrue), U8(64), |
| + B(JumpIfTrue), U8(52), |
| B(ForInNext), R(1), R(5), R(2), U8(9), |
| - B(JumpIfUndefined), U8(51), |
| + B(JumpIfUndefined), U8(39), |
| B(Star), R(6), |
| - /* 67 E> */ B(Ldar), R(0), |
| - B(Star), R(7), |
| - B(Ldar), R(6), |
| - B(StoreICSloppy), R(7), U8(2), U8(7), |
| + /* 67 E> */ B(Ldar), R(6), |
| + B(StoreICSloppy), R(0), U8(2), U8(7), |
| /* 62 E> */ B(StackCheck), |
| - /* 95 S> */ B(Ldar), R(0), |
| - B(Star), R(6), |
| - /* 100 E> */ B(LoadIC), R(6), U8(2), U8(3), |
| + /* 95 S> */ B(LoadIC), R(0), U8(2), U8(3), |
| B(Star), R(7), |
| B(LdaSmi), U8(10), |
| /* 106 E> */ B(TestEqual), R(7), |
| B(JumpIfFalse), U8(4), |
| - /* 113 S> */ B(Jump), U8(20), |
| - /* 125 S> */ B(Ldar), R(0), |
| - B(Star), R(6), |
| - /* 130 E> */ B(LoadIC), R(6), U8(2), U8(5), |
| + /* 113 S> */ B(Jump), U8(16), |
| + /* 125 S> */ B(LoadIC), R(0), U8(2), U8(5), |
| B(Star), R(7), |
| B(LdaSmi), U8(20), |
| /* 136 E> */ B(TestEqual), R(7), |
| @@ -195,7 +187,7 @@ bytecodes: [ |
| /* 143 S> */ B(Jump), U8(8), |
| B(ForInStep), R(5), |
| B(Star), R(5), |
| - B(Jump), U8(-65), |
| + B(Jump), U8(-53), |
| B(LdaUndefined), |
| /* 152 S> */ B(Return), |
| ] |
| @@ -214,39 +206,35 @@ snippet: " |
| " |
| frame size: 9 |
| parameter count: 1 |
| -bytecode array length: 69 |
| +bytecode array length: 61 |
| bytecodes: [ |
| /* 30 E> */ B(StackCheck), |
| /* 42 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(3), |
| /* 42 E> */ B(Star), R(0), |
| /* 72 S> */ B(CreateArrayLiteral), U8(1), U8(1), U8(3), |
| - B(JumpIfUndefined), U8(56), |
| - B(JumpIfNull), U8(54), |
| + B(JumpIfUndefined), U8(48), |
| + B(JumpIfNull), U8(46), |
| B(ToObject), |
| - B(Star), R(1), |
| B(ForInPrepare), R(2), |
| + B(Star), R(1), |
| B(LdaZero), |
| B(Star), R(5), |
| /* 65 S> */ B(ForInDone), R(5), R(4), |
| - B(JumpIfTrue), U8(41), |
| + B(JumpIfTrue), U8(33), |
| B(ForInNext), R(1), R(5), R(2), U8(7), |
| - B(JumpIfUndefined), U8(28), |
| + B(JumpIfUndefined), U8(20), |
| B(Star), R(6), |
| - /* 64 E> */ B(Ldar), R(0), |
| - B(Star), R(7), |
| - B(LdaZero), |
| + /* 64 E> */ B(LdaZero), |
| B(Star), R(8), |
| B(Ldar), R(6), |
| - B(KeyedStoreICSloppy), R(7), R(8), U8(5), |
| + B(KeyedStoreICSloppy), R(0), R(8), U8(5), |
| /* 59 E> */ B(StackCheck), |
| - /* 83 S> */ B(Ldar), R(0), |
| - B(Star), R(6), |
| - /* 91 E> */ B(LdaSmi), U8(3), |
| - B(KeyedLoadIC), R(6), U8(3), |
| + /* 83 S> */ B(LdaSmi), U8(3), |
| + B(KeyedLoadIC), R(0), U8(3), |
| /* 98 S> */ B(Return), |
| B(ForInStep), R(5), |
| B(Star), R(5), |
| - B(Jump), U8(-42), |
| + B(Jump), U8(-34), |
| B(LdaUndefined), |
| /* 98 S> */ B(Return), |
| ] |