test262: Reflect conformance fixes (wave 13) - #73
Merged
Conversation
Reflect.set(target, key, V, receiver) now honours the receiver argument of OrdinarySetWithOwnDescriptor (9.1.9.2). With the receiver omitted it defaults to the target so the ordinary three-argument form still writes on the target; a distinct receiver object diverts the data write there and leaves the target untouched; a non-Object (primitive) receiver, a frozen receiver, or a non-extensible receiver lacking the key reports false. Fixes the two receiver-sensitive test262 Reflect/set assertions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Models the
receiverargument ofReflect.set(target, key, V[, receiver])per ECMAScript §28.1.13 / OrdinarySetWithOwnDescriptor (9.1.9.2).falseand writes nothing (step 5.b).false.Fixes test262
Reflect/set/receiver-is-not-object.jsandReflect/set/set-value-on-data-descriptor.js; Reflect family pass 23 → 25. Four spec-driven unit tests added at EOF of js_compiler_test.gleam.Touches: twocore_rt_js_ffi.erl (reflect_set/3 → /4), emit_core.gleam allow-list (unchanged op name), rt_js.gleam @external, lower.gleam dispatch.