?
u
m
/
Algorithms within this specification manipulate values each of which has an associated type. The possible value types are exactly those defined in this clause. Types are further subclassified into
Within this specification, the notation “Type(x)” is used as shorthand for “the type of x” where “type” refers to the ECMAScript language and specification types defined in this clause.
An ECMAScript language type corresponds to values that are directly manipulated by an ECMAScript programmer using the ECMAScript language. The ECMAScript language types are Undefined, Null, Boolean, String, Symbol, Number, BigInt, and Object. An ECMAScript language value is a value that is characterized by an ECMAScript language type.
The Undefined type has exactly one value, called
The Null type has exactly one value, called
The Boolean type represents a logical entity having two values, called
The String type is the set of all ordered sequences of zero or more 16-bit unsigned
ECMAScript operations that do not interpret String contents apply no further semantics. Operations that do interpret String values treat each element as a single UTF-16 code unit. However, ECMAScript does not restrict the value of or relationships between these code units, so operations that further interpret String contents as sequences of Unicode code points encoded in UTF-16 must account for ill-formed subsequences. Such operations apply special treatment to every code unit with a numeric value in the
The function String.prototype.normalize
(see String.prototype.localeCompare
(see
The rationale behind this design was to keep the implementation of Strings as simple and high-performing as possible. If
In this specification, the phrase "the string-concatenation of A, B, ..." (where each argument is a String value, a code unit, or a sequence of code units) denotes the String value whose sequence of code units is the concatenation of the code units (in order) of each of the arguments (in order).
The phrase "the substring of S from inclusiveStart to exclusiveEnd" (where S is a String value or a sequence of code units and inclusiveStart and exclusiveEnd are
The phrase "the ASCII word characters" denotes the following String value, which consists solely of every letter and number in the Unicode Basic Latin block along with U+005F (LOW LINE):
For historical reasons, it has significance to various algorithms.
The abstract operation StringIndexOf takes arguments string (a String), searchValue (a String), and fromIndex (a non-negative
If searchValue is the empty String and fromIndex ≤ the length of string, this algorithm returns fromIndex. The empty String is effectively found at every position within a string, including after the last code unit.
This algorithm always returns -1 if fromIndex + the length of searchValue > the length of string.
The Symbol type is the set of all non-String values that may be used as the key of an Object property (
Each possible Symbol value is unique and immutable.
Each Symbol value immutably holds an associated value called [[Description]] that is either
Well-known symbols are built-in Symbol values that are explicitly referenced by algorithms of this specification. They are typically used as the keys of properties whose values serve as extension points of a specification algorithm. Unless otherwise specified, well-known symbols values are shared by all
Within this specification a well-known symbol is referred to by using a notation of the form @@name, where “name” is one of the values listed in
Specification Name | [[Description]] | Value and Purpose |
---|---|---|
@@asyncIterator |
|
A method that returns the default AsyncIterator for an object. Called by the semantics of the for -await -of statement.
|
@@hasInstance |
|
A method that determines if a instanceof operator.
|
@@isConcatSpreadable |
|
A Boolean valued property that if true indicates that an object should be flattened to its array elements by Array.prototype.concat |
@@iterator |
|
A method that returns the default Iterator for an object. Called by the semantics of the for-of statement. |
@@match |
|
A regular expression method that matches the regular expression against a string. Called by the String.prototype.match |
@@matchAll |
|
A regular expression method that returns an iterator, that yields matches of the regular expression against a string. Called by the String.prototype.matchAll |
@@replace |
|
A regular expression method that replaces matched substrings of a string. Called by the String.prototype.replace |
@@search |
|
A regular expression method that returns the index within a string that matches the regular expression. Called by the String.prototype.search |
@@species |
|
A function valued property that is the |
@@split |
|
A regular expression method that splits a string at the indices that match the regular expression. Called by the String.prototype.split |
@@toPrimitive |
|
A method that converts an object to a corresponding primitive value. Called by the |
@@toStringTag |
|
A String valued property that is used in the creation of the default string description of an object. Accessed by the built-in method Object.prototype.toString |
@@unscopables |
|
An object valued property whose own and inherited property names are property names that are excluded from the with environment bindings of the associated object.
|
ECMAScript has two built-in numeric types: Number and BigInt. The following
Because the numeric types are in general not convertible without loss of precision or truncation, the ECMAScript language provides no implicit conversion among these types. Programmers must explicitly call Number
and BigInt
functions to convert among types when calling a function which requires another type.
The first and subsequent editions of ECMAScript have provided, for certain operators, implicit numeric conversions that could lose precision or
The Number type has exactly 18,437,736,874,454,810,627 (that is, NaN
.) In some implementations, external code might be able to detect a difference between various Not-a-Number values, but such behaviour is
There are two other special values, called +Infinity
(or simply Infinity
) and -Infinity
.)
The other 18,437,736,874,454,810,624 (that is,
Note that there is both a +0
(or simply 0
) and -0
.)
The 18,437,736,874,454,810,622 (that is,
18,428,729,675,200,069,632 (that is,
where s is 1 or -1, m is an
The remaining 9,007,199,254,740,990 (that is,
where s is 1 or -1, m is an
Note that all the positive and negative
A
In this specification, the phrase “the Number value for x” where x represents an exact real mathematical quantity (which might even be an irrational number such as π) means a Number value chosen in the following manner. Consider the set of all
The
Some ECMAScript operators deal only with
The abstract operation Number::unaryMinus takes argument x (a Number) and returns a Number. It performs the following steps when called:
The abstract operation Number::bitwiseNOT takes argument x (a Number) and returns an
The abstract operation Number::exponentiate takes arguments base (a Number) and exponent (a Number) and returns a Number. It returns an
The result of base **
exponent when base is
The abstract operation Number::multiply takes arguments x (a Number) and y (a Number) and returns a Number. It performs multiplication according to the rules of
The abstract operation Number::divide takes arguments x (a Number) and y (a Number) and returns a Number. It performs division according to the rules of
The abstract operation Number::remainder takes arguments n (a Number) and d (a Number) and returns a Number. It yields the remainder from an implied division of its operands where n is the dividend and d is the divisor. It performs the following steps when called:
In C and C++, the remainder operator accepts only integral operands; in ECMAScript, it also accepts floating-point operands.
%
operator is not the same as the “remainder” operation defined by %
on floating-point operations to behave in a manner analogous to that of the Java The abstract operation Number::add takes arguments x (a Number) and y (a Number) and returns a Number. It performs addition according to the rules of
The abstract operation Number::subtract takes arguments x (a Number) and y (a Number) and returns a Number. It performs subtraction, producing the difference of its operands; x is the minuend and y is the subtrahend. It performs the following steps when called:
It is always the case that x - y
produces the same result as x + (-y)
.
The abstract operation Number::leftShift takes arguments x (a Number) and y (a Number) and returns an
The abstract operation Number::signedRightShift takes arguments x (a Number) and y (a Number) and returns an
The abstract operation Number::unsignedRightShift takes arguments x (a Number) and y (a Number) and returns an
The abstract operation Number::lessThan takes arguments x (a Number) and y (a Number) and returns a Boolean or
The abstract operation Number::equal takes arguments x (a Number) and y (a Number) and returns a Boolean. It performs the following steps when called:
The abstract operation Number::sameValue takes arguments x (a Number) and y (a Number) and returns a Boolean. It performs the following steps when called:
The abstract operation Number::sameValueZero takes arguments x (a Number) and y (a Number) and returns a Boolean. It performs the following steps when called:
The abstract operation NumberBitwiseOp takes arguments op (&
, ^
, or |
), x (a Number), and y (a Number) and returns an
&
, let result be the result of applying the bitwise AND operation to lbits and rbits.^
, let result be the result of applying the bitwise exclusive OR (XOR) operation to lbits and rbits.|
. Let result be the result of applying the bitwise inclusive OR operation to lbits and rbits.The abstract operation Number::bitwiseAND takes arguments x (a Number) and y (a Number) and returns an
&
, x, y).The abstract operation Number::bitwiseXOR takes arguments x (a Number) and y (a Number) and returns an
^
, x, y).The abstract operation Number::bitwiseOR takes arguments x (a Number) and y (a Number) and returns an
|
, x, y).The abstract operation Number::toString takes arguments x (a Number) and radix (an
1.2e+3
.The following observations may be useful as guidelines for implementations, but are not part of the normative requirements of this Standard:
For implementations that provide more accurate conversions than required by the rules above, it is recommended that the following alternative version of step
Implementers of ECMAScript may find useful the paper and code written by David M. Gay for binary-to-decimal conversion of floating-point numbers:
Gay, David M. Correctly Rounded Binary-Decimal and Decimal-Binary Conversions. Numerical Analysis, Manuscript 90-10. AT&T Bell Laboratories (Murray Hill, New Jersey). 30 November 1990. Available as
http://ampl.com/REFS/abstracts.html#rounding. Associated code available as
http://netlib.sandia.gov/fp/dtoa.c and as
http://netlib.sandia.gov/fp/g_fmt.c and may also be found at the various netlib
mirror sites.
The BigInt type represents an
The abstract operation BigInt::unaryMinus takes argument x (a BigInt) and returns a BigInt. It performs the following steps when called:
The abstract operation BigInt::bitwiseNOT takes argument x (a BigInt) and returns a BigInt. It returns the one's complement of x. It performs the following steps when called:
The abstract operation BigInt::exponentiate takes arguments base (a BigInt) and exponent (a BigInt) and returns either a
The abstract operation BigInt::multiply takes arguments x (a BigInt) and y (a BigInt) and returns a BigInt. It performs the following steps when called:
The abstract operation BigInt::divide takes arguments x (a BigInt) and y (a BigInt) and returns either a
The abstract operation BigInt::remainder takes arguments n (a BigInt) and d (a BigInt) and returns either a
The abstract operation BigInt::add takes arguments x (a BigInt) and y (a BigInt) and returns a BigInt. It performs the following steps when called:
The abstract operation BigInt::subtract takes arguments x (a BigInt) and y (a BigInt) and returns a BigInt. It performs the following steps when called:
The abstract operation BigInt::leftShift takes arguments x (a BigInt) and y (a BigInt) and returns a BigInt. It performs the following steps when called:
The abstract operation BigInt::signedRightShift takes arguments x (a BigInt) and y (a BigInt) and returns a BigInt. It performs the following steps when called:
The abstract operation BigInt::unsignedRightShift takes arguments x (a BigInt) and y (a BigInt) and returns a
The abstract operation BigInt::lessThan takes arguments x (a BigInt) and y (a BigInt) and returns a Boolean. It performs the following steps when called:
The abstract operation BigInt::equal takes arguments x (a BigInt) and y (a BigInt) and returns a Boolean. It performs the following steps when called:
The abstract operation BinaryAnd takes arguments x (0 or 1) and y (0 or 1) and returns 0 or 1. It performs the following steps when called:
The abstract operation BinaryOr takes arguments x (0 or 1) and y (0 or 1) and returns 0 or 1. It performs the following steps when called:
The abstract operation BinaryXor takes arguments x (0 or 1) and y (0 or 1) and returns 0 or 1. It performs the following steps when called:
The abstract operation BigIntBitwiseOp takes arguments op (&
, ^
, or |
), x (a BigInt), and y (a BigInt) and returns a BigInt. It performs the following steps when called:
&
, let tmp be |
, let tmp be The abstract operation BigInt::bitwiseAND takes arguments x (a BigInt) and y (a BigInt) and returns a BigInt. It performs the following steps when called:
&
, x, y).The abstract operation BigInt::bitwiseXOR takes arguments x (a BigInt) and y (a BigInt) and returns a BigInt. It performs the following steps when called:
^
, x, y).The abstract operation BigInt::bitwiseOR takes arguments x (a BigInt) and y (a BigInt) and returns a BigInt. It performs the following steps when called:
|
, x, y).The abstract operation BigInt::toString takes arguments x (a BigInt) and radix (an
An Object is logically a collection of properties. Each property is either a data property, or an accessor property:
Properties are identified using key values. A property key value is either an ECMAScript String value or a Symbol value. All String and Symbol values, including the empty String, are valid as property keys. A property name is a property key that
An integer index
Property keys are used to access properties and their values. There are two kinds of access for properties: get and set, corresponding to value retrieval and assignment, respectively. The properties accessible via get and set access includes both own properties that are a direct part of an object and inherited properties which are provided by another associated object via a property inheritance relationship. Inherited properties may be either own or inherited properties of the associated object. Each own property of an object must each have a key value that is distinct from the key values of the other own properties of that object.
All objects are logically collections of properties, but there are multiple forms of objects that differ in their semantics for accessing and manipulating their properties. Please see
Attributes are used in this specification to define and explain the state of Object properties as described in
Attribute Name | Types of property for which it is present | Value Domain | Default Value | Description |
---|---|---|---|---|
[[Value]] |
|
an |
|
The value retrieved by a get access of the property. |
[[Writable]] |
|
a Boolean |
|
If |
[[Get]] |
|
an Object or |
|
If the value |
[[Set]] |
|
an Object or |
|
If the value |
[[Enumerable]] |
|
a Boolean |
|
If |
[[Configurable]] |
|
a Boolean |
|
If |
The actual semantics of objects, in ECMAScript, are specified via algorithms called internal methods. Each object in an ECMAScript engine is associated with a set of internal methods that defines its runtime behaviour. These internal methods are not part of the ECMAScript language. They are defined by this specification purely for expository purposes. However, each object within an implementation of ECMAScript must behave as specified by the internal methods associated with it. The exact manner in which this is accomplished is determined by the implementation.
Internal method names are polymorphic. This means that different object values may perform different algorithms when a common internal method name is invoked upon them. That actual object upon which an internal method is invoked is the “target” of the invocation. If, at runtime, the implementation of an algorithm attempts to use an internal method of an object that the object does not support, a
Internal slots correspond to internal state that is associated with objects and used by various ECMAScript specification algorithms. Internal slots are not object properties and they are not inherited. Depending upon the specific internal slot specification, such state may consist of values of any
All objects have an internal slot named [[PrivateElements]], which is a
Internal methods and internal slots are identified within this specification using names enclosed in double square brackets [[ ]].
An ordinary object is an object that satisfies all of the following criteria:
An exotic object is an object that is not an
This specification recognizes different kinds of
The “Signature” column of
In addition to its parameters, an internal method always has access to the object that is the target of the method invocation.
An internal method implicitly returns a
Internal Method | Signature | Description |
---|---|---|
[[GetPrototypeOf]] | ( ) → Object | Null |
Determine the object that provides inherited properties for this object. A |
[[SetPrototypeOf]] | (Object | Null) → Boolean |
Associate this object with another object that provides inherited properties. Passing |
[[IsExtensible]] | ( ) → Boolean | Determine whether it is permitted to add additional properties to this object. |
[[PreventExtensions]] | ( ) → Boolean |
Control whether new properties may be added to this object. Returns |
[[GetOwnProperty]] |
(propertyKey) → Undefined | |
Return a |
[[DefineOwnProperty]] | (propertyKey, PropertyDescriptor) → Boolean |
Create or alter the own property, whose key is propertyKey, to have the state described by PropertyDescriptor. Return |
[[HasProperty]] | (propertyKey) → Boolean | Return a Boolean value indicating whether this object already has either an own or inherited property whose key is propertyKey. |
[[Get]] | (propertyKey, Receiver) → any |
Return the value of the property whose key is propertyKey from this object. If any ECMAScript code must be executed to retrieve the property value, Receiver is used as the |
[[Set]] | (propertyKey, value, Receiver) → Boolean |
Set the value of the property whose key is propertyKey to value. If any ECMAScript code must be executed to set the property value, Receiver is used as the |
[[Delete]] | (propertyKey) → Boolean |
Remove the own property whose key is propertyKey from this object. Return |
[[OwnPropertyKeys]] |
( ) → |
Return a |
Internal Method | Signature | Description |
---|---|---|
[[Call]] |
(any, a |
Executes code associated with this object. Invoked via a function call expression. The arguments to the internal method are a |
[[Construct]] |
(a |
Creates an object. Invoked via the new operator or a super call. The first argument to the internal method is a super call. The second argument is the object to which the new operator was initially applied. Objects that implement this internal method are called |
The semantics of the essential internal methods for
The Internal Methods of Objects of an ECMAScript engine must conform to the list of invariants specified below. Ordinary ECMAScript Objects as well as all standard
Any implementation provided
An implementation must not allow these invariants to be circumvented in any manner such as by providing alternative interfaces that implement the functionality of the essential internal methods without enforcing their invariants.
The value returned by any internal method must be a
An internal method must not return a
An object's prototype chain should have
As a consequence of the third invariant, if a property is described as a
Well-known intrinsics are built-in objects that are explicitly referenced by the algorithms of this specification and which usually have
Within this specification a reference such as %name% means the intrinsic object, associated with the current
Intrinsic Name | Global Name | ECMAScript Language Association |
---|---|---|
|
AggregateError
|
The AggregateError |
|
Array
|
The Array |
|
ArrayBuffer
|
The ArrayBuffer |
|
The prototype of Array iterator objects ( |
|
|
The prototype of async-from-sync iterator objects ( |
|
|
The |
|
|
The |
|
|
An object that all standard built-in async iterator objects indirectly inherit from | |
|
Atomics
|
The Atomics object ( |
|
BigInt
|
The BigInt |
|
BigInt64Array
|
The BigInt64Array |
|
BigUint64Array
|
The BigUint64Array |
|
Boolean
|
The Boolean |
|
DataView
|
The DataView |
|
Date
|
The Date |
|
decodeURI
|
The decodeURI function ( |
|
decodeURIComponent
|
The decodeURIComponent function ( |
|
encodeURI
|
The encodeURI function ( |
|
encodeURIComponent
|
The encodeURIComponent function ( |
|
Error
|
The Error |
|
eval
|
The eval function ( |
|
EvalError
|
The EvalError |
|
FinalizationRegistry
|
The |
|
Float32Array
|
The Float32Array |
|
Float64Array
|
The Float64Array |
|
The prototype of For-In iterator objects ( |
|
|
Function
|
The Function |
|
The |
|
|
Int8Array
|
The Int8Array |
|
Int16Array
|
The Int16Array |
|
Int32Array
|
The Int32Array |
|
isFinite
|
The isFinite function ( |
|
isNaN
|
The isNaN function ( |
|
An object that all standard built-in iterator objects indirectly inherit from | |
|
JSON
|
The JSON object ( |
|
Map
|
The Map |
|
The prototype of Map iterator objects ( |
|
|
Math
|
The Math object ( |
|
Number
|
The Number |
|
Object
|
The Object |
|
parseFloat
|
The parseFloat function ( |
|
parseInt
|
The parseInt function ( |
|
Promise
|
The Promise |
|
Proxy
|
The Proxy |
|
RangeError
|
The RangeError |
|
ReferenceError
|
The ReferenceError |
|
Reflect
|
The Reflect object ( |
|
RegExp
|
The RegExp |
|
The prototype of RegExp String Iterator objects ( |
|
|
Set
|
The Set |
|
The prototype of Set iterator objects ( |
|
|
SharedArrayBuffer
|
The SharedArrayBuffer |
|
String
|
The String |
|
The prototype of String iterator objects ( |
|
|
Symbol
|
The Symbol |
|
SyntaxError
|
The SyntaxError |
|
A |
|
|
The super class of all typed Array |
|
|
TypeError
|
The TypeError |
|
Uint8Array
|
The Uint8Array |
|
Uint8ClampedArray
|
The Uint8ClampedArray |
|
Uint16Array
|
The Uint16Array |
|
Uint32Array
|
The Uint32Array |
|
URIError
|
The URIError |
|
WeakMap
|
The WeakMap |
|
WeakRef
|
The |
|
WeakSet
|
The WeakSet |
Additional entries in
A specification type corresponds to meta-values that are used within algorithms to describe the semantics of ECMAScript language constructs and
Enums are values which are internal to the specification and not directly observable from ECMAScript code. Enums are denoted using a
The List type is used to explain the evaluation of argument lists (see new
expressions, in function calls, and in other algorithms where a simple ordered list of values is needed. Values of the List type are simply ordered sequences of list elements containing the individual values. These sequences may be of any length. The elements of a list may be randomly accessed using 0-origin indices. For notational convenience an array-like syntax can be used to access List elements. For example, arguments[2] is shorthand for saying the 3rd element of the List arguments.
When an algorithm iterates over the elements of a List without specifying an order, the order used is the order of the elements in the List.
For notational convenience within this specification, a literal syntax can be used to express a new List value. For example, « 1, 2 » defines a List value that has two elements each of which is initialized to a specific value. A new empty List can be expressed as « ».
In this specification, the phrase "the list-concatenation of A, B, ..." (where each argument is a possibly empty List) denotes a new List value whose elements are the concatenation of the elements (in order) of each of the arguments (in order).
The Record type is used to describe data aggregations within the algorithms of this specification. A Record type value consists of one or more named fields. The value of each field is an
For notational convenience within this specification, an object literal-like syntax can be used to express a Record value. For example, { [[Field1]]: 42, [[Field2]]:
In specification text and algorithms, dot notation may be used to refer to a specific field of a Record value. For example, if R is the record shown in the previous paragraph then R.[[Field2]] is shorthand for “the field of R named [[Field2]]”.
Schema for commonly used Record field combinations may be named, and that name may be used as a prefix to a literal Record value to identify the specific kind of aggregations that is being described. For example: PropertyDescriptor { [[Value]]: 42, [[Writable]]:
The Set type is used to explain a collection of unordered elements for use in the
The Relation type is used to explain constraints on Sets. Values of the Relation type are Sets of ordered pairs of values from its value domain. For example, a Relation on events is a set of ordered pairs of events. For a Relation R and two values a and b in the value domain of R, a R b is shorthand for saying the ordered pair (a, b) is a member of R. A Relation is least with respect to some conditions when it is the smallest Relation that satisfies those conditions.
A strict partial order is a Relation value R that satisfies the following.
For all a, b, and c in R's domain:
The two properties above are called irreflexivity and transitivity, respectively.
A strict total order is a Relation value R that satisfies the following.
For all a, b, and c in R's domain:
The three properties above are called totality, irreflexivity, and transitivity, respectively.
The Completion Record specification type is used to explain the runtime propagation of values and control flow such as the behaviour of statements (break
, continue
, return
and throw
) that perform nonlocal transfers of control.
Completion Records have the fields defined in
Field Name | Value | Meaning |
---|---|---|
[[Type]] |
|
The type of completion that occurred. |
[[Value]] |
any value except a |
The value that was produced. |
[[Target]] |
a String or |
The target label for directed control transfers. |
The following shorthand terms are sometimes used to refer to Completion Records.
Callable objects that are defined in this specification only return a normal completion or a throw completion. Returning any other kind of Completion Record is considered an editorial error.
The abstract operation NormalCompletion takes argument value (any value except a
The abstract operation ThrowCompletion takes argument value (an
The abstract operation UpdateEmpty takes arguments completionRecord (a
The Reference Record type is used to explain the behaviour of such operators as delete
, typeof
, the assignment operators, the super
A Reference Record is a resolved name or property binding; its fields are defined by
Field Name | Value | Meaning |
---|---|---|
[[Base]] | an |
The value or |
[[ReferencedName]] | a String, a Symbol, or a |
The name of the binding. Always a String if [[Base]] value is an |
[[Strict]] | a Boolean | |
[[ThisValue]] | an |
If not super |
The following
The abstract operation IsPropertyReference takes argument V (a
The abstract operation IsUnresolvableReference takes argument V (a
The abstract operation IsSuperReference takes argument V (a
The abstract operation IsPrivateReference takes argument V (a
The abstract operation GetValue takes argument V (a
The object that may be created in step
The abstract operation PutValue takes arguments V (a
The object that may be created in step
The abstract operation GetThisValue takes argument V (a
The abstract operation InitializeReferencedBinding takes arguments V (a
The abstract operation MakePrivateReference takes arguments baseValue (an
The Property Descriptor type is used to explain the manipulation and reification of Object property attributes. A Property Descriptor is a
Property Descriptor values may be further classified as data Property Descriptors and accessor Property Descriptors based upon the existence or use of certain fields. A data Property Descriptor is one that includes any fields named either [[Value]] or [[Writable]]. An accessor Property Descriptor is one that includes any fields named either [[Get]] or [[Set]]. Any Property Descriptor may have fields named [[Enumerable]] and [[Configurable]]. A Property Descriptor value may not be both a data Property Descriptor and an accessor Property Descriptor; however, it may be neither (in which case it is a generic Property Descriptor). A fully populated Property Descriptor is one that is either an accessor Property Descriptor or a data Property Descriptor and that has all of the corresponding fields defined in
The following
The abstract operation IsAccessorDescriptor takes argument Desc (a
The abstract operation IsDataDescriptor takes argument Desc (a
The abstract operation IsGenericDescriptor takes argument Desc (a
The abstract operation FromPropertyDescriptor takes argument Desc (a
The abstract operation ToPropertyDescriptor takes argument Obj (an
The abstract operation CompletePropertyDescriptor takes argument Desc (a
The
The Abstract Closure specification type is used to refer to algorithm steps together with a collection of values. Abstract Closures are meta-values and are invoked using function application style such as closure(arg1, arg2). Like
In algorithm steps that create an Abstract Closure, values are captured with the verb "capture" followed by a list of aliases. When an Abstract Closure is created, it captures the value that is associated with each alias at that time. In steps that specify the algorithm to be performed when an Abstract Closure is called, each captured value is referred to by the alias that was used to capture the value.
If an Abstract Closure returns a
Abstract Closures are created inline as part of other algorithms, shown in the following example.
The Data Block specification type is used to describe a distinct and mutable sequence of byte-sized (8 bit) numeric values. A byte value is an
For notational convenience within this specification, an array-like syntax can be used to access the individual bytes of a Data Block value. This notation presents a Data Block value as a 0-origined
A data block that resides in memory that can be referenced from multiple
The semantics of Shared Data Blocks is defined using
The following
The abstract operation CreateByteDataBlock takes argument size (a non-negative
The abstract operation CreateSharedByteDataBlock takes argument size (a non-negative
The abstract operation CopyDataBlockBytes takes arguments toBlock (a
The PrivateElement type is a
Values of the PrivateElement type are
Field Name | Values of the [[Kind]] field for which it is present | Value | Meaning |
---|---|---|---|
[[Key]] | All |
a |
The name of the field, method, or accessor. |
[[Kind]] | All |
|
The kind of the element. |
[[Value]] |
|
an |
The value of the field. |
[[Get]] |
|
a |
The getter for a private accessor. |
[[Set]] |
|
a |
The setter for a private accessor. |
The ClassFieldDefinition type is a
Values of the ClassFieldDefinition type are
Field Name | Value | Meaning |
---|---|---|
[[Name]] |
a |
The name of the field. |
[[Initializer]] |
a |
The initializer of the field, if any. |
The Private Name specification type is used to describe a globally unique value (one which differs from any other Private Name, even if they are otherwise indistinguishable) which represents the key of a private class element (field, method, or accessor). Each Private Name has an associated immutable [[Description]] which
A ClassStaticBlockDefinition Record is a
ClassStaticBlockDefinition Records have the fields listed in
Field Name | Value | Meaning |
---|---|---|
[[BodyFunction]] |
a |
The |