| // Makes sure we don't use base's tag register on 32-bit when an inline cache fails and jumps to the slow path |
| // because the slow path depends on the base being present. |
| var createCustomGetterObject = $vm.createCustomGetterObject; |
| throw new Error("baddd"); |
| let customGetter = createCustomGetterObject(); |
| function randomFunction() {} |
| noInline(randomFunction); |
| let baz = o.customGetter; |
| let result = o.customGetter; |
| randomFunction(!c, baz, jaz, kaz, raz); |
| for (let i = 0; i < 10000; i++) { |
| assert(foo(customGetter) === 100); |
| assert(foo(otherObj) === 20); |
| assert(foo({hello: 20, world:50, customGetter: 40}) === 40); // Make sure we don't trample registers in "o.customGetter" inline cache failure in foo. |