?um/p1-90`이 section,
read-modify-write modification function은 two
read-modify-write modification function의 algorithm steps가 pure, mathematical function을 constitute하는지 verifying하는 데 도움을 주기 위해, 다음 editorial conventions가 recommended됩니다:
fixed-length ArrayBuffer는 creation 후 byte length가 change될 수 없는 ArrayBuffer입니다.
resizable ArrayBuffer는
created되는 ArrayBuffer object의 kind는
The abstract operation AllocateArrayBuffer takes arguments ctor (생성자) and byteLength (음이 아닌 정수) and optional argument maxByteLength (음이 아닌 정수 또는
The abstract operation ArrayBufferByteLength takes arguments arrayBuffer (ArrayBuffer 또는 SharedArrayBuffer) and order (
The abstract operation ArrayBufferCopyAndDetach takes arguments arrayBuffer (ECMAScript 언어 값), newLength (ECMAScript 언어 값), and preserveResizability (
realloc으로 구현할 수 있다.The abstract operation IsDetachedBuffer takes argument arrayBuffer (ArrayBuffer 또는 SharedArrayBuffer) and returns Boolean. It performs the following steps when called:
The abstract operation DetachArrayBuffer takes argument arrayBuffer (ArrayBuffer) and optional argument key (아무것) and returns
ArrayBuffer 인스턴스를 detach하면 backing store로 사용되는
The abstract operation CloneArrayBuffer takes arguments sourceBuffer (ArrayBuffer 또는 SharedArrayBuffer), sourceByteOffset (음이 아닌 정수), and sourceLength (음이 아닌 정수) and returns ArrayBuffer를 포함하는 정상 완료 또는 throw 완료. sourceByteOffset에서 시작하여 sourceLength 바이트 동안 이어지는 범위에 걸친 sourceBuffer의 데이터 복사본을 데이터로 가지는 새 ArrayBuffer를 만든다. It performs the following steps when called:
The abstract operation GetArrayBufferMaxByteLengthOption takes argument options (an
The
HostResizeArrayBuffer의 구현은 다음 요구사항을 준수해야 한다:
HostResizeArrayBuffer의 기본 구현은
The abstract operation IsFixedLengthArrayBuffer takes argument arrayBuffer (ArrayBuffer 또는 SharedArrayBuffer) and returns Boolean. It performs the following steps when called:
The abstract operation IsUnsignedElementType takes argument type (
The abstract operation IsUnclampedIntegerElementType takes argument type (
The abstract operation IsBigIntElementType takes argument type (
The abstract operation IsNoTearConfiguration takes arguments type (a
The abstract operation RawBytesToNumeric takes arguments type (
The abstract operation GetRawBytesFromSharedBlock takes arguments block (
The abstract operation GetValueFromBuffer takes arguments arrayBuffer (ArrayBuffer 또는 SharedArrayBuffer), byteIndex (음이 아닌 정수), type (
The abstract operation NumericToRawBytes takes arguments type (
The abstract operation SetValueInBuffer takes arguments arrayBuffer (an ArrayBuffer or SharedArrayBuffer), byteIndex (a non-negative
The abstract operation GetModifySetValueInBuffer takes arguments arrayBuffer (ArrayBuffer 또는 SharedArrayBuffer), byteIndex (음이 아닌 정수), type (
ArrayBuffer
extends 절의 값으로 사용될 수 있다. 지정된 ArrayBuffer 동작을 상속하려는 서브클래스 생성자는 ArrayBuffer.prototype의 내장 메서드를 지원하는 데 필요한 내부 상태로 서브클래스 인스턴스를 생성하고 초기화하기 위해 ArrayBuffer 생성자에 대한 super 호출을 포함해야 한다.이 function은 called될 때 다음 steps를 수행합니다:
ArrayBuffer
이 function은 called될 때 다음 steps를 수행합니다:
ArrayBuffer.prototype의 initial value는
이 property는 attributes { [[Writable]]:
ArrayBuffer[%Symbol.species%]는 set accessor function이
이 function의
ArrayBuffer prototype object는:
ArrayBuffer.prototype.byteLength는 set accessor function이
ArrayBuffer.prototype.constructor의 initial value는
ArrayBuffer.prototype.detached는 set accessor function이
ArrayBuffer.prototype.maxByteLength는 set accessor function이
ArrayBuffer.prototype.resizable는 set accessor function이
이 method는 called될 때 다음 steps를 수행합니다:
이 method는 called될 때 다음 steps를 수행합니다:
이 method는 called될 때 다음 steps를 수행합니다:
이 method는 called될 때 다음 steps를 수행합니다:
이 property는 attributes { [[Writable]]:
ArrayBuffer instances는
[[ArrayBufferData]]가
[[ArrayBufferDetachKey]]가
다음은
가능한 경우 programs를 그 deployment environments에서 test할 것을 recommend합니다. available physical memory의 amount는 hardware devices 사이에서 크게 differs합니다. Similarly, virtual memory subsystems 또한 hardware devices 및 operating systems 사이에서 크게 differs합니다. 64-bit desktop web browser에서 out-of-memory errors 없이 runs하는 application이 32-bit mobile web browser에서는 memory가 부족해질 수 있습니다.
particular maximum size에 대해
다음은
fixed-length SharedArrayBuffer는 creation 후 byte length가 change될 수 없는 SharedArrayBuffer입니다.
growable SharedArrayBuffer는
created되는 SharedArrayBuffer object의 kind는
The abstract operation AllocateSharedArrayBuffer takes arguments ctor (a
The abstract operation IsSharedArrayBuffer takes argument obj (an ArrayBuffer or a SharedArrayBuffer) and returns a Boolean. object가 SharedArrayBuffer인지 tests합니다. It performs the following steps when called:
The abstract operation IsGrowableSharedArrayBuffer takes argument obj (an ArrayBuffer or a SharedArrayBuffer) and returns a Boolean. object가
The
HostGrowSharedArrayBuffer의 implementation은 다음 requirements를 conform해야 합니다:
위의 second requirement는 buffer의 current byte length가 how 또는 when read되는지에 대해 intentionally vague합니다. byte length는 underlying hardware에서 atomic read-modify-write operation을 통해 updated되어야 하므로, load-link/store-conditional 또는 load-exclusive/store-exclusive instruction pairs를 사용하는 architectures는 paired instructions를 instruction stream 안에서 close하게 유지하기를 원할 수 있습니다. 따라서
이는 0 ≤ newByteLength ≤ buffer.[[ArrayBufferMaxByteLength]]가 guaranteed되는
HostGrowSharedArrayBuffer의 default implementation은
SharedArrayBuffer
extends 절의 값으로 사용될 수 있다. 지정된 SharedArrayBuffer 동작을 상속하려는 서브클래스 생성자는 SharedArrayBuffer.prototype의 내장 메서드를 지원하는 데 필요한 내부 상태로 서브클래스 인스턴스를 생성하고 초기화하기 위해 SharedArrayBuffer 생성자에 대한 super 호출을 포함해야 한다.ArrayBuffer와 달리, SharedArrayBuffer는 detached될 수 없고, its internal [[ArrayBufferData]] slot은 never
이 function은 called될 때 다음 steps를 수행합니다:
SharedArrayBuffer
SharedArrayBuffer.prototype의 initial value는
이 property는 attributes { [[Writable]]:
SharedArrayBuffer[%Symbol.species%]는 set accessor function이
이 function의
SharedArrayBuffer prototype object는:
SharedArrayBuffer.prototype.byteLength는 set accessor function이
SharedArrayBuffer.prototype.constructor의 initial value는
이 method는 called될 때 다음 steps를 수행합니다:
length를 update하는 compare-exchange의 spurious failures는 prohibited됩니다. new length에 대한 bounds checking이 passes하고 implementation이 out of memory가 아니면,
SharedArrayBuffer.prototype.grow에 대한 parallel calls는 totally ordered됩니다. 예를 들어, 두 racing calls sab.grow(10)과 sab.grow(20)을 consider하십시오. 두 calls 중 하나는 race에서 win하는 것이 guaranteed됩니다. sab.grow(20)이 먼저 happened하더라도 sab.grow(10)에 대한 call은 never sab를 shrink하지 않습니다; 그 경우 대신 RangeError를 throw합니다.
SharedArrayBuffer.prototype.growable은 set accessor function이
SharedArrayBuffer.prototype.maxByteLength는 set accessor function이
이 method는 called될 때 다음 steps를 수행합니다:
이 property는 attributes { [[Writable]]:
SharedArrayBuffer instances는
SharedArrayBuffer instances는 ArrayBuffer instances와 달리 never detached됩니다.
다음은
가능한 경우 programs를 그 deployment environments에서 test할 것을 recommend합니다. available physical memory의 amount는 hardware devices 사이에서 greatly differ합니다. Similarly, virtual memory subsystems 또한 hardware devices 및 operating systems 사이에서 greatly differ합니다. 64-bit desktop web browser에서 out-of-memory errors 없이 runs하는 application이 32-bit mobile web browser에서는 memory가 부족해질 수 있습니다.
particular maximum size에 대해
u8[idx],는 synchronizing하지 않습니다. 일반적으로 explicit synchronization이 없을 때, one property access가 in-bound라는 것이 same length와 byteLength getters를 통한 length의 explicit loads는 synchronizing합니다.
다음은
grow operations는
Grown memory는 creation 순간부터 zeroed된 것으로 appear해야 하며, parallel한 any racy accesses에도 포함됩니다. 이는 zero-filled-on-demand virtual memory pages를 통해 또는 manually zeroing memory하는 경우 careful synchronization을 통해 accomplished될 수 있습니다.
growable SharedArrayBuffers의
In practice, virtual memory가 없는
DataView With Buffer Witness Record는 viewed buffer의 cached byte length와 함께 DataView를 encapsulate하는 데 사용되는
DataView With Buffer Witness Records는
| Field Name | Value | Meaning |
|---|---|---|
| [[Object]] | a DataView | buffer's byte length가 loaded되는 DataView object입니다. |
| [[CachedBufferByteLength]] |
a non-negative |
|
The abstract operation MakeDataViewWithBufferWitnessRecord takes arguments obj (a DataView) and order (
The abstract operation GetViewByteLength takes argument viewRecord (a
The abstract operation IsViewOutOfBounds takes argument viewRecord (a
The abstract operation GetViewValue takes arguments view (an
The abstract operation SetViewValue takes arguments view (an
DataView
extends 절의 값으로 사용될 수 있다. 지정된 DataView 동작을 상속하려는 서브클래스 생성자는 DataView.prototype의 내장 메서드를 지원하는 데 필요한 내부 상태로 서브클래스 인스턴스를 생성하고 초기화하기 위해 DataView 생성자에 대한 super 호출을 포함해야 한다.이 function은 called될 때 다음 steps를 수행합니다:
DataView
DataView.prototype의 initial value는
이 property는 attributes { [[Writable]]:
DataView prototype object는:
DataView.prototype.buffer는 set accessor function이
DataView.prototype.byteLength는 set accessor function이
DataView.prototype.byteOffset는 set accessor function이
DataView.prototype.constructor의 initial value는
이 method는 called될 때 다음 steps를 수행합니다:
이 method는 called될 때 다음 steps를 수행합니다:
이 method는 called될 때 다음 steps를 수행합니다:
이 method는 called될 때 다음 steps를 수행합니다:
이 method는 called될 때 다음 steps를 수행합니다:
이 method는 called될 때 다음 steps를 수행합니다:
이 method는 called될 때 다음 steps를 수행합니다:
이 method는 called될 때 다음 steps를 수행합니다:
이 method는 called될 때 다음 steps를 수행합니다:
이 method는 called될 때 다음 steps를 수행합니다:
이 method는 called될 때 다음 steps를 수행합니다:
이 method는 called될 때 다음 steps를 수행합니다:
이 method는 called될 때 다음 steps를 수행합니다:
이 method는 called될 때 다음 steps를 수행합니다:
이 method는 called될 때 다음 steps를 수행합니다:
이 method는 called될 때 다음 steps를 수행합니다:
이 method는 called될 때 다음 steps를 수행합니다:
이 method는 called될 때 다음 steps를 수행합니다:
이 method는 called될 때 다음 steps를 수행합니다:
이 method는 called될 때 다음 steps를 수행합니다:
이 method는 called될 때 다음 steps를 수행합니다:
이 method는 called될 때 다음 steps를 수행합니다:
이 property는 attributes { [[Writable]]:
DataView instances는
[[DataView]] internal slot의 value는 이 specification 안에서 사용되지 않습니다. 그 internal slot의 simple presence는 DataView
Atomics object는:
new operator와 함께 Atomics object는 shared memory array cells에 대해 indivisibly(atomically) operate하는 functions뿐 아니라
ECMAScript에서 shared memory를 programming하고 implementing하기 위한 informative guidelines는
Waiter Record는 Atomics.wait 또는 Atomics.waitAsync에 대한 particular call을 denote하는 데 사용되는
Waiter Record는
| Field Name | Value | Meaning |
|---|---|---|
| [[AgentSignifier]] |
an |
Atomics.wait 또는 Atomics.waitAsync를 called한 |
| [[PromiseCapability]] |
a |
Atomics.waitAsync에 대한 call을 denoting하는 경우 resulting promise이고, 그렇지 않으면 |
| [[TimeoutTime]] |
a non-negative |
timeout이 trigger될 수 있는 earliest time입니다; |
| [[Result]] |
|
call의 return value입니다. |
WaiterList Record는 Atomics.wait, Atomics.waitAsync, 및 Atomics.notify를 통한
WaiterList Record는
| Field Name | Value | Meaning |
|---|---|---|
| [[Waiters]] |
a |
이 WaiterList가 associated된 location에서 waiting하고 있는 Atomics.wait 또는 Atomics.waitAsync에 대한 calls입니다.
|
| [[MostRecentLeaveEvent]] |
a |
its |
same
Each WaiterList Record는 evaluation 동안 that WaiterList Record에 대한 exclusive access를 control하는 critical section을 가집니다. 한 번에 단일
The abstract operation ValidateIntegerTypedArray takes arguments ta (an
The abstract operation ValidateAtomicAccess takes arguments taRecord (a
The abstract operation ValidateAtomicAccessOnIntegerTypedArray takes arguments ta (an
The abstract operation RevalidateAtomicAccess takes arguments ta (a
The abstract operation GetWaiterList takes arguments block (a
The abstract operation EnterCriticalSection takes argument waiterList (a
EnterCriticalSection은
The abstract operation LeaveCriticalSection takes argument waiterList (a
The abstract operation AddWaiter takes arguments waiterList (a
The abstract operation RemoveWaiter takes arguments waiterList (a
The abstract operation RemoveWaiters takes arguments waiterList (a
The abstract operation SuspendThisAgent takes arguments waiterList (a
Atomics.notify에 대한 call을 통해) 때문에만 suspension에서 wake할 수 있다.The abstract operation NotifyWaiter takes arguments waiterList (a
The abstract operation EnqueueResolveInAgentJob takes arguments agentSignifier (an
The abstract operation DoWait takes arguments mode (
additionalTimeout은 power consumption을 reducing하거나 timing attacks를 mitigate하기 위해 timer resolution을 coarsening하는 것처럼, implementations가 necessary하게 timeouts를 pad할 수 있게 합니다. 이 value는 DoWait의 call마다 differ할 수 있습니다.
The abstract operation EnqueueAtomicsWaitAsyncTimeoutJob takes arguments waiterList (a
The abstract operation AtomicCompareExchangeInSharedBlock takes arguments block (a
The abstract operation AtomicReadModifyWrite takes arguments ta (an
The abstract operation ByteListBitwiseOp takes arguments op (&, ^, or |), xBytes (a
&이면, 다음을 수행한다.^이면, 다음을 수행한다.|이다.The abstract operation ByteListEqual takes arguments xBytes (a
이 function은 called될 때 다음 steps를 수행합니다:
이 function은 called될 때 다음 steps를 수행합니다:
&, xBytes, yBytes)를 반환한다.이 function은 called될 때 다음 steps를 수행합니다:
이 function은 called될 때 다음 steps를 수행합니다:
이 function은 called될 때 다음 steps를 수행합니다:
이 function은 optimization primitive입니다. intuition은 size n bytes인 datum에 대한 atomic primitive(compareExchange, load, store, add, sub, and, or, xor, 또는 exchange)의 atomic step이 datum을 comprising하는 n bytes outside의 lock을 Atomics.isLockFree(n)가
Atomics.isLockFree(4)는 all known relevant hardware에서 supported될 수 있으므로 always
이 function이 반환하는 value와 관계없이, all atomic operations는 atomic하다고 guaranteed됩니다. 예를 들어, operation 중간에 visible operation이 take place하는 일은 never 없습니다(예: “tearing”).
이 function은 called될 때 다음 steps를 수행합니다:
이 함수는 대기 큐에서 잠자고 있는 일부 에이전트에게 알린다.
호출될 때 다음 단계를 수행한다:
이 함수는 호출될 때 다음 단계를 수행한다:
|, xBytes, yBytes)를 반환한다.이 함수는 프로그램이 어떤 값을 기다리면서 스핀 루프 중이라는 힌트를 CPU에 제공한다.
호출될 때 다음 단계를 수행한다:
이 메서드는 뮤텍스 내부의 spinlock fast path와 같이 spin-wait 루프를 구현하는 프로그램이, 어떤 값을 기다리는 동안 스핀 중이라는 힌트를 CPU에 제공하도록 설계되었다. 이 메서드는 타이밍 외에는 관찰 가능한 동작이 없다.
기반 아키텍처의 모범 사례가 스핀 루프에서 그러한 명령어를 권장하는 경우, 구현은 pause 또는 yield 명령어를 구현할 것으로 기대된다. 예를 들어, Intel 최적화 매뉴얼은 pause 명령어를 권장한다.
구현은 일시 정지되는 최대 시간에 대해 수십에서 수백 나노초 정도의 내부 상한을 두는 것이 권장된다.
함수 호출의 오버헤드 때문에, 최적화 컴파일러에서 이 메서드에 대한 인라인 호출이 인라인되지 않은 호출과 다른 시간 동안 기다리는 것은 합리적이다.
이 함수는 호출될 때 다음 단계를 수행한다:
이 함수는 호출될 때 다음 단계를 수행한다:
이 함수는 둘러싸는 에이전트를 대기 큐에 넣고 알림을 받거나 대기 시간이 초과될 때까지 이를 일시 중단하며, 이러한 경우를 구분하는 String을 반환한다.
호출될 때 다음 단계를 수행한다:
이 함수는 호출한 에이전트가 알림을 받거나 timeout에 도달했을 때 해결되는 Promise를 반환한다.
호출될 때 다음 단계를 수행한다:
이 함수는 호출될 때 다음 단계를 수행한다:
^, xBytes, yBytes)를 반환한다.이 속성은 { [[Writable]]:
JSON object는:
parse와 stringify를 contains합니다.new operator와 함께 JSON Data Interchange Format은 ECMA-404에 defined되어 있습니다. 이 specification에서 사용되는 JSON interchange format은 ECMA-404에 의해 described된 것과 exactly 같습니다. JSON.parse와 JSON.stringify의 conforming implementations는 ECMA-404 specification에 described된 exact interchange format을, format에 대한 deletions나 extensions 없이 support해야 합니다.
이 function은 called될 때 다음 steps를 수행합니다:
이 function은 JSON text(JSON-formatted String)를 parses하고
optional reviver parameter는 results를 filter하고 transform할 수 있는 function입니다. parse에 의해 produced된 each value에 대해, reviver는 three arguments(associated
이 function의
The abstract operation ParseJSON takes argument text (a String) and returns either a
JSON.parse의 conforming implementation이 JSON grammars를 extend하는 것은 permitted되지 않습니다. implementation이 modified 또는 extended JSON interchange format을 support하려면, different parse function을 defining하여 그렇게 해야 합니다.
Valid JSON text는 ECMAScript
그러나
object 안에 duplicate name Strings가 있는 경우, same key에 대해 lexically preceding values는 overwritten되어야 합니다.
JSON Parse Record는 JSON text에서 parsed된 value의 initial state를 describe하는 데 사용되는
JSON Parse Records는
| Field Name | Value | Meaning |
|---|---|---|
| [[ParseNode]] | a |
context |
| [[Key]] | a |
[[Value]]가 associated된 |
| [[Value]] | an |
[[ParseNode]]의 evaluation에 의해 produced된 value입니다. |
| [[Elements]] | a |
[[Value]]가 Array이면, 이는 [[Value]]의 elements에 corresponding하는 |
| [[Entries]] | a |
[[Value]]가 non-Array Object이면, 이는 [[Value]]의 entries에 corresponding하는 |
The abstract operation CreateJSONParseRecord takes arguments parseNode (a
{"a":"lost","a":"kept"}), resulting ECMAScript object의 corresponding property에 대한 value는 that name을 가진 last pair로 specified됩니다.The abstract operation InternalizeJSONProperty takes arguments holder (an Object), name (a String), reviver (a
이 algorithm은 [[Delete]] 또는
called될 때 다음 steps를 수행합니다:
The abstract operation ShallowestContainedJSONValue takes argument root (a
JSON.parse built-in number token은 negative value를 represent할 수 있습니다. ECMAScript에서 negation은 - 뒤에 derived The
이 function은 string, number, boolean, 또는 null value의 raw JSON text를 representing하는 object를 반환합니다.
이 function은
called될 때 다음 steps를 수행합니다:
이 function의
JSON structures는 any depth로 nested될 수 있지만, acyclic이어야 합니다. value가 cyclic structure이거나 cyclic structure를 contains하면, 이 function은
a = [];
a[0] = a;
my_text = JSON.stringify(a); // This must throw a TypeError.
Symbolic primitive values는 다음과 같이 rendered됩니다:
String values는 QUOTATION MARK (") code units로 wrapped됩니다. code units "와 \는 \ prefixes로 escaped됩니다. Control characters code units는 escape sequences \uHHHH 또는 shorter forms인 \b (BACKSPACE), \f (FORM FEED), \n (LINE FEED), \r (CARRIAGE RETURN), \t (CHARACTER TABULATION)로 replaced됩니다.
JSON representation을 가지지 않는 values(예:
object는 U+007B (LEFT CURLY BRACKET) 뒤에 zero or more properties가 오고, U+002C (COMMA)로 separated되며, U+007D (RIGHT CURLY BRACKET)로 closed되는 것으로 rendered됩니다. property는
JSON Serialization Record는 JSON format으로의 serialization을 enable하는 데 사용되는
JSON Serialization Records는
| Field Name | Value | Meaning |
|---|---|---|
| [[ReplacerFunction]] | a |
object properties에 대한 replacement values를 supply할 수 있는 function입니다(JSON.stringify의 replacer parameter에서). |
| [[PropertyList]] | either a |
non-array object를 serializing할 때 include할 properties의 names입니다(JSON.stringify의 replacer parameter에서). |
| [[Gap]] | a String | indentation의 unit입니다(JSON.stringify의 space parameter에서). |
| [[Stack]] | a |
serializing되는 과정에 있는 nested objects의 set입니다. cyclic structures를 detect하는 데 사용됩니다. |
| [[Indent]] | a String | current indentation입니다. |
The abstract operation SerializeJSONProperty takes arguments state (a
The abstract operation QuoteJSONString takes argument value (a String) and returns a String. value를 0x0022 (QUOTATION MARK) code units로 wraps하고, 그 안의 certain other code units를 escapes합니다. 이 operation은
| Code Point | Unicode Character Name | Escape Sequence |
|---|---|---|
| U+0008 | BACKSPACE |
\b
|
| U+0009 | CHARACTER TABULATION |
\t
|
| U+000A | LINE FEED (LF) |
\n
|
| U+000C | FORM FEED (FF) |
\f
|
| U+000D | CARRIAGE RETURN (CR) |
\r
|
| U+0022 | QUOTATION MARK |
\"
|
| U+005C | REVERSE SOLIDUS |
\\
|
The abstract operation UnicodeEscape takes argument codeUnit (a code unit) and returns a String. codeUnit을 Unicode escape sequence로 represents합니다. It performs the following steps when called:
The abstract operation SerializeJSONObject takes arguments state (a
The abstract operation SerializeJSONArray takes arguments state (a
arrays의 representation은 array.length (exclusive)까지의
이 property는 attributes { [[Writable]]: