-
Notifications
You must be signed in to change notification settings - Fork 4
/
929.txt
245 lines (203 loc) · 13 KB
/
929.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
* 仕様書
[REFS[
- [69] [CITE[ECMAScript® 2018 Language Specification]] ([TIME[2017-06-14 04:16:40 +09:00]]) <https://tc39.github.io/ecma262/#sec-typedarray-objects>
- [68] [CITE[ECMAScript® 2018 Language Specification]] ([TIME[2017-06-14 04:16:40 +09:00]]) <https://tc39.github.io/ecma262/#sec-arraybuffer-objects>
- [26] [CITE[Web IDL (Second Edition)]] ([TIME[2014-10-06 23:54:33 +09:00]] 版) <http://heycam.github.io/webidl/#dfn-typed-array-type>
- [29] [CITE[Web IDL (Second Edition)]] ([TIME[2014-10-06 23:54:33 +09:00]] 版) <http://heycam.github.io/webidl/#dfn-buffer-source-type>
- [39] [CITE[Web IDL (Second Edition)]] ([TIME[2014-10-06 23:54:33 +09:00]] 版) <http://heycam.github.io/webidl/#common-ArrayBufferView>
- [40] [CITE[Web IDL (Second Edition)]] ([TIME[2014-10-06 23:54:33 +09:00]] 版) <http://heycam.github.io/webidl/#common-BufferSource>
- [30] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2014-05-23 20:05:44 +09:00]] 版) <http://www.whatwg.org/specs/web-apps/current-work/#arraybuffer>
- [47] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2015-05-06 10:42:35 +09:00]] 版) <https://html.spec.whatwg.org/#dom-binarytype-arraybuffer>
]REFS]
* 定義
[27] [DFN[[RUBYB[型付き配列型]@en[typed array type]]]]は、次の[[型]]です [SRC[>>26]]。
[FIG(short list)[
- [CODE(DOMi)@en[[[Int8Array]]]]
- [CODE(DOMi)@en[[[Int16Array]]]]
- [CODE(DOMi)@en[[[Int32Array]]]]
- [CODE(DOMi)@en[[[Uint8Array]]]]
- [CODE(DOMi)@en[[[Uint16Array]]]]
- [CODE(DOMi)@en[[[Uint32Array]]]]
- [CODE(DOMi)@en[[[Uint8ClampedArray]]]]
- [CODE(DOMi)@en[[[Float32Array]]]]
- [CODE(DOMi)@en[[[Float64Array]]]]
]FIG]
[41] [DFN[[CODE(DOMi)@en[[[ArrayBufferView]]]]]] とは、[[型付き配列型]]または
[CODE(IDL)@en[[[DataView]]]] をいいます [SRC[>>39, >>30]]。
[31] [DFN[[RUBYB[[[バッファー源型]]]@en[buffer source type]]]],
[DFN[[CODE(DOMi)@en[[[BufferSource]]]]]] とは、 [CODE(DOMi)@en[[[ArrayBuffer]]]],
[CODE(DOMi)@en[[[DataView]]]], [[型付き配列型]]をいいます [SRC[>>29, >>40]]。
;; [45] [[MSE]] の [CODE(DOMi)@en[[[SourceBuffer]]]] とは関係ありません。
;; [70] [CODE(JS)@en[SharedArrayBuffer]] はこれらの定義に含まれていません。
* [CODE(DOMi)@en[BinaryType]] の値 [CODE(DOM)@en[arraybuffer]]
[48] [[列挙型]] [CODE(DOMi)@en[[[BinaryType]]]] の値
[DFN[[CODE(DOM)@en[[[arraybuffer]]]]]] は、 [CODE(DOMi)@en[[[ArrayBuffer]]]]
として返すべきことを表します [SRC[>>47]]。
* 歴史
** [CODE(DOMi)@en[CanvasPixelArray]]
[52] [[Web Applications 1.0]] は [CODE(HTMLe)@en[[[canvas]]]]
の [CODE(DOMm)@en[[[getImageData]]]] と共に
[DFN[[CODE(DOMi)@en[[[CanvasPixelArray]]]]]] を規定しました。
** 型付き配列型
[21] [[TypedArray]] ははじめ [[Khronos]] で標準化されました。
[REFS[
- [49] [CITE@en[ECMAScript Typed Array Specification]]
([TIME[2010-01-26 10:27:56 +09:00]] 版)
<http://people.mozilla.com/~vladimir/jsvec/TypedArray-spec.html>
- [1] [CITE@en[ECMAScript Typed Array Specification]]
([TIME[2010-03-04 09:01:49 +09:00]] 版)
<https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/doc/spec/TypedArray-spec.html>
- [24] [CITE@en[Typed Array Specification]]
( ([TIME[2014-04-12 22:52:49 +09:00]] 版))
<https://www.khronos.org/registry/typedarray/specs/latest/>
-- [34] [CITE@en[Typed Array Specification]]
( ([TIME[2014-04-12 22:52:49 +09:00]] 版))
<https://www.khronos.org/registry/typedarray/specs/latest/#ARRAYBUFFER>
-- [35] [CITE@en[Typed Array Specification]]
( ([TIME[2014-04-12 22:52:49 +09:00]] 版))
<https://www.khronos.org/registry/typedarray/specs/latest/#ARRAYBUFFERVIEW>
- [2] [CITE@en[Binary - CommonJS Spec Wiki]]
([TIME[2010-05-14 04:12:31 +09:00]] 版)
<http://wiki.commonjs.org/wiki/Binary>
- [3] [CITE[IRC logs: freenode / #whatwg / 20100625]]
([TIME[2010-06-29 00:39:18 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20100625#l-347>
- [4] [CITE[IRC logs: freenode / #whatwg / 20100625]]
([TIME[2010-06-29 00:39:18 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20100625>
- [5] [CITE[IRC logs: freenode / #whatwg / 20101212]]
( ([TIME[2011-01-03 18:17:01 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20101212>
- [6] [CITE[IRC logs: freenode / #whatwg / 20110212]]
( ([TIME[2011-03-22 22:45:03 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20110212>
- [7] [CITE['''['''whatwg''']''' ArrayBuffer and the structured clone algorithm]]
([TIME[2011-05-10 12:49:48 +09:00]] 版)
<http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-May/031518.html>
- [8] [CITE[IRC logs: freenode / #whatwg / 20110525]]
( ([TIME[2011-05-28 03:13:09 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20110525>
- [9] [CITE[IRC logs: freenode / #whatwg / 20120121]]
( ([TIME[2012-01-22 22:55:46 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20120121>
- [10] [CITE[''''''[''''''whatwg'''''']'''''' API for encoding/decoding ArrayBuffers into text]]
( ([TIME[2012-03-17 12:12:10 +09:00]] 版))
<http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-March/035093.html>
- [11] [CITE[''''''[''''''whatwg'''''']'''''' API for encoding/decoding ArrayBuffers into text]]
( ([TIME[2012-03-17 12:12:44 +09:00]] 版))
<http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-March/035094.html>
- [12] [CITE[IRC logs: freenode / #whatwg / 20120327]]
( ([TIME[2012-04-09 21:35:50 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20120327>
- [13] [CITE[IRC logs: freenode / #whatwg / 20120328]]
( ([TIME[2012-04-09 21:56:14 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20120328>
- [14] [CITE[IRC logs: freenode / #whatwg / 20120329]]
( ([TIME[2012-04-09 23:38:43 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20120329>
- [15] [CITE@en[Web Applications 1.0 r7085 You send ArrayBufferViews, not ArrayBuffers.]]
( ([TIME[2012-05-03 05:17:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=7084&to=7085>
- [16] [CITE@en[Web Applications 1.0 r7203 Four browser vendors have told me they don't want to drop this, so yeah, I'm putting it back. Sorry Anne. :-)]]
( ([TIME[2012-07-26 04:11:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=7202&to=7203>
- [17] [CITE[IRC logs: freenode / #whatwg / 20130926]]
( ([TIME[2013-09-27 17:31:03 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20130926>
]REFS]
[23] [CODE(HTMLe)@en[[[canvas]]]] [[要素]]の [CODE(DOMi)@en[[[CanvasPixelArray]]]]
は、2011年に [CODE(DOMi)@en[[[Uint8ClampedArray]]]] に変更されています。
[REFS[
- [50] [CITE[IRC logs: freenode / #whatwg / 20100203]]
([TIME[2010-02-06 01:45:27 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20100203>
- [51] [CITE@en[Web Applications 1.0 r6559 Kill CanvasPixelArray in favour of the Typed Array stuff.]]
( ([TIME[2011-09-22 07:58:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=6558&to=6559>
]REFS]
@@ [54] [[エンディアン]]問題
** ES6 への統合
[22] その後 [[TypedArray]] は [[ES6]] に取り込まれました。
[53] [[Web IDL]] でも[[型付き配列型]]その他を扱うための[[データ型]]が追加されました。
[REFS[
- [18] [CITE@en-GB[ECMAScript Language Specification ECMA-262 6th Edition – DRAFT]]
( ([TIME[2014-01-24 00:08:47 +09:00]] 版))
<https://people.mozilla.org/~jorendorff/es6-draft.html#sec-typedarray-objects>
- [32] [CITE@en[Web Applications 1.0 r7972 Integrate ArrayBuffer structured cloning]]
( ([TIME[2013-06-13 08:46:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=7971&to=7972>
- [33] [CITE@en[HTML Standard Tracker]]
( ([TIME[2014-05-16 03:15:32 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=8627&to=8628>
]REFS]
[REFS[
- [19] [CITE@en[Web Applications 1.0 r8454 First hack attempt at converting from referring to the old TypedArray spec to referring to the JS spec's version. I couldn't work out how to actually do a good job of referring to all the JS algorithms, so please file bugs with proposed replacement text for anything that's poorly done.]]
( ([TIME[2014-02-04 08:16:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=8453&to=8454>
- [20] [CITE[IRC logs: freenode / #whatwg / 20140203]]
( ([TIME[2014-02-05 00:12:34 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20140203>
]REFS]
[REFS[
- [25] [CITE@en[Bug 23369 – Provide hooks for Typed Arrays (ArrayBuffer and friends)]]
( ([TIME[2014-06-10 12:18:10 +09:00]] 版))
<https://www.w3.org/Bugs/Public/show_bug.cgi?id=23369>
- [28] [CITE@en[Add types for ArrayBuffer, DataView and typed array objects. · 631316b · heycam/webidl]] ([TIME[2014-10-10 08:07:12 +09:00]] 版) <https://github.com/heycam/webidl/commit/631316b8d513d414223de265b157153c032958c2>
]REFS]
[REFS[
- [36] [CITE@en[Add an ArrayBufferData typedef. · 760fa16 · heycam/webidl]]
( ([TIME[2014-09-25 02:42:46 +09:00]] 版))
<https://github.com/heycam/webidl/commit/760fa160330d0b07d1c8179d99274b64b58145aa>
]REFS]
[38] >>37 で[[バッファー源型]]が導入されました。また [[HTML Standard]]
にあった [CODE(IDL)@en[[[ArrayBufferView]]]] の定義が [[Web IDL]] に含まれるようになりました。
旧 [CODE(IDL)@en[[[ArrayBufferData]]]] は [CODE(IDL)@en[[[BufferData]]]]
に改称されました。
[REFS[
- [37] [CITE@en[Add types for ArrayBuffer, DataView and typed array objects. · 631316b · heycam/webidl]] ([TIME[2014-10-10 08:11:57 +09:00]] 版) <https://github.com/heycam/webidl/commit/631316b8d513d414223de265b157153c032958c2>
- [42] [CITE@en[Recommend BufferSource for inputs. · c497edf · heycam/webidl]] ([TIME[2014-10-10 08:31:10 +09:00]] 版) <https://github.com/heycam/webidl/commit/c497edf5108bdccd2038158ea15f03e93a274308>
- [43] [CITE@en[Use BufferSource rather than ArrayBufferView https://www.w3.org/Bugs/Pub... · 99cfaf7 · whatwg/encoding]] ([TIME[2014-10-10 08:31:52 +09:00]] 版) <https://github.com/whatwg/encoding/commit/99cfaf7981f2d8a3aae96249c9431286433aca8a>
- [44] [CITE@en[Use new BufferSource concept from IDL · 0511b50 · whatwg/fetch]] ([TIME[2014-10-10 08:32:05 +09:00]] 版) <https://github.com/whatwg/fetch/commit/0511b509137630f78edb395fb1b019be0d3adec7>
]REFS]
[46] [CITE@en[W3C bug 27110. Fix the typo in the BufferSource typedef. · 74480d0 · heycam/webidl]]
( ([TIME[2014-10-21 09:50:15 +09:00]] 版))
<https://github.com/heycam/webidl/commit/74480d06c359ca407691818f1963f208d60434ea>
[55] [CITE@en[Update ECMAScript and IDL integration · whatwg/html@52f96c4]]
([TIME[2015-12-16 12:24:49 +09:00]] 版)
<https://github.com/whatwg/html/commit/52f96c455a53763a7fe00162c067da6adb20e62c>
[56] [CITE@en[Fix #26: allocating an ArrayBuffer can fail · whatwg/xhr@6484330]]
([TIME[2016-01-22 23:27:23 +09:00]] 版)
<https://github.com/whatwg/xhr/commit/6484330ec70ba66b9ee3a6b7244227180c0b4dce>
[57] [CITE@en[Write structured clone algorithm in terms of ECMAScript · whatwg/html@bfb960c]]
([TIME[2016-03-02 16:43:01 +09:00]] 版)
<https://github.com/whatwg/html/commit/bfb960c938580c95e77365e614218b952f96375b>
[58] [CITE@en[Handle an ArrayBuffer allocation failure · whatwg/fetch@3004ebc]]
([TIME[2016-03-09 15:27:35 +09:00]] 版)
<https://github.com/whatwg/fetch/commit/3004ebc878c9baf55cb22b32f66b8c5805824a70>
[59] [CITE@en[Use BufferSource instead of ArrayBuffer or ArrayBufferView.]]
([[mkruisselbrink]]著, [TIME[2016-07-22 07:26:26 +09:00]])
<https://github.com/w3c/FileAPI/commit/3eaebc7f1aea2a3c345d40401a3bed464414f63b>
[60] [CITE@en[24072 – Clarify handling of neutered objects]]
([TIME[2016-08-25 12:01:48 +09:00]])
<https://www.w3.org/Bugs/Public/show_bug.cgi?id=24072>
[61] [CITE@en[Merge algo and dfn for "detaching an ArrayBuffer" (#210)]]
([[tobie]]著, [TIME[2016-10-28 02:15:30 +09:00]])
<https://github.com/heycam/webidl/commit/9d054100b8d599a31a549d664b9dcb780b3d638c>
[62] [CITE@en[Only fail to allocate an ArrayBuffer once]]
([[annevk]]著, [TIME[2017-03-07 19:51:45 +09:00]])
<https://github.com/whatwg/xhr/commit/33e1e973af1ba0dc640699e2a3a3175a3a3cfd05>
[63] [CITE@en[Breaking: refactor structured clone into serialize/deserialize]]
([[domenic]]著, [TIME[2017-03-21 06:09:33 +09:00]])
<https://github.com/whatwg/html/commit/97d644c97335956610a31e8ad98d1a388c063e84>
[64] [CITE@en[Breaking: refactor structured clone into serialize/deserialize]]
([[domenic]]著, [TIME[2017-03-21 06:09:33 +09:00]])
<https://github.com/whatwg/html/commit/97d644c97335956610a31e8ad98d1a388c063e84>
[65] [CITE@en[Add '''['''AllowShared''']''' to allow accepting SharedArrayBuffers]]
([[domenic]]著, [TIME[2017-04-29 07:10:34 +09:00]])
<https://github.com/heycam/webidl/commit/c59bdcbcf2039c89eb7ea9a35e1e2dba621519ec>
[66] [CITE@en[Throwing when converting detached ArrayBuffers is not what browsers do · Issue #352 · heycam/webidl]]
([TIME[2017-05-14 21:40:05 +09:00]])
<https://github.com/heycam/webidl/issues/352>
[67] [CITE@en[Replace TypedArray spec and IDL links with links to ECMAScript spec · Issue #2203 · KhronosGroup/WebGL]]
([TIME[2017-05-14 21:41:32 +09:00]])
<https://github.com/KhronosGroup/WebGL/issues/2203>