Skip to main content

nodejs/
arity.rs

1//! `name` and `length` of the ECMAScript intrinsic functions.
2//!
3//! GENERATED by `cargo run --bin gen-arity` from v26.8.2 — do not edit by hand.
4//! See `src/bin/gen_arity.rs` for what is in the table and what is deliberately not.
5
6/// The `name` and `length` of one intrinsic each, sorted by key.
7///
8/// The key is how [`crate::host::JsObj::Builtin`] spells the function: a bare
9/// global (`parseInt`), a constructor (`Array`), a static (`Array.from`), or a
10/// prototype-method thunk (`@proto:Array:slice`). `name` is repeated rather than
11/// derived because the legacy aliases share one function object with the name of
12/// the method they alias — `String.prototype.trimLeft.name` is `trimStart`.
13pub const BUILTIN_ARITY: &[(&str, &str, u32)] = &[
14    ("@proto:Array:@@iterator", "values", 0),
15    ("@proto:Array:at", "at", 1),
16    ("@proto:Array:concat", "concat", 1),
17    ("@proto:Array:copyWithin", "copyWithin", 2),
18    ("@proto:Array:entries", "entries", 0),
19    ("@proto:Array:every", "every", 1),
20    ("@proto:Array:fill", "fill", 1),
21    ("@proto:Array:filter", "filter", 1),
22    ("@proto:Array:find", "find", 1),
23    ("@proto:Array:findIndex", "findIndex", 1),
24    ("@proto:Array:findLast", "findLast", 1),
25    ("@proto:Array:findLastIndex", "findLastIndex", 1),
26    ("@proto:Array:flat", "flat", 0),
27    ("@proto:Array:flatMap", "flatMap", 1),
28    ("@proto:Array:forEach", "forEach", 1),
29    ("@proto:Array:includes", "includes", 1),
30    ("@proto:Array:indexOf", "indexOf", 1),
31    ("@proto:Array:join", "join", 1),
32    ("@proto:Array:keys", "keys", 0),
33    ("@proto:Array:lastIndexOf", "lastIndexOf", 1),
34    ("@proto:Array:map", "map", 1),
35    ("@proto:Array:pop", "pop", 0),
36    ("@proto:Array:push", "push", 1),
37    ("@proto:Array:reduce", "reduce", 1),
38    ("@proto:Array:reduceRight", "reduceRight", 1),
39    ("@proto:Array:reverse", "reverse", 0),
40    ("@proto:Array:shift", "shift", 0),
41    ("@proto:Array:slice", "slice", 2),
42    ("@proto:Array:some", "some", 1),
43    ("@proto:Array:sort", "sort", 1),
44    ("@proto:Array:splice", "splice", 2),
45    ("@proto:Array:toLocaleString", "toLocaleString", 0),
46    ("@proto:Array:toReversed", "toReversed", 0),
47    ("@proto:Array:toSorted", "toSorted", 1),
48    ("@proto:Array:toSpliced", "toSpliced", 2),
49    ("@proto:Array:toString", "toString", 0),
50    ("@proto:Array:unshift", "unshift", 1),
51    ("@proto:Array:values", "values", 0),
52    ("@proto:Array:with", "with", 2),
53    ("@proto:ArrayBuffer:resize", "resize", 1),
54    ("@proto:ArrayBuffer:slice", "slice", 2),
55    ("@proto:ArrayBuffer:transfer", "transfer", 0),
56    (
57        "@proto:ArrayBuffer:transferToFixedLength",
58        "transferToFixedLength",
59        0,
60    ),
61    ("@proto:BigInt:toLocaleString", "toLocaleString", 0),
62    ("@proto:BigInt:toString", "toString", 0),
63    ("@proto:BigInt:valueOf", "valueOf", 0),
64    ("@proto:Boolean:toString", "toString", 0),
65    ("@proto:Boolean:valueOf", "valueOf", 0),
66    ("@proto:DataView:getBigInt64", "getBigInt64", 1),
67    ("@proto:DataView:getBigUint64", "getBigUint64", 1),
68    ("@proto:DataView:getFloat16", "getFloat16", 1),
69    ("@proto:DataView:getFloat32", "getFloat32", 1),
70    ("@proto:DataView:getFloat64", "getFloat64", 1),
71    ("@proto:DataView:getInt16", "getInt16", 1),
72    ("@proto:DataView:getInt32", "getInt32", 1),
73    ("@proto:DataView:getInt8", "getInt8", 1),
74    ("@proto:DataView:getUint16", "getUint16", 1),
75    ("@proto:DataView:getUint32", "getUint32", 1),
76    ("@proto:DataView:getUint8", "getUint8", 1),
77    ("@proto:DataView:setBigInt64", "setBigInt64", 2),
78    ("@proto:DataView:setBigUint64", "setBigUint64", 2),
79    ("@proto:DataView:setFloat16", "setFloat16", 2),
80    ("@proto:DataView:setFloat32", "setFloat32", 2),
81    ("@proto:DataView:setFloat64", "setFloat64", 2),
82    ("@proto:DataView:setInt16", "setInt16", 2),
83    ("@proto:DataView:setInt32", "setInt32", 2),
84    ("@proto:DataView:setInt8", "setInt8", 2),
85    ("@proto:DataView:setUint16", "setUint16", 2),
86    ("@proto:DataView:setUint32", "setUint32", 2),
87    ("@proto:DataView:setUint8", "setUint8", 2),
88    ("@proto:Date:@@toPrimitive", "[Symbol.toPrimitive]", 1),
89    ("@proto:Date:getDate", "getDate", 0),
90    ("@proto:Date:getDay", "getDay", 0),
91    ("@proto:Date:getFullYear", "getFullYear", 0),
92    ("@proto:Date:getHours", "getHours", 0),
93    ("@proto:Date:getMilliseconds", "getMilliseconds", 0),
94    ("@proto:Date:getMinutes", "getMinutes", 0),
95    ("@proto:Date:getMonth", "getMonth", 0),
96    ("@proto:Date:getSeconds", "getSeconds", 0),
97    ("@proto:Date:getTime", "getTime", 0),
98    ("@proto:Date:getTimezoneOffset", "getTimezoneOffset", 0),
99    ("@proto:Date:getUTCDate", "getUTCDate", 0),
100    ("@proto:Date:getUTCDay", "getUTCDay", 0),
101    ("@proto:Date:getUTCFullYear", "getUTCFullYear", 0),
102    ("@proto:Date:getUTCHours", "getUTCHours", 0),
103    ("@proto:Date:getUTCMilliseconds", "getUTCMilliseconds", 0),
104    ("@proto:Date:getUTCMinutes", "getUTCMinutes", 0),
105    ("@proto:Date:getUTCMonth", "getUTCMonth", 0),
106    ("@proto:Date:getUTCSeconds", "getUTCSeconds", 0),
107    ("@proto:Date:getYear", "getYear", 0),
108    ("@proto:Date:setDate", "setDate", 1),
109    ("@proto:Date:setFullYear", "setFullYear", 3),
110    ("@proto:Date:setHours", "setHours", 4),
111    ("@proto:Date:setMilliseconds", "setMilliseconds", 1),
112    ("@proto:Date:setMinutes", "setMinutes", 3),
113    ("@proto:Date:setMonth", "setMonth", 2),
114    ("@proto:Date:setSeconds", "setSeconds", 2),
115    ("@proto:Date:setTime", "setTime", 1),
116    ("@proto:Date:setUTCDate", "setUTCDate", 1),
117    ("@proto:Date:setUTCFullYear", "setUTCFullYear", 3),
118    ("@proto:Date:setUTCHours", "setUTCHours", 4),
119    ("@proto:Date:setUTCMilliseconds", "setUTCMilliseconds", 1),
120    ("@proto:Date:setUTCMinutes", "setUTCMinutes", 3),
121    ("@proto:Date:setUTCMonth", "setUTCMonth", 2),
122    ("@proto:Date:setUTCSeconds", "setUTCSeconds", 2),
123    ("@proto:Date:setYear", "setYear", 1),
124    ("@proto:Date:toDateString", "toDateString", 0),
125    ("@proto:Date:toGMTString", "toUTCString", 0),
126    ("@proto:Date:toISOString", "toISOString", 0),
127    ("@proto:Date:toJSON", "toJSON", 1),
128    ("@proto:Date:toLocaleDateString", "toLocaleDateString", 0),
129    ("@proto:Date:toLocaleString", "toLocaleString", 0),
130    ("@proto:Date:toLocaleTimeString", "toLocaleTimeString", 0),
131    ("@proto:Date:toString", "toString", 0),
132    ("@proto:Date:toTimeString", "toTimeString", 0),
133    ("@proto:Date:toUTCString", "toUTCString", 0),
134    ("@proto:Date:valueOf", "valueOf", 0),
135    ("@proto:Error:toString", "toString", 0),
136    ("@proto:FinalizationRegistry:register", "register", 2),
137    ("@proto:FinalizationRegistry:unregister", "unregister", 1),
138    ("@proto:Function:@@hasInstance", "[Symbol.hasInstance]", 1),
139    ("@proto:Function:apply", "apply", 2),
140    ("@proto:Function:bind", "bind", 1),
141    ("@proto:Function:call", "call", 1),
142    ("@proto:Function:toString", "toString", 0),
143    ("@proto:Iterator:@@iterator", "[Symbol.iterator]", 0),
144    ("@proto:Iterator:drop", "drop", 1),
145    ("@proto:Iterator:every", "every", 1),
146    ("@proto:Iterator:filter", "filter", 1),
147    ("@proto:Iterator:find", "find", 1),
148    ("@proto:Iterator:flatMap", "flatMap", 1),
149    ("@proto:Iterator:forEach", "forEach", 1),
150    ("@proto:Iterator:map", "map", 1),
151    ("@proto:Iterator:reduce", "reduce", 1),
152    ("@proto:Iterator:some", "some", 1),
153    ("@proto:Iterator:take", "take", 1),
154    ("@proto:Iterator:toArray", "toArray", 0),
155    ("@proto:Map:@@iterator", "entries", 0),
156    ("@proto:Map:clear", "clear", 0),
157    ("@proto:Map:delete", "delete", 1),
158    ("@proto:Map:entries", "entries", 0),
159    ("@proto:Map:forEach", "forEach", 1),
160    ("@proto:Map:get", "get", 1),
161    ("@proto:Map:getOrInsert", "getOrInsert", 2),
162    ("@proto:Map:getOrInsertComputed", "getOrInsertComputed", 2),
163    ("@proto:Map:has", "has", 1),
164    ("@proto:Map:keys", "keys", 0),
165    ("@proto:Map:set", "set", 2),
166    ("@proto:Map:values", "values", 0),
167    ("@proto:Number:toExponential", "toExponential", 1),
168    ("@proto:Number:toFixed", "toFixed", 1),
169    ("@proto:Number:toLocaleString", "toLocaleString", 0),
170    ("@proto:Number:toPrecision", "toPrecision", 1),
171    ("@proto:Number:toString", "toString", 1),
172    ("@proto:Number:valueOf", "valueOf", 0),
173    ("@proto:Object:__defineGetter__", "__defineGetter__", 2),
174    ("@proto:Object:__defineSetter__", "__defineSetter__", 2),
175    ("@proto:Object:__lookupGetter__", "__lookupGetter__", 1),
176    ("@proto:Object:__lookupSetter__", "__lookupSetter__", 1),
177    ("@proto:Object:hasOwnProperty", "hasOwnProperty", 1),
178    ("@proto:Object:isPrototypeOf", "isPrototypeOf", 1),
179    (
180        "@proto:Object:propertyIsEnumerable",
181        "propertyIsEnumerable",
182        1,
183    ),
184    ("@proto:Object:toLocaleString", "toLocaleString", 0),
185    ("@proto:Object:toString", "toString", 0),
186    ("@proto:Object:valueOf", "valueOf", 0),
187    ("@proto:Promise:catch", "catch", 1),
188    ("@proto:Promise:finally", "finally", 1),
189    ("@proto:Promise:then", "then", 2),
190    ("@proto:RegExp:compile", "compile", 2),
191    ("@proto:RegExp:exec", "exec", 1),
192    ("@proto:RegExp:test", "test", 1),
193    ("@proto:RegExp:toString", "toString", 0),
194    ("@proto:Set:@@iterator", "values", 0),
195    ("@proto:Set:add", "add", 1),
196    ("@proto:Set:clear", "clear", 0),
197    ("@proto:Set:delete", "delete", 1),
198    ("@proto:Set:difference", "difference", 1),
199    ("@proto:Set:entries", "entries", 0),
200    ("@proto:Set:forEach", "forEach", 1),
201    ("@proto:Set:has", "has", 1),
202    ("@proto:Set:intersection", "intersection", 1),
203    ("@proto:Set:isDisjointFrom", "isDisjointFrom", 1),
204    ("@proto:Set:isSubsetOf", "isSubsetOf", 1),
205    ("@proto:Set:isSupersetOf", "isSupersetOf", 1),
206    ("@proto:Set:keys", "values", 0),
207    ("@proto:Set:symmetricDifference", "symmetricDifference", 1),
208    ("@proto:Set:union", "union", 1),
209    ("@proto:Set:values", "values", 0),
210    ("@proto:String:@@iterator", "[Symbol.iterator]", 0),
211    ("@proto:String:anchor", "anchor", 1),
212    ("@proto:String:at", "at", 1),
213    ("@proto:String:big", "big", 0),
214    ("@proto:String:blink", "blink", 0),
215    ("@proto:String:bold", "bold", 0),
216    ("@proto:String:charAt", "charAt", 1),
217    ("@proto:String:charCodeAt", "charCodeAt", 1),
218    ("@proto:String:codePointAt", "codePointAt", 1),
219    ("@proto:String:concat", "concat", 1),
220    ("@proto:String:endsWith", "endsWith", 1),
221    ("@proto:String:fixed", "fixed", 0),
222    ("@proto:String:fontcolor", "fontcolor", 1),
223    ("@proto:String:fontsize", "fontsize", 1),
224    ("@proto:String:includes", "includes", 1),
225    ("@proto:String:indexOf", "indexOf", 1),
226    ("@proto:String:isWellFormed", "isWellFormed", 0),
227    ("@proto:String:italics", "italics", 0),
228    ("@proto:String:lastIndexOf", "lastIndexOf", 1),
229    ("@proto:String:link", "link", 1),
230    ("@proto:String:localeCompare", "localeCompare", 1),
231    ("@proto:String:match", "match", 1),
232    ("@proto:String:matchAll", "matchAll", 1),
233    ("@proto:String:normalize", "normalize", 0),
234    ("@proto:String:padEnd", "padEnd", 1),
235    ("@proto:String:padStart", "padStart", 1),
236    ("@proto:String:repeat", "repeat", 1),
237    ("@proto:String:replace", "replace", 2),
238    ("@proto:String:replaceAll", "replaceAll", 2),
239    ("@proto:String:search", "search", 1),
240    ("@proto:String:slice", "slice", 2),
241    ("@proto:String:small", "small", 0),
242    ("@proto:String:split", "split", 2),
243    ("@proto:String:startsWith", "startsWith", 1),
244    ("@proto:String:strike", "strike", 0),
245    ("@proto:String:sub", "sub", 0),
246    ("@proto:String:substr", "substr", 2),
247    ("@proto:String:substring", "substring", 2),
248    ("@proto:String:sup", "sup", 0),
249    ("@proto:String:toLocaleLowerCase", "toLocaleLowerCase", 0),
250    ("@proto:String:toLocaleUpperCase", "toLocaleUpperCase", 0),
251    ("@proto:String:toLowerCase", "toLowerCase", 0),
252    ("@proto:String:toString", "toString", 0),
253    ("@proto:String:toUpperCase", "toUpperCase", 0),
254    ("@proto:String:toWellFormed", "toWellFormed", 0),
255    ("@proto:String:trim", "trim", 0),
256    ("@proto:String:trimEnd", "trimEnd", 0),
257    ("@proto:String:trimLeft", "trimStart", 0),
258    ("@proto:String:trimRight", "trimEnd", 0),
259    ("@proto:String:trimStart", "trimStart", 0),
260    ("@proto:String:valueOf", "valueOf", 0),
261    ("@proto:Symbol:@@toPrimitive", "[Symbol.toPrimitive]", 1),
262    ("@proto:Symbol:toString", "toString", 0),
263    ("@proto:Symbol:valueOf", "valueOf", 0),
264    ("@proto:TextDecoder:decode", "decode", 0),
265    ("@proto:TextEncoder:encode", "encode", 0),
266    ("@proto:TextEncoder:encodeInto", "encodeInto", 2),
267    ("@proto:TypedArray:@@iterator", "values", 0),
268    ("@proto:TypedArray:at", "at", 1),
269    ("@proto:TypedArray:copyWithin", "copyWithin", 2),
270    ("@proto:TypedArray:entries", "entries", 0),
271    ("@proto:TypedArray:every", "every", 1),
272    ("@proto:TypedArray:fill", "fill", 1),
273    ("@proto:TypedArray:filter", "filter", 1),
274    ("@proto:TypedArray:find", "find", 1),
275    ("@proto:TypedArray:findIndex", "findIndex", 1),
276    ("@proto:TypedArray:findLast", "findLast", 1),
277    ("@proto:TypedArray:findLastIndex", "findLastIndex", 1),
278    ("@proto:TypedArray:forEach", "forEach", 1),
279    ("@proto:TypedArray:includes", "includes", 1),
280    ("@proto:TypedArray:indexOf", "indexOf", 1),
281    ("@proto:TypedArray:join", "join", 1),
282    ("@proto:TypedArray:keys", "keys", 0),
283    ("@proto:TypedArray:lastIndexOf", "lastIndexOf", 1),
284    ("@proto:TypedArray:map", "map", 1),
285    ("@proto:TypedArray:reduce", "reduce", 1),
286    ("@proto:TypedArray:reduceRight", "reduceRight", 1),
287    ("@proto:TypedArray:reverse", "reverse", 0),
288    ("@proto:TypedArray:set", "set", 1),
289    ("@proto:TypedArray:slice", "slice", 2),
290    ("@proto:TypedArray:some", "some", 1),
291    ("@proto:TypedArray:sort", "sort", 1),
292    ("@proto:TypedArray:subarray", "subarray", 2),
293    ("@proto:TypedArray:toLocaleString", "toLocaleString", 0),
294    ("@proto:TypedArray:toReversed", "toReversed", 0),
295    ("@proto:TypedArray:toSorted", "toSorted", 1),
296    ("@proto:TypedArray:toString", "toString", 0),
297    ("@proto:TypedArray:values", "values", 0),
298    ("@proto:TypedArray:with", "with", 2),
299    ("@proto:URL:toJSON", "toJSON", 0),
300    ("@proto:URL:toString", "toString", 0),
301    ("@proto:URLSearchParams:@@iterator", "entries", 0),
302    ("@proto:URLSearchParams:append", "append", 2),
303    ("@proto:URLSearchParams:delete", "delete", 1),
304    ("@proto:URLSearchParams:entries", "entries", 0),
305    ("@proto:URLSearchParams:forEach", "forEach", 1),
306    ("@proto:URLSearchParams:get", "get", 1),
307    ("@proto:URLSearchParams:getAll", "getAll", 1),
308    ("@proto:URLSearchParams:has", "has", 1),
309    ("@proto:URLSearchParams:keys", "keys", 0),
310    ("@proto:URLSearchParams:set", "set", 2),
311    ("@proto:URLSearchParams:sort", "sort", 0),
312    ("@proto:URLSearchParams:toString", "toString", 0),
313    ("@proto:URLSearchParams:values", "values", 0),
314    ("@proto:Uint8Array:setFromBase64", "setFromBase64", 1),
315    ("@proto:Uint8Array:setFromHex", "setFromHex", 1),
316    ("@proto:Uint8Array:toBase64", "toBase64", 0),
317    ("@proto:Uint8Array:toHex", "toHex", 0),
318    ("@proto:WeakMap:delete", "delete", 1),
319    ("@proto:WeakMap:get", "get", 1),
320    ("@proto:WeakMap:getOrInsert", "getOrInsert", 2),
321    (
322        "@proto:WeakMap:getOrInsertComputed",
323        "getOrInsertComputed",
324        2,
325    ),
326    ("@proto:WeakMap:has", "has", 1),
327    ("@proto:WeakMap:set", "set", 2),
328    ("@proto:WeakRef:deref", "deref", 0),
329    ("@proto:WeakSet:add", "add", 1),
330    ("@proto:WeakSet:delete", "delete", 1),
331    ("@proto:WeakSet:has", "has", 1),
332    ("AggregateError", "AggregateError", 2),
333    ("Array", "Array", 1),
334    ("Array.from", "from", 1),
335    ("Array.fromAsync", "fromAsync", 1),
336    ("Array.isArray", "isArray", 1),
337    ("Array.of", "of", 0),
338    ("ArrayBuffer", "ArrayBuffer", 1),
339    ("ArrayBuffer.isView", "isView", 1),
340    ("BigInt", "BigInt", 1),
341    ("BigInt.asIntN", "asIntN", 2),
342    ("BigInt.asUintN", "asUintN", 2),
343    ("BigInt64Array", "BigInt64Array", 3),
344    ("BigUint64Array", "BigUint64Array", 3),
345    ("Boolean", "Boolean", 1),
346    ("DataView", "DataView", 1),
347    ("Date", "Date", 7),
348    ("Date.UTC", "UTC", 7),
349    ("Date.now", "now", 0),
350    ("Date.parse", "parse", 1),
351    ("Error", "Error", 1),
352    ("Error.captureStackTrace", "captureStackTrace", 2),
353    ("Error.isError", "isError", 1),
354    ("EvalError", "EvalError", 1),
355    ("FinalizationRegistry", "FinalizationRegistry", 1),
356    ("Float32Array", "Float32Array", 3),
357    ("Float64Array", "Float64Array", 3),
358    ("Function", "Function", 1),
359    ("Int16Array", "Int16Array", 3),
360    ("Int32Array", "Int32Array", 3),
361    ("Int8Array", "Int8Array", 3),
362    ("Iterator", "Iterator", 0),
363    ("Iterator.concat", "concat", 0),
364    ("Iterator.from", "from", 1),
365    ("JSON.isRawJSON", "isRawJSON", 1),
366    ("JSON.parse", "parse", 2),
367    ("JSON.rawJSON", "rawJSON", 1),
368    ("JSON.stringify", "stringify", 3),
369    ("Map", "Map", 0),
370    ("Map.groupBy", "groupBy", 2),
371    ("Math.abs", "abs", 1),
372    ("Math.acos", "acos", 1),
373    ("Math.acosh", "acosh", 1),
374    ("Math.asin", "asin", 1),
375    ("Math.asinh", "asinh", 1),
376    ("Math.atan", "atan", 1),
377    ("Math.atan2", "atan2", 2),
378    ("Math.atanh", "atanh", 1),
379    ("Math.cbrt", "cbrt", 1),
380    ("Math.ceil", "ceil", 1),
381    ("Math.clz32", "clz32", 1),
382    ("Math.cos", "cos", 1),
383    ("Math.cosh", "cosh", 1),
384    ("Math.exp", "exp", 1),
385    ("Math.expm1", "expm1", 1),
386    ("Math.f16round", "f16round", 1),
387    ("Math.floor", "floor", 1),
388    ("Math.fround", "fround", 1),
389    ("Math.hypot", "hypot", 2),
390    ("Math.imul", "imul", 2),
391    ("Math.log", "log", 1),
392    ("Math.log10", "log10", 1),
393    ("Math.log1p", "log1p", 1),
394    ("Math.log2", "log2", 1),
395    ("Math.max", "max", 2),
396    ("Math.min", "min", 2),
397    ("Math.pow", "pow", 2),
398    ("Math.random", "random", 0),
399    ("Math.round", "round", 1),
400    ("Math.sign", "sign", 1),
401    ("Math.sin", "sin", 1),
402    ("Math.sinh", "sinh", 1),
403    ("Math.sqrt", "sqrt", 1),
404    ("Math.tan", "tan", 1),
405    ("Math.tanh", "tanh", 1),
406    ("Math.trunc", "trunc", 1),
407    ("Number", "Number", 1),
408    ("Number.isFinite", "isFinite", 1),
409    ("Number.isInteger", "isInteger", 1),
410    ("Number.isNaN", "isNaN", 1),
411    ("Number.isSafeInteger", "isSafeInteger", 1),
412    ("Number.parseFloat", "parseFloat", 1),
413    ("Number.parseInt", "parseInt", 2),
414    ("Object", "Object", 1),
415    ("Object.assign", "assign", 2),
416    ("Object.create", "create", 2),
417    ("Object.defineProperties", "defineProperties", 2),
418    ("Object.defineProperty", "defineProperty", 3),
419    ("Object.entries", "entries", 1),
420    ("Object.freeze", "freeze", 1),
421    ("Object.fromEntries", "fromEntries", 1),
422    (
423        "Object.getOwnPropertyDescriptor",
424        "getOwnPropertyDescriptor",
425        2,
426    ),
427    (
428        "Object.getOwnPropertyDescriptors",
429        "getOwnPropertyDescriptors",
430        1,
431    ),
432    ("Object.getOwnPropertyNames", "getOwnPropertyNames", 1),
433    ("Object.getOwnPropertySymbols", "getOwnPropertySymbols", 1),
434    ("Object.getPrototypeOf", "getPrototypeOf", 1),
435    ("Object.groupBy", "groupBy", 2),
436    ("Object.hasOwn", "hasOwn", 2),
437    ("Object.is", "is", 2),
438    ("Object.isExtensible", "isExtensible", 1),
439    ("Object.isFrozen", "isFrozen", 1),
440    ("Object.isSealed", "isSealed", 1),
441    ("Object.keys", "keys", 1),
442    ("Object.preventExtensions", "preventExtensions", 1),
443    ("Object.seal", "seal", 1),
444    ("Object.setPrototypeOf", "setPrototypeOf", 2),
445    ("Object.values", "values", 1),
446    ("Promise", "Promise", 1),
447    ("Promise.all", "all", 1),
448    ("Promise.allSettled", "allSettled", 1),
449    ("Promise.any", "any", 1),
450    ("Promise.race", "race", 1),
451    ("Promise.reject", "reject", 1),
452    ("Promise.resolve", "resolve", 1),
453    ("Promise.try", "try", 1),
454    ("Promise.withResolvers", "withResolvers", 0),
455    ("Proxy", "Proxy", 2),
456    ("Proxy.revocable", "revocable", 2),
457    ("RangeError", "RangeError", 1),
458    ("ReferenceError", "ReferenceError", 1),
459    ("Reflect.apply", "apply", 3),
460    ("Reflect.construct", "construct", 2),
461    ("Reflect.defineProperty", "defineProperty", 3),
462    ("Reflect.deleteProperty", "deleteProperty", 2),
463    ("Reflect.get", "get", 2),
464    (
465        "Reflect.getOwnPropertyDescriptor",
466        "getOwnPropertyDescriptor",
467        2,
468    ),
469    ("Reflect.getPrototypeOf", "getPrototypeOf", 1),
470    ("Reflect.has", "has", 2),
471    ("Reflect.isExtensible", "isExtensible", 1),
472    ("Reflect.ownKeys", "ownKeys", 1),
473    ("Reflect.preventExtensions", "preventExtensions", 1),
474    ("Reflect.set", "set", 3),
475    ("Reflect.setPrototypeOf", "setPrototypeOf", 2),
476    ("RegExp", "RegExp", 2),
477    ("RegExp.escape", "escape", 1),
478    ("Set", "Set", 0),
479    ("String", "String", 1),
480    ("String.fromCharCode", "fromCharCode", 1),
481    ("String.fromCodePoint", "fromCodePoint", 1),
482    ("String.raw", "raw", 1),
483    ("Symbol", "Symbol", 0),
484    ("Symbol.for", "for", 1),
485    ("Symbol.keyFor", "keyFor", 1),
486    ("SyntaxError", "SyntaxError", 1),
487    ("TextDecoder", "TextDecoder", 0),
488    ("TextEncoder", "TextEncoder", 0),
489    ("TypeError", "TypeError", 1),
490    ("TypedArray.from", "from", 1),
491    ("TypedArray.of", "of", 0),
492    ("URIError", "URIError", 1),
493    ("URL", "URL", 1),
494    ("URL.canParse", "canParse", 1),
495    ("URL.createObjectURL", "createObjectURL", 1),
496    ("URL.parse", "parse", 1),
497    ("URL.revokeObjectURL", "revokeObjectURL", 1),
498    ("URLSearchParams", "URLSearchParams", 0),
499    ("Uint16Array", "Uint16Array", 3),
500    ("Uint32Array", "Uint32Array", 3),
501    ("Uint8Array", "Uint8Array", 3),
502    ("Uint8Array.fromBase64", "fromBase64", 1),
503    ("Uint8Array.fromHex", "fromHex", 1),
504    ("Uint8ClampedArray", "Uint8ClampedArray", 3),
505    ("WeakMap", "WeakMap", 0),
506    ("WeakRef", "WeakRef", 1),
507    ("WeakSet", "WeakSet", 0),
508    ("atob", "atob", 1),
509    ("btoa", "btoa", 1),
510    ("decodeURI", "decodeURI", 1),
511    ("decodeURIComponent", "decodeURIComponent", 1),
512    ("encodeURI", "encodeURI", 1),
513    ("encodeURIComponent", "encodeURIComponent", 1),
514    ("isFinite", "isFinite", 1),
515    ("isNaN", "isNaN", 1),
516    ("parseFloat", "parseFloat", 1),
517    ("parseInt", "parseInt", 2),
518    ("queueMicrotask", "queueMicrotask", 1),
519    ("structuredClone", "structuredClone", 2),
520];
521
522/// The own property names of each intrinsic prototype, in the engine's own
523/// order. A name prefixed `+` is ENUMERABLE — true only for the WebIDL
524/// interfaces (`URL`, `URLSearchParams`), whose members are plain assigned
525/// properties, never for an ECMAScript builtin's.
526///
527/// Separate from [`BUILTIN_ARITY`] because that table holds FUNCTIONS only:
528/// `Map.prototype.size`, `RegExp.prototype.source` and the twelve
529/// `URL.prototype` components are accessors, so the answer to
530/// `Object.getOwnPropertyNames(Map.prototype)` is not derivable from it.
531/// Sorted by constructor for lookup; the NAMES within a row are not sorted.
532pub const PROTO_MEMBERS: &[(&str, &[&str])] = &[
533    ("AggregateError", &["constructor", "name", "message"]),
534    (
535        "Array",
536        &[
537            "length",
538            "constructor",
539            "at",
540            "concat",
541            "copyWithin",
542            "fill",
543            "find",
544            "findIndex",
545            "findLast",
546            "findLastIndex",
547            "lastIndexOf",
548            "pop",
549            "push",
550            "reverse",
551            "shift",
552            "unshift",
553            "slice",
554            "sort",
555            "splice",
556            "includes",
557            "indexOf",
558            "join",
559            "keys",
560            "entries",
561            "values",
562            "forEach",
563            "filter",
564            "flat",
565            "flatMap",
566            "map",
567            "every",
568            "some",
569            "reduce",
570            "reduceRight",
571            "toReversed",
572            "toSorted",
573            "toSpliced",
574            "with",
575            "toLocaleString",
576            "toString",
577            "@@iterator",
578            "@@unscopables",
579        ],
580    ),
581    (
582        "ArrayBuffer",
583        &[
584            "constructor",
585            "byteLength",
586            "slice",
587            "maxByteLength",
588            "resizable",
589            "resize",
590            "transfer",
591            "transferToFixedLength",
592            "detached",
593            "@@toStringTag",
594        ],
595    ),
596    (
597        "BigInt",
598        &[
599            "constructor",
600            "toLocaleString",
601            "toString",
602            "valueOf",
603            "@@toStringTag",
604        ],
605    ),
606    ("BigInt64Array", &["constructor", "BYTES_PER_ELEMENT"]),
607    ("BigUint64Array", &["constructor", "BYTES_PER_ELEMENT"]),
608    ("Boolean", &["constructor", "toString", "valueOf"]),
609    (
610        "DataView",
611        &[
612            "constructor",
613            "buffer",
614            "byteLength",
615            "byteOffset",
616            "getInt8",
617            "setInt8",
618            "getUint8",
619            "setUint8",
620            "getInt16",
621            "setInt16",
622            "getUint16",
623            "setUint16",
624            "getInt32",
625            "setInt32",
626            "getUint32",
627            "setUint32",
628            "getFloat32",
629            "setFloat32",
630            "getFloat64",
631            "setFloat64",
632            "getBigInt64",
633            "setBigInt64",
634            "getBigUint64",
635            "setBigUint64",
636            "getFloat16",
637            "setFloat16",
638            "@@toStringTag",
639        ],
640    ),
641    (
642        "Date",
643        &[
644            "constructor",
645            "toString",
646            "toDateString",
647            "toTimeString",
648            "toISOString",
649            "toUTCString",
650            "toGMTString",
651            "getDate",
652            "setDate",
653            "getDay",
654            "getFullYear",
655            "setFullYear",
656            "getHours",
657            "setHours",
658            "getMilliseconds",
659            "setMilliseconds",
660            "getMinutes",
661            "setMinutes",
662            "getMonth",
663            "setMonth",
664            "getSeconds",
665            "setSeconds",
666            "getTime",
667            "setTime",
668            "getTimezoneOffset",
669            "getUTCDate",
670            "setUTCDate",
671            "getUTCDay",
672            "getUTCFullYear",
673            "setUTCFullYear",
674            "getUTCHours",
675            "setUTCHours",
676            "getUTCMilliseconds",
677            "setUTCMilliseconds",
678            "getUTCMinutes",
679            "setUTCMinutes",
680            "getUTCMonth",
681            "setUTCMonth",
682            "getUTCSeconds",
683            "setUTCSeconds",
684            "valueOf",
685            "getYear",
686            "setYear",
687            "toJSON",
688            "toLocaleString",
689            "toLocaleDateString",
690            "toLocaleTimeString",
691            "@@toPrimitive",
692        ],
693    ),
694    ("Error", &["constructor", "name", "message", "toString"]),
695    ("EvalError", &["constructor", "name", "message"]),
696    (
697        "FinalizationRegistry",
698        &["constructor", "register", "unregister", "@@toStringTag"],
699    ),
700    ("Float32Array", &["constructor", "BYTES_PER_ELEMENT"]),
701    ("Float64Array", &["constructor", "BYTES_PER_ELEMENT"]),
702    (
703        "Function",
704        &[
705            "length",
706            "name",
707            "constructor",
708            "apply",
709            "bind",
710            "call",
711            "toString",
712            "arguments",
713            "caller",
714            "@@hasInstance",
715        ],
716    ),
717    ("Int16Array", &["constructor", "BYTES_PER_ELEMENT"]),
718    ("Int32Array", &["constructor", "BYTES_PER_ELEMENT"]),
719    ("Int8Array", &["constructor", "BYTES_PER_ELEMENT"]),
720    (
721        "Iterator",
722        &[
723            "constructor",
724            "reduce",
725            "toArray",
726            "forEach",
727            "some",
728            "every",
729            "find",
730            "map",
731            "filter",
732            "take",
733            "drop",
734            "flatMap",
735            "@@iterator",
736            "@@toStringTag",
737            "@@dispose",
738        ],
739    ),
740    (
741        "Map",
742        &[
743            "constructor",
744            "get",
745            "set",
746            "has",
747            "delete",
748            "clear",
749            "entries",
750            "forEach",
751            "keys",
752            "size",
753            "values",
754            "getOrInsert",
755            "getOrInsertComputed",
756            "@@toStringTag",
757            "@@iterator",
758        ],
759    ),
760    (
761        "Number",
762        &[
763            "constructor",
764            "toExponential",
765            "toFixed",
766            "toPrecision",
767            "toString",
768            "valueOf",
769            "toLocaleString",
770        ],
771    ),
772    (
773        "Object",
774        &[
775            "constructor",
776            "__defineGetter__",
777            "__defineSetter__",
778            "hasOwnProperty",
779            "__lookupGetter__",
780            "__lookupSetter__",
781            "isPrototypeOf",
782            "propertyIsEnumerable",
783            "toString",
784            "valueOf",
785            "__proto__",
786            "toLocaleString",
787        ],
788    ),
789    (
790        "Promise",
791        &["constructor", "then", "catch", "finally", "@@toStringTag"],
792    ),
793    ("RangeError", &["constructor", "name", "message"]),
794    ("ReferenceError", &["constructor", "name", "message"]),
795    (
796        "RegExp",
797        &[
798            "constructor",
799            "exec",
800            "dotAll",
801            "flags",
802            "global",
803            "hasIndices",
804            "ignoreCase",
805            "multiline",
806            "source",
807            "sticky",
808            "unicode",
809            "unicodeSets",
810            "compile",
811            "toString",
812            "test",
813            "@@match",
814            "@@matchAll",
815            "@@replace",
816            "@@search",
817            "@@split",
818        ],
819    ),
820    (
821        "Set",
822        &[
823            "constructor",
824            "has",
825            "add",
826            "delete",
827            "difference",
828            "clear",
829            "entries",
830            "forEach",
831            "intersection",
832            "isSubsetOf",
833            "isSupersetOf",
834            "isDisjointFrom",
835            "size",
836            "symmetricDifference",
837            "union",
838            "values",
839            "keys",
840            "@@toStringTag",
841            "@@iterator",
842        ],
843    ),
844    (
845        "String",
846        &[
847            "length",
848            "constructor",
849            "anchor",
850            "at",
851            "big",
852            "blink",
853            "bold",
854            "charAt",
855            "charCodeAt",
856            "codePointAt",
857            "concat",
858            "endsWith",
859            "fontcolor",
860            "fontsize",
861            "fixed",
862            "includes",
863            "indexOf",
864            "isWellFormed",
865            "italics",
866            "lastIndexOf",
867            "link",
868            "localeCompare",
869            "match",
870            "matchAll",
871            "normalize",
872            "padEnd",
873            "padStart",
874            "repeat",
875            "replace",
876            "replaceAll",
877            "search",
878            "slice",
879            "small",
880            "split",
881            "strike",
882            "sub",
883            "substr",
884            "substring",
885            "sup",
886            "startsWith",
887            "toString",
888            "toWellFormed",
889            "trim",
890            "trimStart",
891            "trimLeft",
892            "trimEnd",
893            "trimRight",
894            "toLocaleLowerCase",
895            "toLocaleUpperCase",
896            "toLowerCase",
897            "toUpperCase",
898            "valueOf",
899            "@@iterator",
900        ],
901    ),
902    (
903        "Symbol",
904        &[
905            "constructor",
906            "toString",
907            "valueOf",
908            "description",
909            "@@toStringTag",
910            "@@toPrimitive",
911        ],
912    ),
913    ("SyntaxError", &["constructor", "name", "message"]),
914    (
915        "TextDecoder",
916        &[
917            "constructor",
918            "+decode",
919            "+encoding",
920            "+fatal",
921            "+ignoreBOM",
922            "@@toStringTag",
923        ],
924    ),
925    (
926        "TextEncoder",
927        &[
928            "constructor",
929            "+encoding",
930            "+encode",
931            "+encodeInto",
932            "@@toStringTag",
933        ],
934    ),
935    ("TypeError", &["constructor", "name", "message"]),
936    (
937        "TypedArray",
938        &[
939            "constructor",
940            "buffer",
941            "byteLength",
942            "byteOffset",
943            "length",
944            "entries",
945            "keys",
946            "values",
947            "at",
948            "copyWithin",
949            "every",
950            "fill",
951            "filter",
952            "find",
953            "findIndex",
954            "findLast",
955            "findLastIndex",
956            "forEach",
957            "includes",
958            "indexOf",
959            "join",
960            "lastIndexOf",
961            "map",
962            "reverse",
963            "reduce",
964            "reduceRight",
965            "set",
966            "slice",
967            "some",
968            "sort",
969            "subarray",
970            "toReversed",
971            "toSorted",
972            "with",
973            "toLocaleString",
974            "toString",
975            "@@toStringTag",
976            "@@iterator",
977        ],
978    ),
979    ("URIError", &["constructor", "name", "message"]),
980    (
981        "URL",
982        &[
983            "constructor",
984            "+toString",
985            "+href",
986            "+origin",
987            "+protocol",
988            "+username",
989            "+password",
990            "+host",
991            "+hostname",
992            "+port",
993            "+pathname",
994            "+search",
995            "+searchParams",
996            "+hash",
997            "+toJSON",
998            "@@toStringTag",
999        ],
1000    ),
1001    (
1002        "URLSearchParams",
1003        &[
1004            "constructor",
1005            "+size",
1006            "+append",
1007            "+delete",
1008            "+get",
1009            "+getAll",
1010            "+has",
1011            "+set",
1012            "+sort",
1013            "+entries",
1014            "+forEach",
1015            "+keys",
1016            "+values",
1017            "+toString",
1018            "@@toStringTag",
1019            "@@iterator",
1020        ],
1021    ),
1022    ("Uint16Array", &["constructor", "BYTES_PER_ELEMENT"]),
1023    ("Uint32Array", &["constructor", "BYTES_PER_ELEMENT"]),
1024    (
1025        "Uint8Array",
1026        &[
1027            "constructor",
1028            "BYTES_PER_ELEMENT",
1029            "toBase64",
1030            "setFromBase64",
1031            "toHex",
1032            "setFromHex",
1033        ],
1034    ),
1035    ("Uint8ClampedArray", &["constructor", "BYTES_PER_ELEMENT"]),
1036    (
1037        "WeakMap",
1038        &[
1039            "constructor",
1040            "delete",
1041            "get",
1042            "set",
1043            "has",
1044            "getOrInsert",
1045            "getOrInsertComputed",
1046            "@@toStringTag",
1047        ],
1048    ),
1049    ("WeakRef", &["constructor", "deref", "@@toStringTag"]),
1050    (
1051        "WeakSet",
1052        &["constructor", "delete", "has", "add", "@@toStringTag"],
1053    ),
1054];
1055
1056/// The ACCESSOR members of each intrinsic prototype — the subset of
1057/// [`PROTO_MEMBERS`] whose descriptor carries a `get` rather than a value.
1058///
1059/// Needed because the two are not interchangeable on the PROTOTYPE itself:
1060/// `Map.prototype.size` runs a brand check against `%Map.prototype%` and
1061/// throws, where a data member reads back its value. Neither existing table
1062/// records the descriptor kind.
1063/// Sorted by constructor; the NAMES within a row are not sorted.
1064pub const PROTO_ACCESSORS: &[(&str, &[&str])] = &[
1065    (
1066        "ArrayBuffer",
1067        &["byteLength", "maxByteLength", "resizable", "detached"],
1068    ),
1069    ("DataView", &["buffer", "byteLength", "byteOffset"]),
1070    ("Function", &["arguments", "caller"]),
1071    ("Iterator", &["constructor"]),
1072    ("Map", &["size"]),
1073    ("Object", &["__proto__"]),
1074    (
1075        "RegExp",
1076        &[
1077            "dotAll",
1078            "flags",
1079            "global",
1080            "hasIndices",
1081            "ignoreCase",
1082            "multiline",
1083            "source",
1084            "sticky",
1085            "unicode",
1086            "unicodeSets",
1087        ],
1088    ),
1089    ("Set", &["size"]),
1090    ("Symbol", &["description"]),
1091    ("TextDecoder", &["encoding", "fatal", "ignoreBOM"]),
1092    ("TextEncoder", &["encoding"]),
1093    (
1094        "TypedArray",
1095        &["buffer", "byteLength", "byteOffset", "length"],
1096    ),
1097    (
1098        "URL",
1099        &[
1100            "href",
1101            "origin",
1102            "protocol",
1103            "username",
1104            "password",
1105            "host",
1106            "hostname",
1107            "port",
1108            "pathname",
1109            "search",
1110            "searchParams",
1111            "hash",
1112        ],
1113    ),
1114    ("URLSearchParams", &["size"]),
1115];
1116
1117/// The NON-WRITABLE data members of each intrinsic prototype.
1118///
1119/// An inherited non-writable property refuses an assignment on every
1120/// object below it (10.1.9.2), so `o[Symbol.toStringTag] = 'x'` is silently
1121/// dropped when `o` inherits from `Map.prototype`. All but
1122/// `String.prototype.length` are symbol-keyed.
1123/// Sorted by constructor; the NAMES within a row are not sorted.
1124pub const PROTO_READONLY: &[(&str, &[&str])] = &[
1125    ("Array", &["@@unscopables"]),
1126    ("ArrayBuffer", &["@@toStringTag"]),
1127    ("BigInt", &["@@toStringTag"]),
1128    ("BigInt64Array", &["BYTES_PER_ELEMENT"]),
1129    ("BigUint64Array", &["BYTES_PER_ELEMENT"]),
1130    ("DataView", &["@@toStringTag"]),
1131    ("Date", &["@@toPrimitive"]),
1132    ("FinalizationRegistry", &["@@toStringTag"]),
1133    ("Float32Array", &["BYTES_PER_ELEMENT"]),
1134    ("Float64Array", &["BYTES_PER_ELEMENT"]),
1135    ("Function", &["length", "name", "@@hasInstance"]),
1136    ("Int16Array", &["BYTES_PER_ELEMENT"]),
1137    ("Int32Array", &["BYTES_PER_ELEMENT"]),
1138    ("Int8Array", &["BYTES_PER_ELEMENT"]),
1139    ("Map", &["@@toStringTag"]),
1140    ("Promise", &["@@toStringTag"]),
1141    ("Set", &["@@toStringTag"]),
1142    ("String", &["length"]),
1143    ("Symbol", &["@@toStringTag", "@@toPrimitive"]),
1144    ("TextDecoder", &["@@toStringTag"]),
1145    ("TextEncoder", &["@@toStringTag"]),
1146    ("URL", &["@@toStringTag"]),
1147    ("URLSearchParams", &["@@toStringTag"]),
1148    ("Uint16Array", &["BYTES_PER_ELEMENT"]),
1149    ("Uint32Array", &["BYTES_PER_ELEMENT"]),
1150    ("Uint8Array", &["BYTES_PER_ELEMENT"]),
1151    ("Uint8ClampedArray", &["BYTES_PER_ELEMENT"]),
1152    ("WeakMap", &["@@toStringTag"]),
1153    ("WeakRef", &["@@toStringTag"]),
1154    ("WeakSet", &["@@toStringTag"]),
1155];