?um/p1-90`
이 명세의 알고리즘은 각각 연관된 타입을 가지는 값들을 조작한다.
가능한 값 타입은 이 절에서 정의된 것들에 정확히 한정된다.
타입은 다시
ECMAScript 언어 타입은 ECMAScript 프로그래머가 ECMAScript 언어를 사용하여 직접 조작하는 값들에 대응한다. ECMAScript 언어 타입은 Undefined, Null, Boolean, String, Symbol, Number, BigInt, Object이다. ECMAScript 언어 값 은 ECMAScript 언어 타입으로 특징지어지는 값이다.
Undefined 타입은 정확히 하나의 값,
Null 타입은 정확히 하나의 값,
Boolean 타입은
String 타입은
최대 길이 253 - 1 요소까지의, 0개 이상의 16비트 부호 없는
String 내용을 해석하지 않는 ECMAScript 연산은 추가 의미를
적용하지 않는다. String 값을 해석하는 연산은 각 요소를 단일 UTF-16
코드 유닛으로 취급한다. 그러나 ECMAScript는 이 코드 유닛들의 값이나
상호 관계를 제한하지 않으므로, String 내용을 UTF-16으로 인코딩된
유니코드 코드 포인트의 시퀀스로 더 해석하는 연산은 잘못 형성된 부분
시퀀스를 고려해야 한다. 이러한 연산은 숫자 값이 0xD800에서 0xDBFF까지의
String.prototype.normalize 함수(참조
String.prototype.localeCompare(참조
이 설계의 근거는 String 구현을 가능한 한 단순하고 고성능으로
유지하는 것이었다.
이 명세에서 "A, B, ...의 string-concatenation "이라는 구(각 인수는 String 값, 코드 유닛, 또는 코드 유닛 시퀀스이다)는 각 인수의 코드 유닛을 (순서대로) 이어 붙인 코드 유닛 시퀀스를 가지는 String 값을 뜻한다.
"inclusiveStart부터 exclusiveEnd까지의 str의
substring"이라는 구(str은 String 값 또는
코드 유닛 시퀀스이고 inclusiveStart와 exclusiveEnd는
"ASCII 단어 문자들"이라는 구는
다음 String 값을 뜻하며, 이는 U+005F (LOW LINE)와 함께 Unicode
Basic Latin 블록의 모든 문자와 숫자만으로 구성된다:
역사적인 이유로, 이것은 다양한 알고리즘에서 의미를 가진다.
The abstract operation StringIndexOf takes arguments string (a String), searchValue (a String), and fromIndex (a non-negative integer) and returns a non-negative integer or
searchValue가 빈 String이고 fromIndex ≤ string의 길이면, 이 알고리즘은 fromIndex를 반환한다. 빈 String은 마지막 코드 유닛 뒤를 포함하여 문자열의 모든 위치에서 사실상 발견된다.
이 알고리즘은 fromIndex + searchValue의 길이 >
string의 길이인 경우 항상
The abstract operation StringLastIndexOf takes arguments string (a String), searchValue (a String), and fromIndex (a non-negative integer) and returns a non-negative integer or
searchValue가 빈 String이면, 이 알고리즘은 fromIndex를 반환한다. 빈 String은 마지막 코드 유닛 뒤를 포함하여 문자열의 모든 위치에서 사실상 발견된다.
Symbol 타입은
Object 프로퍼티의 키로 사용될 수 있는 모든 비-String 값의 집합이다
(
각 Symbol은 고유하며 불변이다.
각 Symbol은 값이 String 또는
well-known symbol은 이 명세의 알고리즘에서 명시적으로 참조되는
내장 Symbol 값이다. 이들은 일반적으로 명세 알고리즘의 확장 지점으로
기능하는 값을 가지는 프로퍼티의 키로 사용된다. 달리 명시되지 않는 한,
well-known symbol 값은 모든
이 명세에서 well-known symbol은, intrinsic이
%Symbol.name%를 사용한다. 특히 다음 이름들이 사용되었다:
@@asyncIterator, @@hasInstance, @@isConcatSpreadable, @@| 명세 이름 | [[Description]] | 값과 목적 |
|---|---|---|
| %Symbol.asyncIterator% |
|
객체의 기본 for-await-of 문의 의미론에 의해 호출된다.
|
| %Symbol.hasInstance% |
|
생성자 객체가 어떤 객체를 해당 생성자의 인스턴스 중 하나로
인식하는지를 결정하는 메서드. instanceof 연산자의 의미론에
의해 호출된다.
|
| %Symbol.isConcatSpreadable% |
|
값이 참이면 객체가
Array.prototype.concat |
| %Symbol.iterator% |
|
객체의 기본 |
| %Symbol.match% |
|
정규 표현식을 문자열에 매치시키는 정규 표현식 메서드.
String.prototype.match |
| %Symbol.matchAll% |
|
문자열에 대한 정규 표현식의 매치를 산출하는 String.prototype.matchAll |
| %Symbol.replace% |
|
문자열의 매치된 부분 문자열을 대체하는 정규 표현식 메서드.
String.prototype.replace |
| %Symbol.search% |
|
문자열에서 정규 표현식과 매치되는 인덱스를 반환하는
정규 표현식 메서드.
String.prototype.search |
| %Symbol.species% |
|
파생 객체를 생성하는 데 사용되는 생성자 함수인 함수 값 프로퍼티. |
| %Symbol.split% |
|
정규 표현식과 매치되는 인덱스에서 문자열을 분할하는 정규 표현식
메서드.
String.prototype.split |
| %Symbol.toPrimitive% |
|
객체를 대응하는 원시 값으로 변환하는 메서드.
|
| %Symbol.toStringTag% |
|
객체의 기본 문자열 설명 생성에 사용되는 String 값 프로퍼티.
내장 메서드
Object.prototype.toString |
| %Symbol.unscopables% |
|
자신의 프로퍼티 이름 및 상속된 프로퍼티 이름이 연관된 객체의
with 환경 바인딩에서 제외되는 프로퍼티 이름들인 객체 값
프로퍼티.
|
ECMAScript에는 두 가지 내장 숫자 타입, Number와 BigInt가 있다.
다음
숫자 타입은 일반적으로 정밀도 손실이나 절단 없이 상호 변환될 수
없기 때문에, ECMAScript 언어는 이 타입들 사이의 암묵적 변환을
제공하지 않는다. 프로그래머는 다른 타입을 요구하는 함수를 호출할 때
타입 간 변환을 위해 Number와 BigInt 함수를 명시적으로 호출해야
한다.
ECMAScript의 초판과 이후 판들은 특정 연산자에 대해 정밀도를
잃거나 절단될 수 있는 암묵적 숫자 변환을 제공해 왔다. 이러한
Number 타입은
정확히 18,437,736,874,454,810,627개(즉,
NaN에 의해 생성된다는 점에 유의하라.) 일부
구현에서는 외부 코드가 여러 NaN 값 사이의 차이를 감지할 수 있을지도
모르지만, 그러한 동작은
또 다른 두 개의 특수 값이 있으며, +Infinity
(또는 단순히 Infinity)와 -Infinity에 의해 생성된다는 점에
유의하라.)
나머지 18,437,736,874,454,810,624개(즉,
+0
(또는 단순히 0)와 -0에 의해 생성된다는 점에 유의하라.)
18,437,736,874,454,810,622개(즉,
그중 18,428,729,675,200,069,632개(즉,
여기서 s는 1 또는 -1이고, m은 252(포함)에서
253(배제)까지의
나머지 9,007,199,254,740,990개(즉,
여기서 s는 1 또는 -1이고, m은 0(배제)에서
252(배제)까지의
크기가 253보다 크지 않은 모든 양의
이 명세에서 “x에 대한
Number value for
”라는 구는, x가 정확한 실수 수학량(π 같은
무리수일 수도 있음)을 나타낼 때, 다음 방식으로 선택되는 Number 값을
의미한다. Number 타입의 모든
+∞에 대한 Number 값은
일부 ECMAScript 연산자는
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 integral Number. It performs the following steps when called:
The abstract operation Number::exponentiate takes arguments base (a Number) and exponent (a Number) and returns a Number. 이것은 base를 exponent 제곱한 결과를 나타내는
base가 ** exponent의 결과는
The abstract operation Number::multiply takes arguments x (a Number) and y (a Number) and returns a Number. 이것은
The abstract operation Number::divide takes arguments x (a Number) and y (a Number) and returns a Number. 이것은
The abstract operation Number::remainder takes arguments n (a Number) and d (a Number) and returns a Number. 이것은 n을 피제수, d를 제수로 하는 암묵적 나눗셈의 나머지를 산출한다. It performs the following steps when called:
C와 C++에서 remainder 연산자는
% 연산자가 계산하는 부동소수점 remainder 연산의 결과는
%가 Java의
The abstract operation Number::add takes arguments x (a Number) and y (a Number) and returns a Number. 이것은
The abstract operation Number::subtract takes arguments x (a Number) and y (a Number) and returns a Number. 이것은 뺄셈을 수행하여 피감수 x와 감수 y의 차를 생성한다. It performs the following steps when called:
x - y가 x + (-y)와 항상 같은 결과를 생성한다는 것은
언제나 성립한다.
The abstract operation Number::leftShift takes arguments x (a Number) and y (a Number) and returns an integral Number. It performs the following steps when called:
The abstract operation Number::signedRightShift takes arguments x (a Number) and y (a Number) and returns an integral Number. It performs the following steps when called:
The abstract operation Number::unsignedRightShift takes arguments x (a Number) and y (a Number) and returns an integral Number. It performs the following steps when called:
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 integral Number. It performs the following steps when called:
&이면,^이면,|이다.The abstract operation Number::bitwiseAND takes arguments x (a Number) and y (a Number) and returns an integral Number. It performs the following steps when called:
&, x, y)를 반환한다.The abstract operation Number::bitwiseXOR takes arguments x (a Number) and y (a Number) and returns an integral Number. It performs the following steps when called:
^, x, y)를 반환한다.The abstract operation Number::bitwiseOR takes arguments x (a Number) and y (a Number) and returns an integral Number. It performs the following steps when called:
|, x, y)를 반환한다.The abstract operation Number::toString takes arguments x (a Number) and radix (an integer in the inclusive interval from 2 to 36) and returns a String. 이것은 x를 기수 radix의 위치 표기 수 체계를 사용하여
String으로 나타낸다. 기수 r을 사용하는 숫자 표현에 사용되는
숫자들은
1.2e+3과 같은 과학적 E 표기법을 사용하여 표현된다.
위 규칙보다 더 정확한 변환을 제공하는 구현에 대해서는, 단계
ECMAScript 구현자는 부동소수점 수의 이진-십진 변환을 위해 David M. Gay가 작성한 논문과 코드가 유용할 수 있다.
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
https://ampl.com/_archive/first-website/REFS/rounding.pdf. 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.
BigInt 타입은
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. 이것은 x의 1의 보수를 반환한다. 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:
&이면,|이면,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 integer in the inclusive interval from 2 to 36) and returns a String. 이것은 x를 기수 radix의 위치 표기 수 체계를 사용하여
String으로 나타낸다. 기수 r을 사용하는 BigInt 표현에 사용되는
숫자들은
Object 타입의 각 인스턴스, 즉 간단히 “an Object”라고도 불리는 것은 프로퍼티들의 집합을 나타낸다. 각 프로퍼티는 데이터 프로퍼티이거나 접근자 프로퍼티이다.
객체의 프로퍼티는 프로퍼티 키를 사용하여 고유하게 식별된다. property key 는 String 또는 Symbol이다. 빈 String을 포함한 모든 String과 Symbol은 프로퍼티 키로 유효하다. property name은 String인 프로퍼티 키이다.
integer index
는
모든 음이 아닌
프로퍼티 키는 프로퍼티와 그 값을 접근하는 데 사용된다. 프로퍼티 접근에는 두 종류가 있다: get과 set으로, 각각 값 검색과 값 할당에 대응한다. get 및 set 접근을 통해 접근 가능한 프로퍼티에는, 객체의 직접적인 일부인 own properties와, 프로퍼티 상속 관계를 통해 다른 연관 객체가 제공하는 inherited properties가 모두 포함된다. 상속된 프로퍼티는 그 연관 객체의 own 프로퍼티일 수도 있고 상속된 프로퍼티일 수도 있다. 객체의 각 own 프로퍼티는 반드시 그 객체의 다른 own 프로퍼티의 키 값들과 구별되는 키 값을 가져야 한다.
모든 객체는 논리적으로 프로퍼티들의 집합이지만, 프로퍼티 접근과
조작의 의미론이 서로 다른 여러 형태의 객체가 존재한다. 여러 형태의
객체 정의는
또한 일부 객체는 호출 가능하다. 이들은 함수 또는 함수 객체라고 불리며 아래에서 더 설명된다. ECMAScript의 모든 함수는 Object 타입의 구성원이다.
속성은 이 명세에서
| 속성 이름 | 존재하는 프로퍼티 유형 | 값의 영역 | 기본값 | 설명 |
|---|---|---|---|---|
| [[Value]] | 데이터 프로퍼티 |
|
프로퍼티에 대한 get 접근 시 검색되는 값. | |
| [[Writable]] | 데이터 프로퍼티 | Boolean |
|
|
| [[Get]] | 접근자 프로퍼티 |
Object 또는 |
|
값이 Object인 경우 반드시 함수 객체여야 한다. 그 함수의 [[Call]] 내부 메서드( |
| [[Set]] | 접근자 프로퍼티 |
Object 또는 |
|
값이 Object인 경우 반드시 함수 객체여야 한다. 그 함수의 [[Call]] 내부 메서드( |
| [[Enumerable]] | 데이터 프로퍼티 또는 접근자 프로퍼티 | Boolean |
|
|
| [[Configurable]] | 데이터 프로퍼티 또는 접근자 프로퍼티 | Boolean |
|
|
ECMAScript에서 객체의 실제 의미론은 internal methods라고 불리는 알고리즘을 통해 명세된다. ECMAScript 엔진의 각 객체는 그 객체의 런타임 동작을 정의하는 내부 메서드 집합과 연관된다. 이러한 내부 메서드는 ECMAScript 언어의 일부가 아니다. 이들은 순전히 설명 목적을 위해 이 명세에서 정의된다. 그러나 ECMAScript 구현 내의 각 객체는 자신과 연관된 내부 메서드가 명세한 대로 동작해야 한다. 이를 정확히 어떤 방식으로 달성하는지는 구현이 결정한다.
내부 메서드 이름은 다형적이다. 즉, 서로 다른 객체 값은 동일한
내부 메서드 이름이 호출될 때 서로 다른 알고리즘을 수행할 수 있다.
내부 메서드가 호출되는 실제 객체는 호출의 “target”이다. 런타임에,
알고리즘 구현이 어떤 객체가 지원하지 않는 내부 메서드를 사용하려고
하면,
내부 슬롯은 객체, Symbol, 또는
모든 객체는 [[PrivateElements]]라는 이름의 내부 슬롯을 가지며,
이는
이 명세에서 내부 메서드와 내부 슬롯은 이중 대괄호 [[ ]]로 둘러싼 이름으로 식별된다.
ordinary object는 다음 기준을 모두 만족하는 객체이다.
exotic object는
이 명세는 객체들의 내부 메서드를 기준으로 서로 다른 종류의
매개변수 외에도, 내부 메서드는 항상 그 메서드 호출의 target인 객체에 접근할 수 있다.
내부 메서드는 암묵적으로
| 내부 메서드 | 시그니처 | 설명 |
|---|---|---|
| [[GetPrototypeOf]] | ( ) → Object | Null |
이 객체에 상속된 프로퍼티를 제공하는 객체를 결정한다.
|
| [[SetPrototypeOf]] | (Object | Null) → Boolean |
이 객체를 상속된 프로퍼티를 제공하는 다른 객체와 연관시킨다.
|
| [[IsExtensible]] | ( ) → Boolean | 이 객체에 추가 프로퍼티를 더하는 것이 허용되는지를 결정한다. |
| [[PreventExtensions]] | ( ) → Boolean |
이 객체에 새로운 프로퍼티를 추가할 수 있는지를 제어한다.
연산이 성공하면 |
| [[GetOwnProperty]] |
(propertyKey) → Undefined | |
키가 propertyKey인 이 객체의 own 프로퍼티에 대한
|
| [[DefineOwnProperty]] | (propertyKey, propertyDescriptor) → Boolean |
키가 propertyKey인 own 프로퍼티를 생성하거나 변경하여
propertyDescriptor가 설명하는 상태를 가지게 한다.
그 프로퍼티가 성공적으로 생성/갱신되면 |
| [[HasProperty]] | (propertyKey) → Boolean | 이 객체가 이미 키가 propertyKey인 own 또는 상속 프로퍼티를 가지고 있는지를 나타내는 Boolean 값을 반환한다. |
| [[Get]] | (propertyKey, receiver) → any |
키가 propertyKey인 프로퍼티의 값을 이 객체로부터 반환한다.
프로퍼티 값을 검색하기 위해 ECMAScript 코드를 실행해야 한다면,
receiver는 그 코드를 평가할 때 |
| [[Set]] | (propertyKey, value, receiver) → Boolean |
키가 propertyKey인 프로퍼티의 값을 value로 설정한다.
프로퍼티 값을 설정하기 위해 ECMAScript 코드를 실행해야 한다면,
receiver는 그 코드를 평가할 때 |
| [[Delete]] | (propertyKey) → Boolean |
키가 propertyKey인 own 프로퍼티를 이 객체에서 제거한다.
프로퍼티가 삭제되지 않았고 여전히 존재하면 |
| [[OwnPropertyKeys]] |
( ) → |
객체의 모든 own 프로퍼티 키를 요소로 가지는 |
| 내부 메서드 | 시그니처 | 설명 |
|---|---|---|
| [[Call]] |
(any, a |
이 객체와 연관된 코드를 실행한다. 함수 호출 표현식을 통해 호출된다. 내부 메서드의 인수는 |
| [[Construct]] |
(a |
객체를 생성한다. new 연산자나 super 호출을 통해 호출된다. 내부 메서드의 첫 번째 인수는 super 호출의 인수들을 요소로 가지는 new 연산자가 처음 적용된 객체이다. 이 내부 메서드를 구현하는 객체를 |
ECMAScript 엔진의 객체 내부 메서드는 아래에 명세된 불변식 목록을
준수해야 한다. ordinary ECMAScript 객체와 이 명세의 모든 표준
구현이 제공하는 모든
구현은 essential internal methods의 기능을 구현하면서 그 불변식을 강제하지 않는 대체 인터페이스를 제공하는 방식 등을 포함하여, 어떤 방법으로든 이러한 불변식이 우회되도록 허용해서는 안 된다.
어떤 내부 메서드가 반환하는 값은 반드시 다음 중 하나를 가지는
내부 메서드는 continue 완료, break 완료, 또는 return 완료를 반환해서는 안 된다.
객체의 프로토타입 체인은
세 번째 불변식의 결과로, 어떤 프로퍼티가 데이터 프로퍼티로
기술되었고 시간이 지나며 다른 값을 반환할 수 있다면, 값을 바꾸는
메커니즘이 다른 essential internal methods를 통해 노출되지 않더라도
[[Writable]]과 [[Configurable]] 속성 중 하나 또는 둘 다 반드시
well-known intrinsic은 이 명세의 알고리즘에서 명시적으로 참조되며,
보통
이 명세에서 %name%과 같은 참조는 현재
| Intrinsic 이름 | 전역 이름 | ECMAScript 언어 연관 |
|---|---|---|
|
|
AggregateError
|
AggregateError 생성자
( |
|
|
Array
|
Array 생성자
( |
|
|
ArrayBuffer
|
ArrayBuffer 생성자
( |
|
|
|
|
|
|
|
|
|
|
async function 객체들의 생성자
( |
|
|
|
async generator function 객체들의 생성자
( |
|
|
|
async generator 객체들의 prototype
( |
|
|
|
모든 표준 내장 |
|
|
|
Atomics
|
Atomics 객체
( |
|
|
BigInt
|
BigInt 생성자
( |
|
|
BigInt64Array
|
BigInt64Array 생성자
( |
|
|
BigUint64Array
|
BigUint64Array 생성자
( |
|
|
Boolean
|
Boolean 생성자
( |
|
|
DataView
|
DataView 생성자
( |
|
|
Date
|
Date 생성자
( |
|
|
decodeURI
|
decodeURI 함수
( |
|
|
decodeURIComponent
|
decodeURIComponent 함수
( |
|
|
encodeURI
|
encodeURI 함수
( |
|
|
encodeURIComponent
|
encodeURIComponent 함수
( |
|
|
Error
|
Error 생성자
( |
|
|
eval
|
eval 함수
( |
|
|
EvalError
|
EvalError 생성자
( |
|
|
FinalizationRegistry
|
|
|
|
Float16Array
|
Float16Array 생성자
( |
|
|
Float32Array
|
Float32Array 생성자
( |
|
|
Float64Array
|
Float64Array 생성자
( |
|
|
|
|
|
|
Function
|
Function 생성자
( |
|
|
generator function 객체들의 생성자
( |
|
|
|
generator 객체들의 prototype
( |
|
|
|
Int8Array
|
Int8Array 생성자
( |
|
|
Int16Array
|
Int16Array 생성자
( |
|
|
Int32Array
|
Int32Array 생성자
( |
|
|
isFinite
|
isFinite 함수
( |
|
|
isNaN
|
isNaN 함수
( |
|
|
Iterator
|
Iterator 생성자
( |
|
|
|
|
|
|
JSON
|
JSON 객체
( |
|
|
Map
|
Map 생성자
( |
|
|
|
|
|
|
Math
|
Math 객체
( |
|
|
Number
|
Number 생성자
( |
|
|
Object
|
Object 생성자
( |
|
|
parseFloat
|
parseFloat 함수
( |
|
|
parseInt
|
parseInt 함수
( |
|
|
Promise
|
Promise 생성자
( |
|
|
Proxy
|
Proxy 생성자
( |
|
|
RangeError
|
RangeError 생성자
( |
|
|
ReferenceError
|
ReferenceError 생성자
( |
|
|
Reflect
|
Reflect 객체
( |
|
|
RegExp
|
RegExp 생성자
( |
|
|
|
|
|
|
Set
|
Set 생성자
( |
|
|
|
|
|
|
SharedArrayBuffer
|
SharedArrayBuffer 생성자
( |
|
|
String
|
String 생성자
( |
|
|
|
|
|
|
Symbol
|
Symbol 생성자
( |
|
|
SyntaxError
|
SyntaxError 생성자
( |
|
|
조건 없이 새로운 |
|
|
|
모든 typed Array 생성자의 상위 클래스
( |
|
|
|
TypeError
|
TypeError 생성자
( |
|
|
Uint8Array
|
Uint8Array 생성자
( |
|
|
Uint8ClampedArray
|
Uint8ClampedArray 생성자
( |
|
|
Uint16Array
|
Uint16Array 생성자
( |
|
|
Uint32Array
|
Uint32Array 생성자
( |
|
|
URIError
|
URIError 생성자
( |
|
|
WeakMap
|
WeakMap 생성자
( |
|
|
WeakRef
|
|
|
|
WeakSet
|
WeakSet 생성자
( |
|
|
Iterator.from이 반환하는 wrapped |
명세 타입은 ECMAScript 언어 구성요소와
Enum은 명세 내부에 존재하며
ECMAScript 코드에서 직접 관찰되지 않는 값이다. Enum은
List 타입은 new 표현식, 함수 호출,
그리고 단순한 순서 있는 값 목록이 필요한 다른 알고리즘에서 인수 목록의
평가(참조
알고리즘이 List의 요소를 순서를 명시하지 않고 반복할 때, 사용되는 순서는 List 안의 요소 순서이다.
이 명세에서는 표기상 편의를 위해 새로운 List 값을 표현하는 리터럴 문법을 사용할 수 있다. 예를 들어, « 1, 2 »는 각 요소가 특정 값으로 초기화된 두 개 요소를 가진 List 값을 정의한다. 새로운 빈 List는 « »로 표현할 수 있다.
이 명세에서 "A, B, ...의 list-concatenation"이라는 구 (각 인수는 비어 있을 수도 있는 List이다)는 각 인수의 요소들을 (순서대로) 이어 붙인 요소들을 가지는 새로운 List 값을 뜻한다.
String들의 List에 적용될 때, "
lexicographic code unit order에 따라 정렬됨
"이라는 구는, 더 짧은
문자열의 길이까지 각 코드 유닛의 숫자 값을 기준으로 정렬하고, 모두
같다면 짧은 문자열을 긴 문자열보다 앞에 두는 것을 의미하며, 이는
Record 타입은 이 명세의 알고리즘 안에서
데이터 집합을 설명하는 데 사용된다. Record 타입 값은 하나 이상의 이름
붙은 필드로 이루어진다. 각 필드의 값은
이 명세에서는 표기상 편의를 위해 객체 리터럴과 유사한 문법을 사용해
Record 값을 표현할 수 있다. 예를 들어,
{ [[Field1]]: 42, [[Field2]]:
명세 텍스트와 알고리즘에서는 점 표기법을 사용하여 Record 값의 특정 필드를 참조할 수 있다. 예를 들어, R이 앞 문단에 표시된 record라면 R.[[Field2]]는 “R의 [[Field2]]라는 이름의 필드”를 말하는 축약 표현이다.
자주 사용되는 Record 필드 조합의 스키마에는 이름이 붙을 수 있으며,
그 이름은 특정 종류의 집합을 식별하기 위해 리터럴 Record 값의 접두사로
사용될 수 있다. 예:
PropertyDescriptor { [[Value]]: 42, [[Writable]]:
Set 타입은
Relation 타입은 Set에 대한 제약을 설명하는 데 사용된다. Relation 타입의 값은 자신의 값 영역으로부터의 값들의 순서쌍들의 Set이다. 예를 들어, Memory event 위의 Relation은 Memory event 순서쌍들의 집합이다. Relation R과 R의 값 영역 안의 두 값 a, b에 대해, a R b는 순서쌍 (a, b)가 R의 원소임을 말하는 축약 표현이다. 어떤 조건들에 대한 least Relation은 그 조건들을 만족하는 가장 작은 Relation이다.
strict partial order는 다음을 만족하는 Relation 값 R이다.
R의 영역에 있는 모든 a, b, c에 대해:
위 두 성질은 각각 irreflexivity와 transitivity라고 불린다.
strict total order는 다음을 만족하는 Relation 값 R이다.
R의 영역에 있는 모든 a, b, c에 대해:
위 세 성질은 각각 totality, irreflexivity, transitivity라고 불린다.
Completion Record 명세 타입은
값과 제어 흐름의 런타임 전파를 설명하는 데 사용되며, 여기에는 비국소적인
제어 이전을 수행하는 문장(break, continue, return, throw)의
동작이 포함된다.
Completion Record는
| 필드 이름 | 값 | 의미 |
|---|---|---|
| [[Type]] |
|
발생한 완료의 유형. |
| [[Value]] |
|
생성된 값. |
| [[Target]] |
String 또는 |
방향이 있는 제어 이전을 위한 대상 레이블. |
다음 축약 용어들은 때때로 Completion Record를 가리키는 데 사용된다.
이 명세에 정의된 callable object는 normal completion 또는 throw completion만 반환한다. 다른 종류의 Completion Record를 반환하는 것은 편집상의 오류로 간주된다.
The abstract operation NormalCompletion takes argument value (any value except a
The abstract operation ThrowCompletion takes argument value (an ECMAScript language value) and returns a
The abstract operation ReturnCompletion takes argument value (an ECMAScript language value) and returns a
The abstract operation UpdateEmpty takes arguments completionRecord (a
Reference Record 타입은
delete, typeof, 할당 연산자들, super
Reference Record는 해석된 이름 또는 (아직 해석되지 않았을 수도 있는)
프로퍼티 바인딩이며, 그 필드는
| 필드 이름 | 값 | 의미 |
|---|---|---|
| [[Base]] | ECMAScript 언어 값, |
바인딩을 보유하는 값 또는 |
| [[ReferencedName]] | ECMAScript 언어 값 또는 |
바인딩의 이름. [[Base]] 값이 |
| [[Strict]] | Boolean | |
| [[ThisValue]] | ECMAScript 언어 값 또는 |
super |
다음
The abstract operation IsPropertyReference takes argument referenceRecord (a
The abstract operation IsUnresolvableReference takes argument referenceRecord (a
The abstract operation IsSuperReference takes argument referenceRecord (a
The abstract operation IsPrivateReference takes argument referenceRecord (a
The abstract operation GetValue takes argument referenceRecord (a
단계
The abstract operation PutValue takes arguments referenceRecord (a
단계
The abstract operation GetThisValue takes argument referenceRecord (a
The abstract operation InitializeReferencedBinding takes arguments referenceRecord (a
The abstract operation MakePrivateReference takes arguments baseValue (an ECMAScript language value) and privateIdentifier (a String) and returns a
Property Descriptor 타입은
Object 프로퍼티 속성의 조작과 재현을 설명하는 데 사용된다. Property
Descriptor는 0개 이상의 필드를 가진
Property Descriptor 값은 특정 필드의 존재 또는 사용에 따라 데이터
Property Descriptor와 접근자 Property Descriptor로 더 분류될 수 있다.
데이터 Property Descriptor는 [[Value]] 또는 [[Writable]]라는 이름의
필드를 포함하는 것이다. 접근자 Property Descriptor는 [[Get]] 또는
[[Set]]라는 이름의 필드를 포함하는 것이다. 모든 Property Descriptor는
[[Enumerable]]과 [[Configurable]]라는 이름의 필드를 가질 수 있다.
Property Descriptor 값은 데이터 Property Descriptor이면서 동시에
접근자 Property Descriptor일 수는 없다. 그러나 둘 다 아닐 수는 있다
(이 경우 generic Property Descriptor이다).
fully populated Property Descriptor는 접근자 Property
Descriptor 또는 데이터 Property Descriptor 중 하나이며, 그에 대응하는
모든 필드가
다음
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 ECMAScript language value) and returns either a
The abstract operation CompletePropertyDescriptor takes argument desc (a
Abstract Closure 명세 타입은
값의 집합과 함께 알고리즘 단계를 참조하는 데 사용된다. Abstract
Closure는 메타값이며, closure(arg1, arg2)와 같은 함수 적용
스타일을 사용하여 호출된다.
Abstract Closure를 생성하는 알고리즘 단계에서는 "capture"라는 동사 뒤에 alias 목록을 사용하여 값을 포착한다. Abstract Closure가 생성될 때, 각 alias와 연관된 값을 그 시점에 포착한다. Abstract Closure가 호출될 때 수행할 알고리즘을 명시하는 단계에서는, 각 포착된 값이 그 값을 포착하는 데 사용된 alias로 참조된다.
Abstract Closure가
Abstract Closure는 다른 알고리즘의 일부로 인라인으로 생성되며, 다음 예시에 나타나 있다.
Data Block 명세 타입은 서로 구별되며
가변적인 바이트 크기(8비트) 숫자 값들의 시퀀스를 설명하는 데 사용된다.
byte value는 0에서 255까지의
이 명세에서는 표기상 편의를 위해 배열과 유사한 문법을 사용하여 Data
Block 값의 개별 바이트에 접근할 수 있다. 이 표기법은 Data Block 값을
0부터 시작하는
여러 agent가 동시에 참조할 수 있는 메모리에 존재하는 data block은 Shared Data Block으로 지정된다. Shared Data Block은 (Shared Data Block 값의 동등성 검사를 위한 목적상) address-free한 identity를 가진다. 즉, 이 identity는 어떤 프로세스에서 그 블록이 매핑되는 가상 주소에 묶이지 않고, 그 블록이 나타내는 메모리 위치들의 집합에 묶인다. 두 data block은 자신들이 포함하는 위치의 집합이 같을 때에만 같으며, 그렇지 않으면 같지 않고, 포함하는 위치 집합의 교집합은 공집합이다. 마지막으로, Shared Data Block은 Data Block과 구별될 수 있다.
Shared Data Block의 의미론은
Shared Data Block event는
다음
The abstract operation CreateByteDataBlock takes argument size (a non-negative integer) and returns either a
The abstract operation CreateSharedByteDataBlock takes argument size (a non-negative integer) and returns either a
The abstract operation CopyDataBlockBytes takes arguments toBlock (a
PrivateElement 타입은 private class field, method, accessor의 명세에
사용되는
PrivateElement 타입의 값은
| 필드 이름 | 존재하는 [[Kind]] 필드 값 | 값 | 의미 |
|---|---|---|---|
| [[Key]] | 모두 |
|
field, method, 또는 accessor의 이름. |
| [[Kind]] | 모두 |
|
element의 종류. |
| [[Value]] |
|
field의 값. | |
| [[Get]] |
|
함수 객체 또는 |
private accessor의 getter. |
| [[Set]] |
|
함수 객체 또는 |
private accessor의 setter. |
ClassFieldDefinition 타입은 class field의 명세에 사용되는
ClassFieldDefinition 타입의 값은
| 필드 이름 | 값 | 의미 |
|---|---|---|
| [[Name]] |
|
field의 이름. |
| [[Initializer]] |
ECMAScript 함수 객체 또는 |
존재하는 경우 field의 initializer. |
Private Name 명세 타입은 private
class element(field, method, accessor)의 키를 나타내는, 전역적으로
고
ClassStaticBlockDefinition Record
는 class static initialization block의 실행 가능한 코드를 캡슐화하는 데
사용되는
ClassStaticBlockDefinition Record는
| 필드 이름 | 값 | 의미 |
|---|---|---|
| [[BodyFunction]] | ECMAScript 함수 객체 | class의 static initialization 동안 호출될 함수 객체. |