| Index: test/mjsunit/compiler/proto-chain-load.js
|
| diff --git a/test/mjsunit/fast-array-length.js b/test/mjsunit/compiler/proto-chain-load.js
|
| similarity index 76%
|
| copy from test/mjsunit/fast-array-length.js
|
| copy to test/mjsunit/compiler/proto-chain-load.js
|
| index 42f2c38f49b1dd3a3c0ffa867f7db368df78e760..60c6431d2b180f858abecef650b27ddb6a23f4e4 100644
|
| --- a/test/mjsunit/fast-array-length.js
|
| +++ b/test/mjsunit/compiler/proto-chain-load.js
|
| @@ -27,11 +27,18 @@
|
|
|
| // Flags: --allow-natives-syntax
|
|
|
| -// This is a regression test for overlapping key and value registers.
|
| +// Test HLoadNamedField on the proto chain.
|
|
|
| +var obj4 = Object.create(null, { f4: {value: 4} });
|
| +var obj3 = Object.create(obj4, { f3: {value: 3} });
|
| +var obj2 = Object.create(obj3, { f2: {value: 2} });
|
| +var obj1 = Object.create(obj2, { f1: {value: 1} });
|
| +var obj0 = Object.create(obj1, { f0: {value: 0} });
|
|
|
| -var a = [0, 1, 2, 3, 4, 5];
|
| -assertTrue(%HasFastSmiElements(a));
|
| -a.length = (1 << 30);
|
| -assertFalse(%HasFastSmiElements(a));
|
| +function get4(obj) { return obj.f4; }
|
|
|
| +assertEquals(4, get4(obj0));
|
| +assertEquals(4, get4(obj0));
|
| +%OptimizeFunctionOnNextCall(get4);
|
| +assertEquals(4, get4(obj0));
|
| +assertEquals(4, get4(obj0));
|
|
|