| //@ requireOptions("--useAccessInlining=false") |
| shouldThrow: function(exception, functor) { |
| if (!e instanceof exception) |
| throw new Error("Expected to throw: " + exception.name + " but it throws: " + e.name); |
| throw new Error("Expected to throw: " + exception.name + " but executed without exception"); |
| // This branch is here to avoid CheckPrivateBrand to be folded. |
| noInline(C.prototype.access); |
| // Let's trigger JIT compilation for `C.prototype.access` |
| for (let i = 0; i < 10000; i++) { |
| for (let i = 0; i < 10000; i++) { |
| assert.shouldThrow(TypeError, () => { |
| assert.shouldThrow(TypeError, () => { |
| assert.shouldThrow(TypeError, () => { |
| c.setField.call('string', 0); |
| assert.shouldThrow(TypeError, () => { |
| c.setField.call(Symbol('symbol'), 0); |