tc39 / test262

Official ECMAScript Conformance Test Suite
Other
2.41k stars 468 forks source link

Add more tests for receiver check in IntegerIndexedElementSet #4209

Closed anba closed 3 months ago

anba commented 3 months ago

Additional tests to cover some spec-compliance issues I've encountered while implementing tc39/ecma262#1556 in SpiderMonkey.

Ms2ger commented 3 months ago

Did you mean to push all three commits to this PR? I'm happy to approve the first one, at least, but would need to spend some more time reviewing the others.

anba commented 3 months ago

Yes, that was intentional, because at least for SpiderMonkey there are shared code paths for normal property operations and environment operations, so when I've updated the property operations for out-of-bounds typed array indices, I also had to worry about environment operations. Similar story about the new test for TypedArray.prototype.set: I've also updated the TypedArraySetElement implementation in SM, which led to checking which spec operations actually call TypedArraySetElement and writing some small tests to check implementations agree on the spec semantics. This uncovered a spec violation in JSC (72933dfc0be2394956cf29689336dd7678d089c0).