Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Add a thisSIMDValue() abstract operation. #339

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add a thisSIMDValue() abstract operation. #339

wants to merge 1 commit into from

Conversation

stoklund
Copy link

Modelled after the existing thisNumberValue(), thisBooleanValue(), ...
abstract operations, accept either a primitive SIMD value or a SIMD object
wrapping a value. In either case, return the primitive SIMD value.

Use this function in the SIMD constructor prototype methods such that they
accept both SIMD objects and primitive values as callees.

  • Use [[SIMDData]] everywhere instead of [[SIMDWrapperData]].
  • Fix a few pasto's in verbiage copied from the Symbol specification.

This fixes #338.

Modelled after the existing `thisNumberValue()`, `thisBooleanValue()`, ...
abstract operations, accept either a primitive SIMD value or a SIMD object
wrapping a value. In either case, return the primitive SIMD value.

Use this function in the SIMD constructor prototype methods such that they
accept both SIMD objects and primitive values as callees.

- Use [[SIMDData]] everywhere instead of [[SIMDWrapperData]].

- Fix a few pasto's in verbiage copied from the `Symbol` specification.

This fixes #338.
@@ -1573,6 +1573,18 @@
<emu-clause id="simd-proto">
<h1>The _SIMD_Constructor.prototype</h1>

<emu-clause id="this-simd-value" aoid="thisSIMDValue">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps useful to add something like this here ? Similar to Number prototype.

Unless explicitly stated otherwise, the methods of the SIMD prototype object defined below are not generic and the this value passed to them must be either a SIMD value or an object that has a [[SIMDData]] internal slot that has been initialized to a SIMD value.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarification of SIMD objects vs values
2 participants