mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
4511 lines
119 KiB
4511 lines
119 KiB
#
|
|
# Built-in objects
|
|
#
|
|
|
|
# YAML conventions:
|
|
#
|
|
# - Indent by two, indent lists of objects too.
|
|
# - Quoted used for keys, explicit string values, hex data, attributes.
|
|
# Not used for classes, built-in ID values, etc, unless necessary.
|
|
# - Double quotes used throughout to allow escaping.
|
|
#
|
|
# Top level object format is mostly self explanatory, a few notes:
|
|
#
|
|
# - The "id" string is used for referencing objects from property table
|
|
# - Class names must match array in genbuiltins.py
|
|
# - If the top level object is a function:
|
|
# - varargs: if true, function is vararg (nargs = DUK_VARARGS)
|
|
# - nargs: nargs (ignored if varargs true); if missing, default from 'length' property
|
|
# - magic: see below
|
|
# - native: native function name
|
|
# - callable: true
|
|
# - constructable: true/false, depending on function
|
|
# - To disable an object without removing its metadata, you can
|
|
# use 'disable: true'.
|
|
# - If the object is dependent on Duktape configuration, you can make the
|
|
# object optional using e.g. 'present_if: DUK_USE_BUFFEROBJECT_SUPPORT'.
|
|
# If the value is a list, the object is present if all listed options are
|
|
# enabled (logical AND).
|
|
# - If the object needs a DUK_BIDX_xxx define in Duktape source code, which
|
|
# also implies it'll get a slot in thr->builtins[] array, use 'bidx: true'.
|
|
#
|
|
# Property format:
|
|
#
|
|
# - key: verbatim string key, codepoints U+0000...U+00FF map to bytes,
|
|
# so that \u00ff is 0xFF prefix
|
|
# - value: see below
|
|
# - attributes: string of format /w?e?c?a?/, e.g. "wc" is writable and
|
|
# configurable
|
|
# + w: writable
|
|
# + e: enumerable
|
|
# + c: configurable
|
|
# + a: accessor (determined automatically, not necessary to give explicitly)
|
|
# - autoLightfunc: if true (which is default), function property may be
|
|
# automatically converted to a lightfunc if other automatic lightfunc
|
|
# conversion criteria are met; use "autoLightfunc: false" to prevent
|
|
# lightfunc conversion
|
|
# - May also have feature tags like "es6: true" to indicate property
|
|
# is related to a specific standard
|
|
# - To disable a property without removing its metadata, you can use
|
|
# 'disable: true'.
|
|
# - If the property is dependent on Duktape configuration, you can make the
|
|
# property optional using e.g. 'present_if: DUK_USE_BUFFEROBJECT_SUPPORT'.
|
|
# List of options is interpreted as for objects (logical AND).
|
|
#
|
|
# Property value format:
|
|
#
|
|
# - Ecmascript undefined:
|
|
# - type: undefined
|
|
# - Plain YAML/JSON null (parses as Python None)
|
|
# - treated as Ecmascript null
|
|
# - Plain string:
|
|
# - treated as plain string, string data as with keys
|
|
# - Plain number:
|
|
# - treated as a fastint/ieee double
|
|
# - IEEE double:
|
|
# - type: double
|
|
# - bytes: IEEE bytes in big endian format, hex encoded
|
|
# - NOTE: if you define a NaN, make sure it is in the Duktape normalized
|
|
# form (see bi_global 'NaN' property): otherwise strange things will
|
|
# happen with packed duk_tval
|
|
# - Buffer:
|
|
# - type: buffer
|
|
# - NOTE: not supported yet, type is reserved
|
|
# - Pointer:
|
|
# - type: pointer
|
|
# - NOTE: not supported yet, type is reserved
|
|
# - Lightfunc:
|
|
# - type: lightfunc
|
|
# - native: native function name
|
|
# - magic: -128 to 127
|
|
# - length: 0 to 15
|
|
# - nargs: 0 to 14; or varargs: true
|
|
# - varargs: if true, target has variable arguments
|
|
# - Reference to a built-in object:
|
|
# - type: object
|
|
# id: ID string of target object
|
|
# - Accessor (setter/getter):
|
|
# - type: accessor
|
|
# - getter_id: object ID of getter
|
|
# - setter_id: object ID of setter
|
|
# - Native function shorthand; alternative to defining a function as a
|
|
# native object and referencing it using an ID:
|
|
# - type: function (implicitly callable)
|
|
# - constructable: default is false
|
|
# - native: native function name
|
|
# - length: function .length (optional, defaults to 0)
|
|
# - nargs: function nargs (optional, defaults to length)
|
|
# - varargs: if true, function is vararg (nargs = DUK_VARARGS)
|
|
# - magic: magic value for function (see below)
|
|
# - Accessor (setter/getter) shorthand:
|
|
# - type: accessor
|
|
# - getter: native function name
|
|
# - setter: native function name
|
|
# - getter_magic: magic value for getter
|
|
# - setter_magic: magic value for setter
|
|
# - getter_nargs: nargs value for getter
|
|
# - setter_nargs: nargs value for setter
|
|
# - getter_length: length value for getter (0 if missing)
|
|
# - setter_length: length value for setter (0 if missing)
|
|
# - Structured object shorthand:
|
|
# - type: structured
|
|
# - value: arbitrary JSON-like value
|
|
# - NOTE: value is converted into object(s) with properties
|
|
# similarly to JSON.parse() results: properties will be
|
|
# writable, enumerable, and configurable, inherit from
|
|
# Object.prototype, etc.
|
|
#
|
|
# Magic format:
|
|
#
|
|
# - Plain number: direct magic value
|
|
# - Array iterator magic:
|
|
# - type: array_iter
|
|
# - funcname: function name, e.g. "forEach"
|
|
# - Built-in object index:
|
|
# - type: bidx
|
|
# - id: id of built-object, idx to thr->builtins[]
|
|
# - One-argument math function:
|
|
# - type: math_onearg
|
|
# - funcname: name of function, e.g. "cos"
|
|
# - Two-argument math function:
|
|
# - type: math_twoarg
|
|
# - funcname: name of function, e.g. "atan2"
|
|
# - Typed array constructor
|
|
# - type: typedarray_constructor
|
|
# - elem: element type, e.g. "int8"
|
|
# - shift: shift for element size (0 = 1 byte element, 2 = 4 byte element etc)
|
|
|
|
objects:
|
|
|
|
# internal prototype: implementation specific
|
|
# Smjs: Object.prototype
|
|
# Rhino: Object.prototype
|
|
# V8: *not* Object.prototype, but prototype chain includes Object.prototype
|
|
# external prototype: apparently not set
|
|
# external constructor: apparently not set
|
|
# internal class: implemented specific
|
|
# Smjs: "global"
|
|
# Rhino: "global"
|
|
# V8: "global"
|
|
#
|
|
# E5 Sections B.2.1 and B.2.2 describe non-standard properties which are
|
|
# included below but flagged as extensions.
|
|
|
|
- id: bi_global
|
|
class: global
|
|
internal_prototype: bi_object_prototype
|
|
bidx: true
|
|
|
|
properties:
|
|
- key: "NaN"
|
|
value:
|
|
type: double
|
|
bytes: "7ff8000000000000" # DBL_NAN
|
|
attributes: ""
|
|
present_if: DUK_USE_GLOBAL_BUILTIN
|
|
- key: "Infinity"
|
|
value:
|
|
type: double
|
|
bytes: "7ff0000000000000" # DBL_POSITIVE_INFINITY
|
|
attributes: ""
|
|
present_if: DUK_USE_GLOBAL_BUILTIN
|
|
- key: "undefined"
|
|
value:
|
|
type: undefined
|
|
attributes: ""
|
|
# This could be stripped when DUK_USE_GLOBAL_BUILTIN is disabled
|
|
# ("void 0" is the same and safer) but it's commonly used so keep.
|
|
|
|
- key: "Object"
|
|
value:
|
|
type: object
|
|
id: bi_object_constructor
|
|
present_if: DUK_USE_OBJECT_BUILTIN
|
|
- key: "Function"
|
|
value:
|
|
type: object
|
|
id: bi_function_constructor
|
|
present_if: DUK_USE_FUNCTION_BUILTIN
|
|
- key: "Array"
|
|
value:
|
|
type: object
|
|
id: bi_array_constructor
|
|
present_if: DUK_USE_ARRAY_BUILTIN
|
|
- key: "String"
|
|
value:
|
|
type: object
|
|
id: bi_string_constructor
|
|
present_if: DUK_USE_STRING_BUILTIN
|
|
- key: "Boolean"
|
|
value:
|
|
type: object
|
|
id: bi_boolean_constructor
|
|
present_if: DUK_USE_BOOLEAN_BUILTIN
|
|
- key: "Number"
|
|
value:
|
|
type: object
|
|
id: bi_number_constructor
|
|
present_if: DUK_USE_NUMBER_BUILTIN
|
|
- key: "Date"
|
|
value:
|
|
type: object
|
|
id: bi_date_constructor
|
|
present_if: DUK_USE_DATE_BUILTIN
|
|
- key: "RegExp"
|
|
value:
|
|
type: object
|
|
id: bi_regexp_constructor
|
|
present_if: DUK_USE_REGEXP_SUPPORT
|
|
- key: "Error"
|
|
value:
|
|
type: object
|
|
id: bi_error_constructor
|
|
- key: "EvalError"
|
|
value:
|
|
type: object
|
|
id: bi_eval_error_constructor
|
|
- key: "RangeError"
|
|
value:
|
|
type: object
|
|
id: bi_range_error_constructor
|
|
- key: "ReferenceError"
|
|
value:
|
|
type: object
|
|
id: bi_reference_error_constructor
|
|
- key: "SyntaxError"
|
|
value:
|
|
type: object
|
|
id: bi_syntax_error_constructor
|
|
- key: "TypeError"
|
|
value:
|
|
type: object
|
|
id: bi_type_error_constructor
|
|
- key: "URIError"
|
|
value:
|
|
type: object
|
|
id: bi_uri_error_constructor
|
|
- key: "Math"
|
|
value:
|
|
type: object
|
|
id: bi_math
|
|
present_if: DUK_USE_MATH_BUILTIN
|
|
- key: "JSON"
|
|
value:
|
|
type: object
|
|
id: bi_json
|
|
present_if: DUK_USE_JSON_BUILTIN
|
|
|
|
# Duktape specific
|
|
- key: "Duktape"
|
|
value:
|
|
type: object
|
|
id: bi_duktape
|
|
duktape: true
|
|
# Remains present even when disabled: needed for error augmentation internally.
|
|
#present_if: DUK_USE_DUKTAPE_BUILTIN
|
|
|
|
# ES6
|
|
- key: "Proxy"
|
|
value:
|
|
type: object
|
|
id: bi_proxy_constructor
|
|
es6: true
|
|
present_if: DUK_USE_ES6_PROXY
|
|
- key: "Reflect"
|
|
value:
|
|
type: object
|
|
id: bi_reflect
|
|
es6: true
|
|
present_if: DUK_USE_REFLECT_BUILTIN
|
|
|
|
# Node.js Buffer
|
|
- key: "Buffer"
|
|
value:
|
|
type: object
|
|
id: bi_nodejs_buffer_constructor
|
|
nodejs_buffer: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
# TypedArray
|
|
- key: "ArrayBuffer"
|
|
value:
|
|
type: object
|
|
id: bi_arraybuffer_constructor
|
|
typedarray: true
|
|
es6: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
- key: "DataView"
|
|
value:
|
|
type: object
|
|
id: bi_dataview_constructor
|
|
typedarray: true
|
|
es6: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
- key: "Int8Array"
|
|
value:
|
|
type: object
|
|
id: bi_int8array_constructor
|
|
typedarray: true
|
|
es6: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
- key: "Uint8Array"
|
|
value:
|
|
type: object
|
|
id: bi_uint8array_constructor
|
|
typedarray: true
|
|
es6: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
- key: "Uint8ClampedArray"
|
|
value:
|
|
type: object
|
|
id: bi_uint8clampedarray_constructor
|
|
typedarray: true
|
|
es6: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
- key: "Int16Array"
|
|
value:
|
|
type: object
|
|
id: bi_int16array_constructor
|
|
typedarray: true
|
|
es6: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
- key: "Uint16Array"
|
|
value:
|
|
type: object
|
|
id: bi_uint16array_constructor
|
|
typedarray: true
|
|
es6: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
- key: "Int32Array"
|
|
value:
|
|
type: object
|
|
id: bi_int32array_constructor
|
|
typedarray: true
|
|
es6: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
- key: "Uint32Array"
|
|
value:
|
|
type: object
|
|
id: bi_uint32array_constructor
|
|
typedarray: true
|
|
es6: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
- key: "Float32Array"
|
|
value:
|
|
type: object
|
|
id: bi_float32array_constructor
|
|
typedarray: true
|
|
es6: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
- key: "Float64Array"
|
|
value:
|
|
type: object
|
|
id: bi_float64array_constructor
|
|
typedarray: true
|
|
es6: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
# Encoding API
|
|
- key: "TextEncoder"
|
|
value:
|
|
type: object
|
|
id: bi_textencoder_constructor
|
|
encoding_api: true
|
|
present_if: DUK_USE_ENCODING_BUILTINS
|
|
- key: "TextDecoder"
|
|
value:
|
|
type: object
|
|
id: bi_textdecoder_constructor
|
|
encoding_api: true
|
|
present_if: DUK_USE_ENCODING_BUILTINS
|
|
|
|
# Functions
|
|
- key: "eval"
|
|
value:
|
|
type: function
|
|
native: duk_bi_global_object_eval
|
|
length: 1
|
|
autoLightfunc: false # automatic lightfunc conversion clashes with internal implementation
|
|
present_if: DUK_USE_GLOBAL_BUILTIN
|
|
- key: "parseInt"
|
|
value:
|
|
type: function
|
|
native: duk_bi_global_object_parse_int
|
|
length: 2
|
|
present_if: DUK_USE_GLOBAL_BUILTIN
|
|
- key: "parseFloat"
|
|
value:
|
|
type: function
|
|
native: duk_bi_global_object_parse_float
|
|
length: 1
|
|
present_if: DUK_USE_GLOBAL_BUILTIN
|
|
- key: "isNaN"
|
|
value:
|
|
type: function
|
|
native: duk_bi_global_object_is_nan
|
|
length: 1
|
|
present_if: DUK_USE_GLOBAL_BUILTIN
|
|
- key: "isFinite"
|
|
value:
|
|
type: function
|
|
native: duk_bi_global_object_is_finite
|
|
length: 1
|
|
present_if: DUK_USE_GLOBAL_BUILTIN
|
|
- key: "decodeURI"
|
|
value:
|
|
type: function
|
|
native: duk_bi_global_object_decode_uri
|
|
length: 1
|
|
present_if: DUK_USE_GLOBAL_BUILTIN
|
|
- key: "decodeURIComponent"
|
|
value:
|
|
type: function
|
|
native: duk_bi_global_object_decode_uri_component
|
|
length: 1
|
|
present_if: DUK_USE_GLOBAL_BUILTIN
|
|
- key: "encodeURI"
|
|
value:
|
|
type: function
|
|
native: duk_bi_global_object_encode_uri
|
|
length: 1
|
|
present_if: DUK_USE_GLOBAL_BUILTIN
|
|
- key: "encodeURIComponent"
|
|
value:
|
|
type: function
|
|
native: duk_bi_global_object_encode_uri_component
|
|
length: 1
|
|
present_if: DUK_USE_GLOBAL_BUILTIN
|
|
|
|
# Non-standard extensions: E5 Sections B.2.1 and B.2.2
|
|
#
|
|
# "length" is not specified explicitly in E5 but it follows the
|
|
# general argument count rule. V8 also agrees on the lengths.
|
|
|
|
- key: "escape"
|
|
value:
|
|
type: function
|
|
native: duk_bi_global_object_escape
|
|
length: 1
|
|
section_b: true
|
|
present_if:
|
|
- DUK_USE_SECTION_B
|
|
- DUK_USE_GLOBAL_BUILTIN
|
|
- key: "unescape"
|
|
value:
|
|
type: function
|
|
native: duk_bi_global_object_unescape
|
|
length: 1
|
|
section_b: true
|
|
present_if:
|
|
- DUK_USE_SECTION_B
|
|
- DUK_USE_GLOBAL_BUILTIN
|
|
|
|
- id: bi_global_env
|
|
class: ObjEnv
|
|
duktape: true
|
|
bidx: true
|
|
|
|
properties:
|
|
- key: "\u00ffTarget"
|
|
value:
|
|
type: object
|
|
id: bi_global
|
|
attributes: ""
|
|
duktape: true
|
|
|
|
- id: bi_object_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
native: duk_bi_object_constructor
|
|
callable: true
|
|
constructable: true
|
|
bidx: true
|
|
present_if: DUK_USE_OBJECT_BUILTIN
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 1
|
|
attributes: ""
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_object_prototype
|
|
attributes: ""
|
|
- key: "name"
|
|
value: "Object"
|
|
attributes: ""
|
|
|
|
- key: "getPrototypeOf"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_getprototype_shared
|
|
length: 1
|
|
magic: 1
|
|
- key: "setPrototypeOf"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_setprototype_shared
|
|
length: 2
|
|
magic: 1
|
|
es6: true
|
|
- key: "getOwnPropertyDescriptor"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_constructor_get_own_property_descriptor
|
|
length: 2
|
|
magic: 0
|
|
- key: "getOwnPropertyNames"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_constructor_keys_shared
|
|
length: 1
|
|
magic: 0
|
|
- key: "assign"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_constructor_assign
|
|
length: 2
|
|
varargs: true
|
|
es6: true
|
|
present_if: DUK_USE_ES6
|
|
- key: "create"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_constructor_create
|
|
length: 2
|
|
- key: "defineProperty"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_constructor_define_property
|
|
length: 3
|
|
magic: 0
|
|
- key: "defineProperties"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_constructor_define_properties
|
|
length: 2
|
|
- key: "seal"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_constructor_seal_freeze_shared
|
|
length: 1
|
|
magic: 0
|
|
- key: "freeze"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_constructor_seal_freeze_shared
|
|
length: 1
|
|
magic: 1
|
|
- key: "preventExtensions"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_constructor_prevent_extensions
|
|
length: 1
|
|
magic: 0
|
|
- key: "isSealed"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_constructor_is_sealed_frozen_shared
|
|
length: 1
|
|
magic: 0
|
|
- key: "isFrozen"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_constructor_is_sealed_frozen_shared
|
|
length: 1
|
|
magic: 1
|
|
- key: "isExtensible"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_constructor_is_extensible
|
|
length: 1
|
|
magic: 0
|
|
- key: "keys"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_constructor_keys_shared
|
|
length: 1
|
|
magic: 1
|
|
- key: "is"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_constructor_is
|
|
length: 2
|
|
nargs: 2
|
|
es6: true
|
|
present_if: DUK_USE_ES6
|
|
|
|
- id: bi_object_prototype
|
|
class: Object
|
|
# internal_prototype: null
|
|
bidx: true
|
|
# Present even when DUK_USE_OBJECT_BUILTIN disabled.
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_object_constructor
|
|
attributes: "wc"
|
|
present_if: DUK_USE_OBJECT_BUILTIN
|
|
|
|
- key: "__proto__"
|
|
value:
|
|
type: accessor
|
|
getter: duk_bi_object_getprototype_shared
|
|
setter: duk_bi_object_setprototype_shared
|
|
getter_nargs: 0
|
|
setter_nargs: 1
|
|
getter_magic: 0
|
|
setter_magic: 0
|
|
attributes: "c" # configurable in ES6, also V8
|
|
es6: true # also non-standard legacy
|
|
present_if: DUK_USE_OBJECT_BUILTIN
|
|
|
|
- key: "toString"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_prototype_to_string
|
|
length: 0
|
|
present_if: DUK_USE_OBJECT_BUILTIN
|
|
- key: "toLocaleString"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_prototype_to_locale_string
|
|
length: 0
|
|
present_if: DUK_USE_OBJECT_BUILTIN
|
|
- key: "valueOf"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_prototype_value_of
|
|
length: 0
|
|
present_if: DUK_USE_OBJECT_BUILTIN
|
|
- key: "hasOwnProperty"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_prototype_has_own_property
|
|
length: 1
|
|
present_if: DUK_USE_OBJECT_BUILTIN
|
|
- key: "isPrototypeOf"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_prototype_is_prototype_of
|
|
length: 1
|
|
present_if: DUK_USE_OBJECT_BUILTIN
|
|
- key: "propertyIsEnumerable"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_prototype_property_is_enumerable
|
|
length: 1
|
|
present_if: DUK_USE_OBJECT_BUILTIN
|
|
|
|
- id: bi_function_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
varargs: true
|
|
native: duk_bi_function_constructor
|
|
callable: true
|
|
constructable: true
|
|
bidx: true
|
|
present_if: DUK_USE_FUNCTION_BUILTIN
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 1
|
|
attributes: ""
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_function_prototype
|
|
attributes: ""
|
|
- key: "name"
|
|
value: "Function"
|
|
attributes: ""
|
|
|
|
# Note, unlike other prototype objects, Function.prototype is itself
|
|
# a Function and callable. When invoked, it accepts any arguments
|
|
# and returns undefined. It cannot be called as a constructor.
|
|
# See E5 Section 15.3.4.
|
|
- id: bi_function_prototype
|
|
class: Function
|
|
internal_prototype: bi_object_prototype
|
|
native: duk_bi_function_prototype
|
|
callable: true
|
|
constructable: false # Note: differs from other global Function classed objects (matches e.g. V8 behavior).
|
|
bidx: true
|
|
nargs: 0 # given explicitly because .length is optional
|
|
# Present even when DUK_USE_FUNCTION_BUILTIN disabled.
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 0
|
|
attributes: ""
|
|
present_if: DUK_USE_FUNCTION_BUILTIN
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_function_constructor
|
|
attributes: "wc"
|
|
present_if: DUK_USE_FUNCTION_BUILTIN
|
|
|
|
# Each built-in of class Function has a "name" which is
|
|
# non-writable (the empty string above). Function.prototype
|
|
# is a special case: it is a function but we want it's name
|
|
# to be writable so that user code can set a "name" property
|
|
# for Duktape/C functions. If the Function.prototype.name
|
|
# property were non-writable, that would be prevented due to
|
|
# standard Ecmascript property write semantics.
|
|
- key: "name"
|
|
value: ""
|
|
attributes: "w"
|
|
#present_if: DUK_USE_FUNCTION_BUILTIN # Kept even when prototype is otherwise empty to guarantee a .name for functions
|
|
|
|
# test262 ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A11 checks that Function.prototype.toString.length
|
|
# is zero, cannot find specification support for that but 0 is a good value.
|
|
- key: "toString"
|
|
value:
|
|
type: function
|
|
native: duk_bi_function_prototype_to_string
|
|
length: 0
|
|
present_if: DUK_USE_FUNCTION_BUILTIN
|
|
- key: "apply"
|
|
value:
|
|
type: function
|
|
native: duk_bi_function_prototype_apply
|
|
length: 2
|
|
magic: 0
|
|
present_if: DUK_USE_FUNCTION_BUILTIN
|
|
- key: "call"
|
|
value:
|
|
type: function
|
|
native: duk_bi_function_prototype_call
|
|
length: 1
|
|
varargs: true
|
|
present_if: DUK_USE_FUNCTION_BUILTIN
|
|
- key: "bind"
|
|
value:
|
|
type: function
|
|
native: duk_bi_function_prototype_bind
|
|
length: 1
|
|
varargs: true
|
|
present_if: DUK_USE_FUNCTION_BUILTIN
|
|
|
|
- id: bi_array_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
varargs: true
|
|
native: duk_bi_array_constructor
|
|
callable: true
|
|
constructable: true
|
|
bidx: true
|
|
present_if: DUK_USE_ARRAY_BUILTIN
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 1
|
|
attributes: ""
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_array_prototype
|
|
attributes: ""
|
|
- key: "name"
|
|
value: "Array"
|
|
attributes: ""
|
|
- key: "isArray"
|
|
value:
|
|
type: function
|
|
native: duk_bi_array_constructor_is_array
|
|
length: 1
|
|
|
|
- id: bi_array_prototype
|
|
class: Array
|
|
internal_prototype: bi_object_prototype
|
|
bidx: true
|
|
# Present even when DUK_USE_ARRAY_BUILTIN disabled.
|
|
|
|
# An array prototype is an Array itself. It has a length property initialized to 0,
|
|
# with property attributes: writable, non-configurable, non-enumerable. The attributes
|
|
# are not specified very explicitly for the prototype, but are given for Array instances
|
|
# in E5 Section 15.4.5.2 (and this matches the behavior of e.g. V8).
|
|
|
|
properties:
|
|
# With duk_harray added to the internal representation, .length is now virtual.
|
|
#- key: "length"
|
|
# value: 0
|
|
# attributes: "w"
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_array_constructor
|
|
attributes: "wc"
|
|
present_if: DUK_USE_ARRAY_BUILTIN
|
|
- key: "toString"
|
|
value:
|
|
type: function
|
|
native: duk_bi_array_prototype_to_string
|
|
length: 0
|
|
present_if: DUK_USE_ARRAY_BUILTIN
|
|
- key: "toLocaleString"
|
|
value:
|
|
type: function
|
|
native: duk_bi_array_prototype_join_shared
|
|
length: 0
|
|
magic: 1 # magic: to_locale_string, here 1
|
|
present_if: DUK_USE_ARRAY_BUILTIN
|
|
- key: "concat"
|
|
value:
|
|
type: function
|
|
native: duk_bi_array_prototype_concat
|
|
length: 1
|
|
varargs: true
|
|
present_if: DUK_USE_ARRAY_BUILTIN
|
|
- key: "join"
|
|
value:
|
|
type: function
|
|
native: duk_bi_array_prototype_join_shared
|
|
length: 1
|
|
magic: 0 # magic: to_locale_string, here 0
|
|
present_if: DUK_USE_ARRAY_BUILTIN
|
|
- key: "pop"
|
|
value:
|
|
type: function
|
|
native: duk_bi_array_prototype_pop
|
|
length: 0
|
|
present_if: DUK_USE_ARRAY_BUILTIN
|
|
- key: "push"
|
|
value:
|
|
type: function
|
|
native: duk_bi_array_prototype_push
|
|
length: 1
|
|
varargs: true
|
|
present_if: DUK_USE_ARRAY_BUILTIN
|
|
- key: "reverse"
|
|
value:
|
|
type: function
|
|
native: duk_bi_array_prototype_reverse
|
|
length: 0
|
|
present_if: DUK_USE_ARRAY_BUILTIN
|
|
- key: "shift"
|
|
value:
|
|
type: function
|
|
native: duk_bi_array_prototype_shift
|
|
length: 0
|
|
present_if: DUK_USE_ARRAY_BUILTIN
|
|
- key: "slice"
|
|
value:
|
|
type: function
|
|
native: duk_bi_array_prototype_slice
|
|
length: 2
|
|
present_if: DUK_USE_ARRAY_BUILTIN
|
|
- key: "sort"
|
|
value:
|
|
type: function
|
|
native: duk_bi_array_prototype_sort
|
|
length: 1
|
|
present_if: DUK_USE_ARRAY_BUILTIN
|
|
- key: "splice"
|
|
value:
|
|
type: function
|
|
native: duk_bi_array_prototype_splice
|
|
length: 2
|
|
varargs: true
|
|
present_if: DUK_USE_ARRAY_BUILTIN
|
|
- key: "unshift"
|
|
value:
|
|
type: function
|
|
native: duk_bi_array_prototype_unshift
|
|
length: 1
|
|
varargs: true
|
|
present_if: DUK_USE_ARRAY_BUILTIN
|
|
- key: "indexOf"
|
|
value:
|
|
type: function
|
|
native: duk_bi_array_prototype_indexof_shared
|
|
length: 1
|
|
varargs: true
|
|
magic: 1 # magic: idx_step = +1
|
|
present_if: DUK_USE_ARRAY_BUILTIN
|
|
- key: "lastIndexOf"
|
|
value:
|
|
type: function
|
|
native: duk_bi_array_prototype_indexof_shared
|
|
length: 1
|
|
varargs: true
|
|
magic: -1 # magic: idx_step = -1
|
|
present_if: DUK_USE_ARRAY_BUILTIN
|
|
- key: "every"
|
|
value:
|
|
type: function
|
|
native: duk_bi_array_prototype_iter_shared
|
|
length: 1
|
|
nargs: 2
|
|
magic:
|
|
type: array_iter
|
|
funcname: "every" # BI_ARRAY_ITER_EVERY
|
|
present_if: DUK_USE_ARRAY_BUILTIN
|
|
- key: "some"
|
|
value:
|
|
type: function
|
|
native: duk_bi_array_prototype_iter_shared
|
|
length: 1
|
|
nargs: 2
|
|
magic:
|
|
type: array_iter
|
|
funcname: "some" # BI_ARRAY_ITER_SOME
|
|
present_if: DUK_USE_ARRAY_BUILTIN
|
|
- key: "forEach"
|
|
value:
|
|
type: function
|
|
native: duk_bi_array_prototype_iter_shared
|
|
length: 1
|
|
nargs: 2
|
|
magic:
|
|
type: array_iter
|
|
funcname: "forEach" # BI_ARRAY_ITER_FOREACH
|
|
present_if: DUK_USE_ARRAY_BUILTIN
|
|
- key: "map"
|
|
value:
|
|
type: function
|
|
native: duk_bi_array_prototype_iter_shared
|
|
length: 1
|
|
nargs: 2
|
|
magic:
|
|
type: array_iter
|
|
funcname: "map" # BI_ARRAY_ITER_MAP
|
|
present_if: DUK_USE_ARRAY_BUILTIN
|
|
- key: "filter"
|
|
value:
|
|
type: function
|
|
native: duk_bi_array_prototype_iter_shared
|
|
length: 1
|
|
nargs: 2
|
|
magic:
|
|
type: array_iter
|
|
funcname: filter # BI_ARRAY_ITER_FILTER
|
|
present_if: DUK_USE_ARRAY_BUILTIN
|
|
- key: "reduce"
|
|
value:
|
|
type: function
|
|
native: duk_bi_array_prototype_reduce_shared
|
|
length: 1
|
|
varargs: true
|
|
magic: 1 # magic: idx_step = +1
|
|
present_if: DUK_USE_ARRAY_BUILTIN
|
|
- key: "reduceRight"
|
|
value:
|
|
type: function
|
|
native: duk_bi_array_prototype_reduce_shared
|
|
length: 1
|
|
varargs: true
|
|
magic: -1 # magic: idx_step = -1
|
|
present_if: DUK_USE_ARRAY_BUILTIN
|
|
|
|
- id: bi_string_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
varargs: true
|
|
native: duk_bi_string_constructor
|
|
callable: true
|
|
constructable: true
|
|
bidx: true
|
|
present_if: DUK_USE_STRING_BUILTIN
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 1
|
|
attributes: ""
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_string_prototype
|
|
attributes: ""
|
|
- key: "name"
|
|
value: "String"
|
|
attributes: ""
|
|
|
|
- key: "fromCharCode"
|
|
value:
|
|
type: function
|
|
native: duk_bi_string_constructor_from_char_code
|
|
length: 1
|
|
varargs: true
|
|
- key: "fromCodePoint"
|
|
value:
|
|
type: function
|
|
native: duk_bi_string_constructor_from_code_point
|
|
length: 1
|
|
varargs: true
|
|
present_if: DUK_USE_ES6
|
|
|
|
- id: bi_string_prototype
|
|
class: String
|
|
internal_prototype: bi_object_prototype
|
|
bidx: true
|
|
# Present even when DUK_USE_STRING_BUILTIN disabled.
|
|
|
|
# String prototype is a String instance and must have length value 0.
|
|
# This is supplied by the String instance virtual properties and does
|
|
# not need to be included in init data.
|
|
#
|
|
# Unlike Array.prototype.length, String.prototype.length has the default
|
|
# "length" attributes of built-in objects: non-writable, non-enumerable,
|
|
# non-configurable.
|
|
|
|
#length: 0, # omitted; non-writable, non-enumerable, non-configurable
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_string_constructor
|
|
attributes: "wc"
|
|
present_if: DUK_USE_STRING_BUILTIN
|
|
|
|
# Internal empty string value. Note that this value is not writable
|
|
# which prevents a String instance's internal value also from being
|
|
# written with standard methods. The internal code creating String
|
|
# instances has no such issues.
|
|
- key: "\u00ffValue"
|
|
value: ""
|
|
attributes: ""
|
|
duktape: true
|
|
|
|
- key: "toString"
|
|
value:
|
|
type: function
|
|
native: duk_bi_string_prototype_to_string
|
|
length: 0
|
|
present_if: DUK_USE_STRING_BUILTIN
|
|
- key: "valueOf"
|
|
value:
|
|
type: function
|
|
native: duk_bi_string_prototype_to_string # share native function, behavior is identical
|
|
length: 0
|
|
present_if: DUK_USE_STRING_BUILTIN
|
|
- key: "charAt"
|
|
value:
|
|
type: function
|
|
native: duk_bi_string_prototype_char_at
|
|
length: 1
|
|
present_if: DUK_USE_STRING_BUILTIN
|
|
- key: "charCodeAt"
|
|
value:
|
|
type: function
|
|
native: duk_bi_string_prototype_char_code_at
|
|
length: 1
|
|
magic: 0
|
|
present_if: DUK_USE_STRING_BUILTIN
|
|
- key: "codePointAt"
|
|
value:
|
|
type: function
|
|
native: duk_bi_string_prototype_char_code_at
|
|
length: 1
|
|
magic: 1
|
|
es6: true
|
|
present_if:
|
|
- DUK_USE_ES6
|
|
- DUK_USE_STRING_BUILTIN
|
|
- key: "concat"
|
|
value:
|
|
type: function
|
|
native: duk_bi_string_prototype_concat
|
|
length: 1
|
|
varargs: true
|
|
present_if: DUK_USE_STRING_BUILTIN
|
|
- key: "indexOf"
|
|
value:
|
|
type: function
|
|
native: duk_bi_string_prototype_indexof_shared
|
|
length: 1
|
|
nargs: 2
|
|
magic: 0 # magic = 0 -> indexOf
|
|
present_if: DUK_USE_STRING_BUILTIN
|
|
- key: "lastIndexOf"
|
|
value:
|
|
type: function
|
|
native: duk_bi_string_prototype_indexof_shared
|
|
length: 1
|
|
nargs: 2
|
|
magic: 1 # magic = 1 -> lastIndexOf
|
|
present_if: DUK_USE_STRING_BUILTIN
|
|
- key: "localeCompare"
|
|
value:
|
|
type: function
|
|
native: duk_bi_string_prototype_locale_compare
|
|
length: 1
|
|
present_if: DUK_USE_STRING_BUILTIN
|
|
- key: "match"
|
|
value:
|
|
type: function
|
|
native: duk_bi_string_prototype_match
|
|
length: 1
|
|
present_if:
|
|
- DUK_USE_STRING_BUILTIN
|
|
- DUK_USE_REGEXP_SUPPORT
|
|
- key: "replace"
|
|
value:
|
|
type: function
|
|
native: duk_bi_string_prototype_replace
|
|
length: 2
|
|
present_if: DUK_USE_STRING_BUILTIN
|
|
- key: "search"
|
|
value:
|
|
type: function
|
|
native: duk_bi_string_prototype_search
|
|
length: 1
|
|
present_if:
|
|
- DUK_USE_STRING_BUILTIN
|
|
- DUK_USE_REGEXP_SUPPORT
|
|
- key: "slice"
|
|
value:
|
|
type: function
|
|
native: duk_bi_string_prototype_slice
|
|
length: 2
|
|
present_if: DUK_USE_STRING_BUILTIN
|
|
- key: "split"
|
|
value:
|
|
type: function
|
|
native: duk_bi_string_prototype_split
|
|
length: 2
|
|
present_if: DUK_USE_STRING_BUILTIN
|
|
- key: "substring"
|
|
value:
|
|
type: function
|
|
native: duk_bi_string_prototype_substring
|
|
length: 2
|
|
present_if: DUK_USE_STRING_BUILTIN
|
|
- key: "toLowerCase"
|
|
value:
|
|
type: function
|
|
native: duk_bi_string_prototype_caseconv_shared
|
|
length: 0
|
|
magic: 0 # magic = uppercase
|
|
present_if: DUK_USE_STRING_BUILTIN
|
|
- key: "toLocaleLowerCase"
|
|
value:
|
|
type: function
|
|
native: duk_bi_string_prototype_caseconv_shared
|
|
length: 0
|
|
magic: 0 # magic = uppercase; no locale specific conversion now
|
|
present_if: DUK_USE_STRING_BUILTIN
|
|
- key: "toUpperCase"
|
|
value:
|
|
type: function
|
|
native: duk_bi_string_prototype_caseconv_shared
|
|
length: 0
|
|
magic: 1 # magic = uppercase
|
|
present_if: DUK_USE_STRING_BUILTIN
|
|
- key: "toLocaleUpperCase"
|
|
value:
|
|
type: function
|
|
native: duk_bi_string_prototype_caseconv_shared
|
|
length: 0
|
|
magic: 1 # magic = uppercase; no locale specific conversion now
|
|
present_if: DUK_USE_STRING_BUILTIN
|
|
- key: "trim"
|
|
value:
|
|
type: function
|
|
native: duk_bi_string_prototype_trim
|
|
length: 0
|
|
present_if: DUK_USE_STRING_BUILTIN
|
|
- key: "repeat"
|
|
value:
|
|
type: function
|
|
native: duk_bi_string_prototype_repeat
|
|
length: 1
|
|
nargs: 1
|
|
present_if:
|
|
- DUK_USE_ES6
|
|
- DUK_USE_STRING_BUILTIN
|
|
|
|
# Non-standard extension: E5 Section B.2.3
|
|
|
|
- key: "substr"
|
|
value:
|
|
type: function
|
|
native: duk_bi_string_prototype_substr
|
|
length: 2
|
|
section_b: true
|
|
present_if:
|
|
- DUK_USE_STRING_BUILTIN
|
|
- DUK_USE_SECTION_B
|
|
|
|
- id: bi_boolean_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
native: duk_bi_boolean_constructor
|
|
callable: true
|
|
constructable: true
|
|
bidx: true
|
|
present_if: DUK_USE_BOOLEAN_BUILTIN
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 1
|
|
attributes: ""
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_boolean_prototype
|
|
attributes: ""
|
|
- key: "name"
|
|
value: "Boolean"
|
|
attributes: ""
|
|
|
|
- id: bi_boolean_prototype
|
|
class: Boolean
|
|
internal_prototype: bi_object_prototype
|
|
bidx: true
|
|
# Present even when DUK_USE_BOOLEAN_BUILTIN disabled.
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_boolean_constructor
|
|
attributes: "wc"
|
|
present_if: DUK_USE_BOOLEAN_BUILTIN
|
|
|
|
# Internal false boolean value. Note that this value is not writable
|
|
# which prevents a Boolean instance's internal value also from being
|
|
# written with standard methods. The internal code creating Boolean
|
|
# instances has no such issues.
|
|
- key: "\u00ffValue"
|
|
value: false
|
|
attributes: ""
|
|
duktape: true
|
|
|
|
- key: "toString"
|
|
value:
|
|
type: function
|
|
native: duk_bi_boolean_prototype_tostring_shared
|
|
length: 0
|
|
magic: 1 # magic = coerce_tostring
|
|
present_if: DUK_USE_BOOLEAN_BUILTIN
|
|
- key: "valueOf"
|
|
value:
|
|
type: function
|
|
native: duk_bi_boolean_prototype_tostring_shared
|
|
length: 0
|
|
magic: 0 # magic = coerce_tostring
|
|
present_if: DUK_USE_BOOLEAN_BUILTIN
|
|
|
|
- id: bi_number_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
varargs: true
|
|
native: duk_bi_number_constructor
|
|
callable: true
|
|
constructable: true
|
|
bidx: true
|
|
present_if: DUK_USE_NUMBER_BUILTIN
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 1
|
|
attributes: ""
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_number_prototype
|
|
attributes: ""
|
|
- key: "name"
|
|
value: "Number"
|
|
attributes: ""
|
|
- key: "MAX_VALUE"
|
|
value:
|
|
type: double
|
|
bytes: "7fefffffffffffff" # DBL_MAX_DOUBLE
|
|
attributes: ""
|
|
- key: "MIN_VALUE"
|
|
value:
|
|
type: double
|
|
bytes: "0000000000000001" # DBL_MIN_DOUBLE
|
|
attributes: ""
|
|
- key: "NaN"
|
|
value:
|
|
type: double
|
|
bytes: "7ff8000000000000" # DBL_NAN
|
|
attributes: ""
|
|
- key: "POSITIVE_INFINITY"
|
|
value:
|
|
type: double
|
|
bytes: "7ff0000000000000" # DBL_POSITIVE_INFINITY
|
|
attributes: ""
|
|
- key: "NEGATIVE_INFINITY"
|
|
value:
|
|
type: double
|
|
bytes: "fff0000000000000" # DBL_NEGATIVE_INFINITY
|
|
attributes: ""
|
|
|
|
- id: bi_number_prototype
|
|
class: Number
|
|
internal_prototype: bi_object_prototype
|
|
bidx: true
|
|
# Present even when DUK_USE_NUMBER_BUILTIN disabled.
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_number_constructor
|
|
attributes: "wc"
|
|
present_if: DUK_USE_NUMBER_BUILTIN
|
|
|
|
# Internal 0.0 number value. Note that this value is not writable
|
|
# which prevents a Number instance's internal value also from being
|
|
# written with standard methods. The internal code creating Number
|
|
# instances has no such issues.
|
|
- key: "\u00ffValue"
|
|
value: 0.0
|
|
attributes: ""
|
|
duktape: true
|
|
|
|
- key: "toString"
|
|
value:
|
|
type: function
|
|
native: duk_bi_number_prototype_to_string
|
|
length: 1
|
|
present_if: DUK_USE_NUMBER_BUILTIN
|
|
- key: "toLocaleString"
|
|
value:
|
|
type: function
|
|
native: duk_bi_number_prototype_to_locale_string
|
|
length: 1
|
|
present_if: DUK_USE_NUMBER_BUILTIN
|
|
- key: "valueOf"
|
|
value:
|
|
type: function
|
|
native: duk_bi_number_prototype_value_of
|
|
length: 0
|
|
present_if: DUK_USE_NUMBER_BUILTIN
|
|
- key: "toFixed"
|
|
value:
|
|
type: function
|
|
native: duk_bi_number_prototype_to_fixed
|
|
length: 1
|
|
present_if: DUK_USE_NUMBER_BUILTIN
|
|
- key: "toExponential"
|
|
value:
|
|
type: function
|
|
native: duk_bi_number_prototype_to_exponential
|
|
length: 1
|
|
present_if: DUK_USE_NUMBER_BUILTIN
|
|
- key: "toPrecision"
|
|
value:
|
|
type: function
|
|
native: duk_bi_number_prototype_to_precision
|
|
length: 1
|
|
present_if: DUK_USE_NUMBER_BUILTIN
|
|
|
|
- id: bi_date_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
varargs: true
|
|
native: duk_bi_date_constructor
|
|
callable: true
|
|
constructable: true
|
|
bidx: true
|
|
present_if: DUK_USE_DATE_BUILTIN
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 7
|
|
attributes: ""
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_date_prototype
|
|
attributes: ""
|
|
- key: "name"
|
|
value: "Date"
|
|
attributes: ""
|
|
|
|
- key: "parse"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_constructor_parse
|
|
length: 1
|
|
- key: "UTC"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_constructor_utc
|
|
length: 7
|
|
varargs: true
|
|
- key: "now"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_constructor_now
|
|
length: 0
|
|
|
|
- id: bi_date_prototype
|
|
class: Date
|
|
internal_prototype: bi_object_prototype
|
|
bidx: true
|
|
present_if: DUK_USE_DATE_BUILTIN
|
|
|
|
# The Date prototype is an instance of Date with [[PrimitiveValue]] NaN.
|
|
#
|
|
# Setters with optional arguments must be varargs functions because
|
|
# they must detect the number of parameters actually given (cannot
|
|
# assume parameters not given are undefined).
|
|
#
|
|
# Date.prototype.valueOf() and Date.prototype.getTime() have identical
|
|
# behavior so they share the same C function, but have different
|
|
# function instances.
|
|
#
|
|
# Getters, setters, and string conversion functions use shared native
|
|
# helpers and the function "magic" value is used to pass flags and
|
|
# parameters to the helpers.
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_date_constructor
|
|
attributes: "wc"
|
|
|
|
# Internal date value (E5 Section 15.9.5).
|
|
#
|
|
# Note: the value is writable, as you can e.g. do the following (V8):
|
|
# > Date.prototype.toString()
|
|
# "Invalid Date"
|
|
# > Date.prototype.setYear(2010)
|
|
# 1262296800000
|
|
# > Date.prototype.toString()
|
|
# "Fri Jan 01 2010 00:00:00 GMT+0200 (EET)"
|
|
|
|
- key: "\u00ffValue"
|
|
value:
|
|
type: double
|
|
bytes: "7ff8000000000000" # DBL_NAN
|
|
attributes: "w"
|
|
duktape: true
|
|
|
|
# NOTE: The magic values for Date prototype are special. The actual control
|
|
# flags needed for the built-ins don't fit into LIGHTFUNC magic field, so
|
|
# the values here are indices to duk__date_magics[] in duk_bi_date.c which
|
|
# contains the actual control flags. Magic values here must be kept in strict
|
|
# sync with duk_bi_date.c!
|
|
|
|
- key: "toString"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_tostring_shared
|
|
length: 0
|
|
magic: 0
|
|
- key: "toDateString"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_tostring_shared
|
|
length: 0
|
|
magic: 1
|
|
- key: "toTimeString"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_tostring_shared
|
|
length: 0
|
|
magic: 2
|
|
- key: "toLocaleString"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_tostring_shared
|
|
length: 0
|
|
magic: 3
|
|
- key: "toLocaleDateString"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_tostring_shared
|
|
length: 0
|
|
magic: 4
|
|
- key: "toLocaleTimeString"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_tostring_shared
|
|
length: 0
|
|
magic: 5
|
|
- key: "toUTCString"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_tostring_shared
|
|
length: 0
|
|
magic: 6
|
|
- key: "toISOString"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_tostring_shared
|
|
length: 0
|
|
magic: 7
|
|
- key: "toJSON"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_to_json
|
|
length: 1
|
|
- key: "valueOf"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_value_of
|
|
length: 0
|
|
- key: "getTime"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_value_of # Native function shared on purpose
|
|
length: 0
|
|
- key: "getFullYear"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_get_shared
|
|
length: 0
|
|
magic: 8
|
|
- key: "getUTCFullYear"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_get_shared
|
|
length: 0
|
|
magic: 9
|
|
- key: "getMonth"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_get_shared
|
|
length: 0
|
|
magic: 10
|
|
- key: "getUTCMonth"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_get_shared
|
|
length: 0
|
|
magic: 11
|
|
- key: "getDate"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_get_shared
|
|
length: 0
|
|
magic: 12
|
|
- key: "getUTCDate"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_get_shared
|
|
length: 0
|
|
magic: 13
|
|
- key: "getDay"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_get_shared
|
|
length: 0
|
|
magic: 14
|
|
- key: "getUTCDay"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_get_shared
|
|
length: 0
|
|
magic: 15
|
|
- key: "getHours"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_get_shared
|
|
length: 0
|
|
magic: 16
|
|
- key: "getUTCHours"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_get_shared
|
|
length: 0
|
|
magic: 17
|
|
- key: "getMinutes"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_get_shared
|
|
length: 0
|
|
magic: 18
|
|
- key: "getUTCMinutes"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_get_shared
|
|
length: 0
|
|
magic: 19
|
|
- key: "getSeconds"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_get_shared
|
|
length: 0
|
|
magic: 20
|
|
- key: "getUTCSeconds"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_get_shared
|
|
length: 0
|
|
magic: 21
|
|
- key: "getMilliseconds"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_get_shared
|
|
length: 0
|
|
magic: 22
|
|
- key: "getUTCMilliseconds"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_get_shared
|
|
length: 0
|
|
magic: 23
|
|
- key: "getTimezoneOffset"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_get_timezone_offset
|
|
length: 0
|
|
- key: "setTime"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_set_time
|
|
length: 1
|
|
- key: "setMilliseconds"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_set_shared
|
|
length: 1
|
|
magic: 24
|
|
- key: "setUTCMilliseconds"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_set_shared
|
|
length: 1
|
|
magic: 25
|
|
- key: "setSeconds"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_set_shared
|
|
length: 2
|
|
varargs: true
|
|
magic: 26
|
|
- key: "setUTCSeconds"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_set_shared
|
|
length: 2
|
|
varargs: true
|
|
magic: 27
|
|
- key: "setMinutes"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_set_shared
|
|
length: 3
|
|
varargs: true
|
|
magic: 28
|
|
- key: "setUTCMinutes"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_set_shared
|
|
length: 3
|
|
varargs: true
|
|
magic: 29
|
|
- key: "setHours"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_set_shared
|
|
length: 4
|
|
varargs: true
|
|
magic: 30
|
|
- key: "setUTCHours"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_set_shared
|
|
length: 4
|
|
varargs: true
|
|
magic: 31
|
|
- key: "setDate"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_set_shared
|
|
length: 1
|
|
magic: 32
|
|
- key: "setUTCDate"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_set_shared
|
|
length: 1
|
|
magic: 33
|
|
- key: "setMonth"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_set_shared
|
|
length: 2
|
|
varargs: true
|
|
magic: 34
|
|
- key: "setUTCMonth"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_set_shared
|
|
length: 2
|
|
varargs: true
|
|
magic: 35
|
|
- key: "setFullYear"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_set_shared
|
|
length: 3
|
|
varargs: true
|
|
magic: 36
|
|
- key: "setUTCFullYear"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_set_shared
|
|
length: 3
|
|
varargs: true
|
|
magic: 37
|
|
# Note: toGMTString() is required to initially be the same Function
|
|
# object as the initial Date.prototype.toUTCString. In other words
|
|
# the following must compare true:
|
|
#
|
|
# Date.prototype.toGMTString === Date.prototype.toUTCString.
|
|
#
|
|
# This is currently handled using a small tweak in duk_hthread_builtins.c
|
|
# (for RAM objects) and genbuiltins.py (for ROM objects).
|
|
#
|
|
# Note that while Smjs respects the requirement in E5 Section B.2.6,
|
|
# V8 does not.
|
|
- key: "toGMTString"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_tostring_shared
|
|
length: 0
|
|
magic: 6
|
|
section_b: true
|
|
|
|
# Non-standard extensions: E5 Section B.2.4, B.2.5, B.2.6
|
|
#
|
|
# "length" values are not given explicitly but follows the general rule.
|
|
# The lengths below agree with V8.
|
|
|
|
- key: "getYear"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_get_shared
|
|
length: 0
|
|
magic: 38
|
|
section_b: true
|
|
- key: "setYear"
|
|
value:
|
|
type: function
|
|
native: duk_bi_date_prototype_set_shared
|
|
length: 1
|
|
magic: 39
|
|
section_b: true
|
|
|
|
- id: bi_regexp_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
native: duk_bi_regexp_constructor
|
|
callable: true
|
|
constructable: true
|
|
bidx: true
|
|
present_if: DUK_USE_REGEXP_SUPPORT
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 2
|
|
attributes: ""
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_regexp_prototype
|
|
attributes: ""
|
|
- key: "name"
|
|
value: "RegExp"
|
|
attributes: ""
|
|
|
|
- id: bi_regexp_prototype
|
|
class: RegExp
|
|
internal_prototype: bi_object_prototype
|
|
bidx: true
|
|
present_if: DUK_USE_REGEXP_SUPPORT
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_regexp_constructor
|
|
attributes: "wc"
|
|
|
|
# RegExp internal value should match that of new RegExp() (E5 Sections 15.10.6
|
|
# and 15.10.7), i.e. a bytecode sequence that matches an empty string.
|
|
# The compiled regexp bytecode for that is embedded here, and must match the
|
|
# defines in duk_regexp.h. The bytecode must provide the 0'th capture.
|
|
#
|
|
# Note that the property attributes are non-default.
|
|
|
|
# Compiled bytecode, must match duk_regexp.h. Bytecode contains:
|
|
# 0=flags; 2=nsaved; 11,0=DUK_REOP_SAVE 0; 11,1=DUK_REOP_SAVE 1; 1=DUK_REOP_MATCH
|
|
- key: "\u00ffBytecode"
|
|
value: "\u0000\u0002\u000b\u0000\u000b\u0001\u0001"
|
|
attributes: ""
|
|
duktape: true
|
|
|
|
# An object created as new RegExp("") should have the escaped source
|
|
# "(?:)" (E5 Section 15.10.4.1). However, at least V8 and Smjs seem
|
|
# to have an empty string here.
|
|
- key: "source"
|
|
value: "(?:)"
|
|
attributes: ""
|
|
|
|
- key: "global"
|
|
value: false
|
|
attributes: ""
|
|
- key: "ignoreCase"
|
|
value: false
|
|
attributes: ""
|
|
- key: "multiline"
|
|
value: false
|
|
attributes: ""
|
|
|
|
# "lastIndex" is writable, even in the RegExp.prototype object.
|
|
# This matches at least V8.
|
|
- key: "lastIndex"
|
|
value: 0
|
|
attributes: "w"
|
|
|
|
- key: "exec"
|
|
value:
|
|
type: function
|
|
native: duk_bi_regexp_prototype_exec
|
|
length: 1
|
|
- key: "test"
|
|
value:
|
|
type: function
|
|
native: duk_bi_regexp_prototype_test
|
|
length: 1
|
|
- key: "toString"
|
|
value:
|
|
type: function
|
|
native: duk_bi_regexp_prototype_to_string
|
|
length: 0
|
|
|
|
- id: bi_error_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
native: duk_bi_error_constructor_shared
|
|
callable: true
|
|
constructable: true
|
|
magic:
|
|
type: bidx
|
|
id: bi_error_prototype
|
|
bidx: true
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 1
|
|
attributes: ""
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_error_prototype
|
|
attributes: ""
|
|
- key: "name"
|
|
value: "Error"
|
|
attributes: ""
|
|
|
|
- id: bi_error_prototype
|
|
class: Error
|
|
internal_prototype: bi_object_prototype
|
|
bidx: true
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_error_constructor
|
|
attributes: "wc"
|
|
|
|
# Standard properties; property attributes:
|
|
#
|
|
# "message" is writable and deletable. This matches the default
|
|
# attributes of "wc". V8 and Smjs both match this.
|
|
#
|
|
# "name" is writable and deletable. This matches the default
|
|
# attributes too. Smjs behaves like this, but in V8 "name" is
|
|
# non-writable:
|
|
#
|
|
# > Object.getOwnPropertyDescriptor(Error.prototype, "name")
|
|
# { value: "Error",
|
|
# writable: false,
|
|
# enumerable: false,
|
|
# configurable: false }
|
|
#
|
|
# We go with the standard attributes ("wc").
|
|
|
|
- key: "name"
|
|
value: "Error"
|
|
- key: "message"
|
|
value: ""
|
|
|
|
# Custom properties
|
|
|
|
- key: "stack"
|
|
value:
|
|
type: accessor
|
|
getter: duk_bi_error_prototype_stack_getter
|
|
setter: duk_bi_error_prototype_stack_setter
|
|
getter_nargs: 0
|
|
setter_nargs: 1
|
|
getter_magic: 0
|
|
setter_magic: 0
|
|
attributes: "c"
|
|
duktape: true
|
|
- key: "fileName"
|
|
value:
|
|
type: accessor
|
|
getter: duk_bi_error_prototype_filename_getter
|
|
setter: duk_bi_error_prototype_filename_setter
|
|
getter_nargs: 0
|
|
setter_nargs: 1
|
|
getter_magic: 0
|
|
setter_magic: 0
|
|
attributes: "c"
|
|
duktape: true
|
|
- key: "lineNumber"
|
|
value:
|
|
type: accessor
|
|
getter: duk_bi_error_prototype_linenumber_getter
|
|
setter: duk_bi_error_prototype_linenumber_setter
|
|
getter_nargs: 0
|
|
setter_nargs: 1
|
|
getter_magic: 0
|
|
setter_magic: 0
|
|
attributes: "c"
|
|
duktape: true
|
|
|
|
- key: "toString"
|
|
value:
|
|
type: function
|
|
native: duk_bi_error_prototype_to_string
|
|
length: 0
|
|
|
|
# NOTE: Error subclass prototypes have an empty "message" property, even
|
|
# though one is inherited already from Error prototype (E5 Section 15.11.7.10).
|
|
#
|
|
# V8 does not respect this: Error subclasses ("native Errors" in E5 spec)
|
|
# do not have a "message" property at all. Also, in V8 their "name" property
|
|
# is not writable and configurable as E5 requires.
|
|
|
|
- id: bi_eval_error_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
native: duk_bi_error_constructor_shared
|
|
callable: true
|
|
constructable: true
|
|
magic:
|
|
type: bidx
|
|
id: bi_eval_error_prototype
|
|
bidx: true
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 1
|
|
attributes: ""
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_eval_error_prototype
|
|
attributes: ""
|
|
- key: "name"
|
|
value: "EvalError"
|
|
attributes: ""
|
|
|
|
- id: bi_eval_error_prototype
|
|
class: Error
|
|
internal_prototype: bi_error_prototype
|
|
bidx: true
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_eval_error_constructor
|
|
attributes: "wc"
|
|
- key: "name"
|
|
value: "EvalError"
|
|
- key: "message"
|
|
value: ""
|
|
|
|
- id: bi_range_error_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
native: duk_bi_error_constructor_shared
|
|
callable: true
|
|
constructable: true
|
|
magic:
|
|
type: bidx
|
|
id: bi_range_error_prototype
|
|
bidx: true
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 1
|
|
attributes: ""
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_range_error_prototype
|
|
attributes: ""
|
|
- key: "name"
|
|
value: "RangeError"
|
|
attributes: ""
|
|
|
|
- id: bi_range_error_prototype
|
|
class: Error
|
|
internal_prototype: bi_error_prototype
|
|
bidx: true
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_range_error_constructor
|
|
attributes: "wc"
|
|
- key: "name"
|
|
value: "RangeError"
|
|
- key: "message"
|
|
value: ""
|
|
|
|
- id: bi_reference_error_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
native: duk_bi_error_constructor_shared
|
|
callable: true
|
|
constructable: true
|
|
magic:
|
|
type: bidx
|
|
id: bi_reference_error_prototype
|
|
bidx: true
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 1
|
|
attributes: ""
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_reference_error_prototype
|
|
attributes: ""
|
|
- key: "name"
|
|
value: "ReferenceError"
|
|
attributes: ""
|
|
|
|
- id: bi_reference_error_prototype
|
|
class: Error
|
|
internal_prototype: bi_error_prototype
|
|
bidx: true
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_reference_error_constructor
|
|
attributes: "wc"
|
|
- key: "name"
|
|
value: "ReferenceError"
|
|
- key: "message"
|
|
value: ""
|
|
|
|
- id: bi_syntax_error_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
native: duk_bi_error_constructor_shared
|
|
callable: true
|
|
constructable: true
|
|
magic:
|
|
type: bidx
|
|
id: bi_syntax_error_prototype
|
|
bidx: true
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 1
|
|
attributes: ""
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_syntax_error_prototype
|
|
attributes: ""
|
|
- key: "name"
|
|
value: "SyntaxError"
|
|
attributes: ""
|
|
|
|
- id: bi_syntax_error_prototype
|
|
class: Error
|
|
internal_prototype: bi_error_prototype
|
|
bidx: true
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_syntax_error_constructor
|
|
attributes: "wc"
|
|
- key: "name"
|
|
value: "SyntaxError"
|
|
- key: "message"
|
|
value: ""
|
|
|
|
- id: bi_type_error_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
native: duk_bi_error_constructor_shared
|
|
callable: true
|
|
constructable: true
|
|
magic:
|
|
type: bidx
|
|
id: bi_type_error_prototype
|
|
bidx: true
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 1
|
|
attributes: ""
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_type_error_prototype
|
|
attributes: ""
|
|
- key: "name"
|
|
value: "TypeError"
|
|
attributes: ""
|
|
|
|
- id: bi_type_error_prototype
|
|
class: Error
|
|
internal_prototype: bi_error_prototype
|
|
bidx: true
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_type_error_constructor
|
|
attributes: "wc"
|
|
- key: "name"
|
|
value: "TypeError"
|
|
- key: "message"
|
|
value: ""
|
|
|
|
- id: bi_uri_error_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
native: duk_bi_error_constructor_shared
|
|
callable: true
|
|
constructable: true
|
|
magic:
|
|
type: bidx
|
|
id: bi_uri_error_prototype
|
|
bidx: true
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 1
|
|
attributes: ""
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_uri_error_prototype
|
|
attributes: ""
|
|
- key: "name"
|
|
value: "URIError"
|
|
attributes: ""
|
|
|
|
- id: bi_uri_error_prototype
|
|
class: Error
|
|
internal_prototype: bi_error_prototype
|
|
bidx: true
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_uri_error_constructor
|
|
attributes: "wc"
|
|
- key: "name"
|
|
value: "URIError"
|
|
- key: "message"
|
|
value: ""
|
|
|
|
- id: bi_math
|
|
class: Math
|
|
internal_prototype: bi_object_prototype
|
|
bidx: true
|
|
present_if: DUK_USE_MATH_BUILTIN
|
|
|
|
# apparently no external "prototype" property
|
|
# apparently no external "constructor" property
|
|
|
|
properties:
|
|
- key: "E"
|
|
value:
|
|
type: double
|
|
bytes: "4005bf0a8b145769" # DBL_E
|
|
attributes: ""
|
|
- key: "LN10"
|
|
value:
|
|
type: double
|
|
bytes: "40026bb1bbb55516" # DBL_LN10
|
|
attributes: ""
|
|
- key: "LN2"
|
|
value:
|
|
type: double
|
|
bytes: "3fe62e42fefa39ef" # DBL_LN2
|
|
attributes: ""
|
|
- key: "LOG2E"
|
|
value:
|
|
type: double
|
|
bytes: "3ff71547652b82fe" # DBL_LOG2E
|
|
attributes: ""
|
|
- key: "LOG10E"
|
|
value:
|
|
type: double
|
|
bytes: "3fdbcb7b1526e50e" # DBL_LOG10E
|
|
attributes: ""
|
|
- key: "PI"
|
|
value:
|
|
type: double
|
|
bytes: "400921fb54442d18" # DBL_PI
|
|
attributes: ""
|
|
- key: "SQRT1_2"
|
|
value:
|
|
type: double
|
|
bytes: "3fe6a09e667f3bcd" # DBL_SQRT1_2
|
|
attributes: ""
|
|
- key: "SQRT2"
|
|
value:
|
|
type: double
|
|
bytes: "3ff6a09e667f3bcd" # DBL_SQRT2
|
|
attributes: ""
|
|
|
|
- key: "abs"
|
|
value:
|
|
type: function
|
|
native: duk_bi_math_object_onearg_shared
|
|
length: 1
|
|
magic:
|
|
type: math_onearg
|
|
funcname: "fabs" # BI_MATH_FABS_IDX
|
|
- key: "acos"
|
|
value:
|
|
type: function
|
|
native: duk_bi_math_object_onearg_shared
|
|
length: 1
|
|
magic:
|
|
type: math_onearg
|
|
funcname: "acos" # BI_MATH_ACOS_IDX
|
|
- key: "asin"
|
|
value:
|
|
type: function
|
|
native: duk_bi_math_object_onearg_shared
|
|
length: 1
|
|
magic:
|
|
type: math_onearg
|
|
funcname: "asin" # BI_MATH_ASIN_IDX
|
|
- key: "atan"
|
|
value:
|
|
type: function
|
|
native: duk_bi_math_object_onearg_shared
|
|
length: 1
|
|
magic:
|
|
type: math_onearg
|
|
funcname: "atan" # BI_MATH_ATAN_IDX
|
|
- key: "atan2"
|
|
value:
|
|
type: function
|
|
native: duk_bi_math_object_twoarg_shared
|
|
length: 2
|
|
magic:
|
|
type: math_twoarg
|
|
funcname: "atan2" # BI_MATH_ATAN2_IDX
|
|
- key: "cbrt"
|
|
value:
|
|
type: function
|
|
native: duk_bi_math_object_onearg_shared
|
|
length: 1
|
|
magic:
|
|
type: math_onearg
|
|
funcname: "cbrt" # BI_MATH_CBRT_IDX
|
|
es6: true
|
|
present_if: DUK_USE_ES6
|
|
- key: "ceil"
|
|
value:
|
|
type: function
|
|
native: duk_bi_math_object_onearg_shared
|
|
length: 1
|
|
magic:
|
|
type: math_onearg
|
|
funcname: "ceil" # BI_MATH_CEIL_IDX
|
|
- key: "cos"
|
|
value:
|
|
type: function
|
|
native: duk_bi_math_object_onearg_shared
|
|
length: 1
|
|
magic:
|
|
type: math_onearg
|
|
funcname: "cos" # BI_MATH_COS_IDX
|
|
- key: "exp"
|
|
value:
|
|
type: function
|
|
native: duk_bi_math_object_onearg_shared
|
|
length: 1
|
|
magic:
|
|
type: math_onearg
|
|
funcname: "exp" # BI_MATH_EXP_IDX
|
|
- key: "floor"
|
|
value:
|
|
type: function
|
|
native: duk_bi_math_object_onearg_shared
|
|
length: 1
|
|
magic:
|
|
type: math_onearg
|
|
funcname: "floor" # BI_MATH_FLOOR_IDX
|
|
- key: "hypot"
|
|
value:
|
|
type: function
|
|
native: duk_bi_math_object_hypot
|
|
length: 2
|
|
varargs: true
|
|
es6: true
|
|
present_if: DUK_USE_ES6
|
|
- key: "log"
|
|
value:
|
|
type: function
|
|
native: duk_bi_math_object_onearg_shared
|
|
length: 1
|
|
magic:
|
|
type: math_onearg
|
|
funcname: "log" # BI_MATH_LOG_IDX
|
|
- key: "log2"
|
|
value:
|
|
type: function
|
|
native: duk_bi_math_object_onearg_shared
|
|
length: 1
|
|
magic:
|
|
type: math_onearg
|
|
funcname: "log2" # BI_MATH_LOG2_IDX
|
|
es6: true
|
|
present_if: DUK_USE_ES6
|
|
- key: "log10"
|
|
value:
|
|
type: function
|
|
native: duk_bi_math_object_onearg_shared
|
|
length: 1
|
|
magic:
|
|
type: math_onearg
|
|
funcname: "log10" # BI_MATH_LOG10_IDX
|
|
es6: true
|
|
present_if: DUK_USE_ES6
|
|
- key: "max"
|
|
value:
|
|
type: function
|
|
native: duk_bi_math_object_max
|
|
length: 2
|
|
varargs: true
|
|
- key: "min"
|
|
value:
|
|
type: function
|
|
native: duk_bi_math_object_min
|
|
length: 2
|
|
varargs: true
|
|
- key: "pow"
|
|
value:
|
|
type: function
|
|
native: duk_bi_math_object_twoarg_shared
|
|
length: 2
|
|
magic:
|
|
type: math_twoarg
|
|
funcname: "pow" # BI_MATH_POW_IDX
|
|
- key: "random"
|
|
value:
|
|
type: function
|
|
native: duk_bi_math_object_random
|
|
length: 0
|
|
- key: "round"
|
|
value:
|
|
type: function
|
|
native: duk_bi_math_object_onearg_shared
|
|
length: 1
|
|
magic:
|
|
type: math_onearg
|
|
funcname: "round" # BI_MATH_ROUND_IDX
|
|
- key: "sin"
|
|
value:
|
|
type: function
|
|
native: duk_bi_math_object_onearg_shared
|
|
length: 1
|
|
magic:
|
|
type: math_onearg
|
|
funcname: "sin" # BI_MATH_SIN_IDX
|
|
- key: "sqrt"
|
|
value:
|
|
type: function
|
|
native: duk_bi_math_object_onearg_shared
|
|
length: 1
|
|
magic:
|
|
type: math_onearg
|
|
funcname: "sqrt" # BI_MATH_SQRT_IDX
|
|
- key: "tan"
|
|
value:
|
|
type: function
|
|
native: duk_bi_math_object_onearg_shared
|
|
length: 1
|
|
magic:
|
|
type: math_onearg
|
|
funcname: "tan" # BI_MATH_TAN_IDX
|
|
- key: "trunc"
|
|
value:
|
|
type: function
|
|
native: duk_bi_math_object_onearg_shared
|
|
length: 1
|
|
magic:
|
|
type: math_onearg
|
|
funcname: "trunc" # BI_MATH_TRUNC_IDX
|
|
es6: true
|
|
present_if: DUK_USE_ES6
|
|
|
|
- id: bi_json
|
|
class: JSON
|
|
internal_prototype: bi_object_prototype
|
|
bidx: true
|
|
present_if:
|
|
- DUK_USE_JSON_BUILTIN
|
|
- DUK_USE_JSON_SUPPORT
|
|
|
|
# apparently no external "prototype" property
|
|
# apparently no external "constructor" property
|
|
|
|
properties:
|
|
- key: "parse"
|
|
value:
|
|
type: function
|
|
native: duk_bi_json_object_parse
|
|
length: 2
|
|
- key: "stringify"
|
|
value:
|
|
type: function
|
|
native: duk_bi_json_object_stringify
|
|
length: 3
|
|
|
|
# E5 Section 13.2.3
|
|
- id: bi_type_error_thrower
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
native: duk_bi_type_error_thrower
|
|
callable: true
|
|
constructable: false # This is not clearly specified, but [[Construct]] is not set in E5 Section 13.2.3.
|
|
bidx: true
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 0
|
|
attributes: ""
|
|
# custom name, matches V8
|
|
- key: "name"
|
|
value: "ThrowTypeError"
|
|
attributes: ""
|
|
duktape: true
|
|
|
|
#
|
|
# Duktape-specific built-ins
|
|
#
|
|
|
|
- id: bi_duktape
|
|
class: Object
|
|
internal_prototype: bi_object_prototype
|
|
duktape: true
|
|
bidx: true
|
|
#present_if: DUK_USE_DUKTAPE_BUILTIN # Present even when properties disabled, error augmentation relies on it
|
|
|
|
# There are a few properties not listed here:
|
|
# - "version" is added from parameter file automatically.
|
|
# - "env" is added dynamically at runtime.
|
|
|
|
properties:
|
|
- key: "Pointer"
|
|
value:
|
|
type: object
|
|
id: bi_pointer_constructor
|
|
duktape: true
|
|
present_if: DUK_USE_DUKTAPE_BUILTIN
|
|
- key: "Thread"
|
|
value:
|
|
type: object
|
|
id: bi_thread_constructor
|
|
duktape: true
|
|
present_if:
|
|
- DUK_USE_COROUTINE_SUPPORT
|
|
- DUK_USE_DUKTAPE_BUILTIN
|
|
- key: "info"
|
|
value:
|
|
type: function
|
|
native: duk_bi_duktape_object_info
|
|
length: 1
|
|
duktape: true
|
|
present_if: DUK_USE_DUKTAPE_BUILTIN
|
|
- key: "act"
|
|
value:
|
|
type: function
|
|
native: duk_bi_duktape_object_act
|
|
length: 1
|
|
duktape: true
|
|
present_if: DUK_USE_DUKTAPE_BUILTIN
|
|
- key: "gc"
|
|
value:
|
|
type: function
|
|
native: duk_bi_duktape_object_gc
|
|
length: 1
|
|
duktape: true
|
|
present_if: DUK_USE_DUKTAPE_BUILTIN
|
|
- key: "fin"
|
|
value:
|
|
type: function
|
|
native: duk_bi_duktape_object_fin
|
|
length: 0
|
|
varargs: true
|
|
duktape: true
|
|
present_if:
|
|
- DUK_USE_FINALIZER_SUPPORT
|
|
- DUK_USE_DUKTAPE_BUILTIN
|
|
- key: "enc"
|
|
value:
|
|
type: function
|
|
native: duk_bi_duktape_object_enc
|
|
length: 0
|
|
varargs: true
|
|
duktape: true
|
|
present_if: DUK_USE_DUKTAPE_BUILTIN
|
|
- key: "dec"
|
|
value:
|
|
type: function
|
|
native: duk_bi_duktape_object_dec
|
|
length: 0
|
|
varargs: true
|
|
duktape: true
|
|
present_if: DUK_USE_DUKTAPE_BUILTIN
|
|
- key: "compact"
|
|
value:
|
|
type: function
|
|
native: duk_bi_duktape_object_compact
|
|
length: 1
|
|
duktape: true
|
|
present_if: DUK_USE_DUKTAPE_BUILTIN
|
|
|
|
- id: bi_thread_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
varargs: true
|
|
native: duk_bi_thread_constructor
|
|
callable: true
|
|
constructable: true
|
|
duktape: true
|
|
bidx: true
|
|
present_if: DUK_USE_COROUTINE_SUPPORT
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 1
|
|
attributes: ""
|
|
duktape: true
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_thread_prototype
|
|
attributes: ""
|
|
duktape: true
|
|
- key: "name"
|
|
value: "Thread"
|
|
attributes: ""
|
|
duktape: true
|
|
|
|
# "yield" is a reserved word but does not prevent its use as a property name
|
|
- key: "yield"
|
|
value:
|
|
type: function
|
|
native: duk_bi_thread_yield
|
|
length: 2
|
|
duktape: true
|
|
autoLightfunc: false # automatic lightfunc conversion clashes with internal implementation
|
|
present_if: DUK_USE_COROUTINE_SUPPORT
|
|
- key: "resume"
|
|
value:
|
|
type: function
|
|
native: duk_bi_thread_resume
|
|
length: 3
|
|
duktape: true
|
|
autoLightfunc: false # automatic lightfunc conversion clashes with internal implementation
|
|
present_if: DUK_USE_COROUTINE_SUPPORT
|
|
- key: "current"
|
|
value:
|
|
type: function
|
|
native: duk_bi_thread_current
|
|
length: 0
|
|
duktape: true
|
|
present_if: DUK_USE_COROUTINE_SUPPORT
|
|
|
|
- id: bi_thread_prototype
|
|
class: Thread
|
|
internal_prototype: bi_object_prototype
|
|
duktape: true
|
|
bidx: true
|
|
# Present even when DUK_USE_DUKTAPE_BUILTIN disabled.
|
|
|
|
# Must be present even if coroutines are disabled for inheritance.
|
|
# Because Duktape.Thread.prototype is missing, the only way to access
|
|
# the prototype to e.g. add methods is to look it up from a thread
|
|
# instance.
|
|
|
|
# Note: we don't keep up with the E5 convention that prototype objects
|
|
# are some faux instances of their type (e.g. Date.prototype is a Date
|
|
# instance).
|
|
#
|
|
# Also, we don't currently have a "constructor" property because there is
|
|
# no explicit constructor object.
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_thread_constructor
|
|
attributes: "wc"
|
|
duktape: true
|
|
present_if:
|
|
- DUK_USE_COROUTINE_SUPPORT
|
|
- DUK_USE_DUKTAPE_BUILTIN
|
|
|
|
# toString() and valueOf() are inherited from Object.prototype
|
|
|
|
- id: bi_pointer_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
varargs: true
|
|
native: duk_bi_pointer_constructor
|
|
callable: true
|
|
constructable: true
|
|
duktape: true
|
|
bidx: true
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 1
|
|
attributes: ""
|
|
duktape: true
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_pointer_prototype
|
|
attributes: ""
|
|
duktape: true
|
|
- key: "name"
|
|
value: "Pointer"
|
|
attributes: ""
|
|
duktape: true
|
|
|
|
- id: bi_pointer_prototype
|
|
class: Pointer
|
|
internal_prototype: bi_object_prototype
|
|
duktape: true
|
|
bidx: true
|
|
# Present even when DUK_USE_DUKTAPE_BUILTIN disabled.
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_pointer_constructor
|
|
attributes: "wc"
|
|
duktape: true
|
|
present_if: DUK_USE_DUKTAPE_BUILTIN
|
|
|
|
- key: "toString"
|
|
value:
|
|
type: function
|
|
native: duk_bi_pointer_prototype_tostring_shared
|
|
length: 0
|
|
magic: 1 # magic = to_string
|
|
duktape: true
|
|
present_if: DUK_USE_DUKTAPE_BUILTIN
|
|
- key: "valueOf"
|
|
value:
|
|
type: function
|
|
native: duk_bi_pointer_prototype_tostring_shared
|
|
length: 0
|
|
magic: 0 # magic = to_string
|
|
duktape: true
|
|
present_if: DUK_USE_DUKTAPE_BUILTIN
|
|
|
|
# This is an Error *instance* used to avoid allocation when a "double error" occurs.
|
|
# The object is "frozen and sealed" to avoid code accidentally modifying the instance.
|
|
# This is important because the error is rethrown as is.
|
|
|
|
- id: bi_double_error
|
|
class: Error
|
|
internal_prototype: bi_error_prototype
|
|
extensible: false
|
|
duktape: true
|
|
bidx: true
|
|
|
|
# Note: this is the only non-extensible built-in, so there is special
|
|
# post-tweak in duk_hthread_builtins.c to handle this.
|
|
|
|
properties:
|
|
- key: "name"
|
|
value: "DoubleError"
|
|
attributes: ""
|
|
duktape: true
|
|
- key: "message"
|
|
value: "error in error handling"
|
|
attributes: ""
|
|
duktape: true
|
|
|
|
#
|
|
# ES6
|
|
#
|
|
|
|
- id: bi_proxy_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
# no external prototype
|
|
native: duk_bi_proxy_constructor
|
|
callable: true
|
|
constructable: true
|
|
es6: true
|
|
bidx: true
|
|
present_if: DUK_USE_ES6_PROXY
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 2
|
|
attributes: ""
|
|
es6: true
|
|
- key: "name"
|
|
value: "Proxy"
|
|
attributes: ""
|
|
es6: true
|
|
#- key: "revocable"
|
|
# value:
|
|
# type: function
|
|
# native: duk_bi_proxy_constructor_revocable
|
|
# length: 2
|
|
# es6: true
|
|
|
|
- id: bi_reflect
|
|
class: Object
|
|
internal_prototype: bi_object_prototype
|
|
bidx: true
|
|
present_if: DUK_USE_REFLECT_BUILTIN
|
|
|
|
properties:
|
|
- key: "apply"
|
|
value:
|
|
type: function
|
|
native: duk_bi_function_prototype_apply
|
|
length: 3
|
|
magic: 1
|
|
es6: true
|
|
- key: "construct"
|
|
value:
|
|
type: function
|
|
native: duk_bi_function_prototype_apply
|
|
length: 2
|
|
magic: 2
|
|
varargs: true
|
|
es6: true
|
|
- key: "defineProperty"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_constructor_define_property
|
|
length: 3
|
|
magic: 1
|
|
es6: true
|
|
- key: "deleteProperty"
|
|
value:
|
|
type: function
|
|
native: duk_bi_reflect_object_delete_property
|
|
length: 2
|
|
es6: true
|
|
- key: "get"
|
|
value:
|
|
type: function
|
|
native: duk_bi_reflect_object_get
|
|
length: 2
|
|
varargs: true
|
|
es6: true
|
|
- key: "getOwnPropertyDescriptor"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_constructor_get_own_property_descriptor
|
|
length: 2
|
|
magic: 1
|
|
es6: true
|
|
- key: "getPrototypeOf"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_getprototype_shared
|
|
length: 1
|
|
magic: 2
|
|
es6: true
|
|
- key: "has"
|
|
value:
|
|
type: function
|
|
native: duk_bi_reflect_object_has
|
|
length: 2
|
|
es6: true
|
|
- key: "isExtensible"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_constructor_is_extensible
|
|
length: 1
|
|
magic: 1
|
|
es6: true
|
|
- key: "ownKeys"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_constructor_keys_shared
|
|
length: 1
|
|
magic: 0
|
|
es6: true
|
|
- key: "preventExtensions"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_constructor_prevent_extensions
|
|
length: 1
|
|
magic: 1
|
|
es6: true
|
|
- key: "set"
|
|
value:
|
|
type: function
|
|
native: duk_bi_reflect_object_set
|
|
length: 3
|
|
varargs: true
|
|
es6: true
|
|
- key: "setPrototypeOf"
|
|
value:
|
|
type: function
|
|
native: duk_bi_object_setprototype_shared
|
|
length: 2
|
|
magic: 2
|
|
es6: true
|
|
|
|
#
|
|
# TypedArray
|
|
#
|
|
|
|
- id: bi_arraybuffer_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
varargs: false
|
|
native: duk_bi_arraybuffer_constructor
|
|
callable: true
|
|
constructable: true
|
|
typedarray: true
|
|
es6: true
|
|
bidx: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 1
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_arraybuffer_prototype
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
|
|
# matches V8, not specified explicitly in Khronos spec
|
|
- key: "name"
|
|
value: "ArrayBuffer"
|
|
attributes: ""
|
|
duktape: true
|
|
|
|
- key: "isView"
|
|
value:
|
|
type: function
|
|
native: duk_bi_arraybuffer_isview
|
|
length: 1
|
|
varargs: false
|
|
typedarray: true
|
|
es6: true
|
|
|
|
# Duktape custom: allocate a plain buffer, return value is always a
|
|
# freshly allocated fixed plain buffer.
|
|
- key: "allocPlain"
|
|
value:
|
|
type: function
|
|
native: duk_bi_arraybuffer_allocplain
|
|
length: 1
|
|
varargs: false
|
|
duktape: true
|
|
|
|
# Get plain buffer underlying a buffer object.
|
|
- key: "plainOf"
|
|
value:
|
|
type: function
|
|
native: duk_bi_arraybuffer_plainof
|
|
length: 1
|
|
varargs: false
|
|
duktape: true
|
|
|
|
- id: bi_arraybuffer_prototype
|
|
class: Object
|
|
internal_prototype: bi_object_prototype
|
|
typedarray: true
|
|
es6: true
|
|
bidx: true
|
|
# Present even when DUK_USE_BUFFEROBJECT_SUPPORT is disabled.
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_arraybuffer_constructor
|
|
attributes: "wc"
|
|
typedarray: true
|
|
es6: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
- key: "slice"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_slice_shared
|
|
length: 2
|
|
varargs: false
|
|
magic: 2 # magic: 0x01=isView, 0x02=create copy, 0x04=Node.js Buffer special
|
|
typedarray: true
|
|
es6: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
- id: bi_dataview_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
varargs: false
|
|
native: duk_bi_dataview_constructor
|
|
callable: true
|
|
constructable: true
|
|
typedarray: true
|
|
es6: true
|
|
bidx: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 3
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_dataview_prototype
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
|
|
# matches V8, not specified explicitly in Khronos spec
|
|
- key: "name"
|
|
value: "DataView"
|
|
attributes: ""
|
|
duktape: true
|
|
|
|
- id: bi_dataview_prototype
|
|
class: Object
|
|
internal_prototype: bi_object_prototype
|
|
typedarray: true
|
|
es6: true
|
|
bidx: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_dataview_constructor
|
|
attributes: "wc"
|
|
typedarray: true
|
|
es6: true
|
|
|
|
# Int8/Uint8 get/set calls don't have a little endian argument
|
|
# but length/nargs must provide it for the shared helper anyway.
|
|
|
|
- key: "getInt8"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 2
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "8bit"
|
|
signed: true
|
|
bigendian: false
|
|
typedarray: true
|
|
typedarray: true
|
|
es6: true
|
|
- key: "getUint8"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 2
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "8bit"
|
|
signed: false
|
|
bigendian: false
|
|
typedarray: true
|
|
typedarray: true
|
|
es6: true
|
|
- key: "getInt16"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 2
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "16bit"
|
|
signed: true
|
|
bigendian: false
|
|
typedarray: true
|
|
typedarray: true
|
|
es6: true
|
|
- key: "getUint16"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 2
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "16bit"
|
|
signed: false
|
|
bigendian: false
|
|
typedarray: true
|
|
typedarray: true
|
|
es6: true
|
|
- key: "getInt32"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 2
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "32bit"
|
|
signed: true
|
|
bigendian: false
|
|
typedarray: true
|
|
typedarray: true
|
|
es6: true
|
|
- key: "getUint32"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 2
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "32bit"
|
|
signed: false
|
|
bigendian: false
|
|
typedarray: true
|
|
typedarray: true
|
|
es6: true
|
|
- key: "getFloat32"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 2
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "float"
|
|
signed: false
|
|
bigendian: false
|
|
typedarray: true
|
|
typedarray: true
|
|
es6: true
|
|
- key: "getFloat64"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 2
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "double"
|
|
signed: false
|
|
bigendian: false
|
|
typedarray: true
|
|
typedarray: true
|
|
es6: true
|
|
- key: "setInt8"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "8bit"
|
|
signed: true
|
|
bigendian: false
|
|
typedarray: true
|
|
typedarray: true
|
|
es6: true
|
|
- key: "setUint8"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "8bit"
|
|
signed: false
|
|
bigendian: false
|
|
typedarray: true
|
|
typedarray: true
|
|
es6: true
|
|
- key: "setInt16"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "16bit"
|
|
signed: true
|
|
bigendian: false
|
|
typedarray: true
|
|
typedarray: true
|
|
es6: true
|
|
- key: "setUint16"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "16bit"
|
|
signed: false
|
|
bigendian: false
|
|
typedarray: true
|
|
typedarray: true
|
|
es6: true
|
|
- key: "setInt32"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "32bit"
|
|
signed: true
|
|
bigendian: false
|
|
typedarray: true
|
|
typedarray: true
|
|
es6: true
|
|
- key: "setUint32"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "32bit"
|
|
signed: false
|
|
bigendian: false
|
|
typedarray: true
|
|
typedarray: true
|
|
es6: true
|
|
- key: "setFloat32"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "float"
|
|
signed: false
|
|
bigendian: false
|
|
typedarray: true
|
|
typedarray: true
|
|
es6: true
|
|
- key: "setFloat64"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "double"
|
|
signed: false
|
|
bigendian: false
|
|
typedarray: true
|
|
typedarray: true
|
|
es6: true
|
|
|
|
# %TypedArrayPrototype%
|
|
# Prototype object providing properties shared by all TypedArray
|
|
# instances (reduces built-in object count). The view specific prototypes
|
|
# (such as Uint8Array.prototype) are still needed so that e.g. instanceof
|
|
# will work properly.
|
|
|
|
- id: bi_typedarray_prototype
|
|
class: Object
|
|
internal_prototype: bi_object_prototype
|
|
# no external_constructor (specific views provide it)
|
|
typedarray: true
|
|
es6: true
|
|
bidx: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
properties:
|
|
- key: "set"
|
|
value:
|
|
type: function
|
|
native: duk_bi_typedarray_set
|
|
length: 2
|
|
varargs: false
|
|
typedarray: true
|
|
es6: true
|
|
- key: "subarray"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_slice_shared
|
|
length: 2
|
|
varargs: false
|
|
magic: 1 # magic: 0x01=isView, 0x02=create copy, 0x04=Node.js Buffer special
|
|
typedarray: true
|
|
es6: true
|
|
|
|
- id: bi_int8array_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
varargs: false
|
|
native: duk_bi_typedarray_constructor
|
|
callable: true
|
|
constructable: true
|
|
magic:
|
|
type: typedarray_constructor
|
|
elem: "int8"
|
|
shift: 0
|
|
typedarray: true
|
|
es6: true
|
|
bidx: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 3
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_int8array_prototype
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
# matches V8, not specified explicitly in Khronos spec
|
|
- key: "name"
|
|
value: "Int8Array"
|
|
attributes: ""
|
|
duktape: true
|
|
- key: "BYTES_PER_ELEMENT"
|
|
value: 1
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
|
|
- id: bi_int8array_prototype
|
|
internal_prototype: bi_typedarray_prototype
|
|
class: Object
|
|
typedarray: true
|
|
es6: true
|
|
bidx: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_int8array_constructor
|
|
attributes: "wc"
|
|
typedarray: true
|
|
es6: true
|
|
|
|
- id: bi_uint8array_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
varargs: false
|
|
native: duk_bi_typedarray_constructor
|
|
callable: true
|
|
constructable: true
|
|
magic:
|
|
type: typedarray_constructor
|
|
elem: "uint8"
|
|
shift: 0
|
|
typedarray: true
|
|
es6: true
|
|
bidx: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 3
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_uint8array_prototype
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
# matches V8, not specified explicitly in Khronos spec
|
|
- key: "name"
|
|
value: "Uint8Array"
|
|
attributes: ""
|
|
duktape: true
|
|
- key: "BYTES_PER_ELEMENT"
|
|
value: 1
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
|
|
- id: bi_uint8array_prototype
|
|
class: Object
|
|
internal_prototype: bi_typedarray_prototype
|
|
typedarray: true
|
|
es6: true
|
|
bidx: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_uint8array_constructor
|
|
attributes: "wc"
|
|
typedarray: true
|
|
es6: true
|
|
|
|
- id: bi_uint8clampedarray_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
varargs: false
|
|
native: duk_bi_typedarray_constructor
|
|
callable: true
|
|
constructable: true
|
|
magic:
|
|
type: typedarray_constructor
|
|
elem: "uint8clamped"
|
|
shift: 0
|
|
typedarray: true
|
|
es6: true
|
|
bidx: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 3
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_uint8clampedarray_prototype
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
# matches V8, not specified explicitly in Khronos spec
|
|
- key: "name"
|
|
value: "Uint8ClampedArray"
|
|
attributes: ""
|
|
duktape: true
|
|
- key: "BYTES_PER_ELEMENT"
|
|
value: 1
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
|
|
- id: bi_uint8clampedarray_prototype
|
|
class: Object
|
|
internal_prototype: bi_typedarray_prototype
|
|
typedarray: true
|
|
es6: true
|
|
bidx: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_uint8clampedarray_constructor
|
|
attributes: "wc"
|
|
typedarray: true
|
|
es6: true
|
|
|
|
- id: bi_int16array_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
varargs: false
|
|
native: duk_bi_typedarray_constructor
|
|
callable: true
|
|
constructable: true
|
|
magic:
|
|
type: typedarray_constructor
|
|
elem: "int16"
|
|
shift: 1
|
|
typedarray: true
|
|
es6: true
|
|
bidx: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 3
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_int16array_prototype
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
# matches V8, not specified explicitly in Khronos spec
|
|
- key: "name"
|
|
value: "Int16Array"
|
|
attributes: ""
|
|
duktape: true
|
|
- key: "BYTES_PER_ELEMENT"
|
|
value: 2
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
|
|
- id: bi_int16array_prototype
|
|
class: Object
|
|
internal_prototype: bi_typedarray_prototype
|
|
typedarray: true
|
|
es6: true
|
|
bidx: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_int16array_constructor
|
|
attributes: "wc"
|
|
typedarray: true
|
|
es6: true
|
|
|
|
- id: bi_uint16array_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
varargs: false
|
|
native: duk_bi_typedarray_constructor
|
|
callable: true
|
|
constructable: true
|
|
magic:
|
|
type: typedarray_constructor
|
|
elem: "uint16"
|
|
shift: 1
|
|
typedarray: true
|
|
es6: true
|
|
bidx: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 3
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_uint16array_prototype
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
# matches V8, not specified explicitly in Khronos spec
|
|
- key: "name"
|
|
value: "Uint16Array"
|
|
attributes: ""
|
|
duktape: true
|
|
- key: "BYTES_PER_ELEMENT"
|
|
value: 2
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
|
|
- id: bi_uint16array_prototype
|
|
class: Object
|
|
internal_prototype: bi_typedarray_prototype
|
|
typedarray: true
|
|
es6: true
|
|
bidx: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_uint16array_constructor
|
|
attributes: "wc"
|
|
typedarray: true
|
|
es6: true
|
|
|
|
- id: bi_int32array_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
varargs: false
|
|
native: duk_bi_typedarray_constructor
|
|
callable: true
|
|
constructable: true
|
|
magic:
|
|
type: typedarray_constructor
|
|
elem: "int32"
|
|
shift: 2
|
|
typedarray: true
|
|
es6: true
|
|
bidx: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 3
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_int32array_prototype
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
# matches V8, not specified explicitly in Khronos spec
|
|
- key: "name"
|
|
value: "Int32Array"
|
|
attributes: ""
|
|
duktape: true
|
|
- key: "BYTES_PER_ELEMENT"
|
|
value: 4
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
|
|
- id: bi_int32array_prototype
|
|
class: Object
|
|
internal_prototype: bi_typedarray_prototype
|
|
typedarray: true
|
|
es6: true
|
|
bidx: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_int32array_constructor
|
|
attributes: "wc"
|
|
typedarray: true
|
|
es6: true
|
|
|
|
- id: bi_uint32array_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
varargs: false
|
|
native: duk_bi_typedarray_constructor
|
|
callable: true
|
|
constructable: true
|
|
magic:
|
|
type: typedarray_constructor
|
|
elem: "uint32"
|
|
shift: 2
|
|
typedarray: true
|
|
es6: true
|
|
bidx: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 3
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_uint32array_prototype
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
# matches V8, not specified explicitly in Khronos spec
|
|
- key: "name"
|
|
value: "Uint32Array"
|
|
attributes: ""
|
|
duktape: true
|
|
- key: "BYTES_PER_ELEMENT"
|
|
value: 4
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
|
|
- id: bi_uint32array_prototype
|
|
class: Object
|
|
internal_prototype: bi_typedarray_prototype
|
|
typedarray: true
|
|
es6: true
|
|
bidx: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_uint32array_constructor
|
|
attributes: "wc"
|
|
typedarray: true
|
|
es6: true
|
|
|
|
- id: bi_float32array_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
varargs: false
|
|
native: duk_bi_typedarray_constructor
|
|
callable: true
|
|
constructable: true
|
|
magic:
|
|
type: typedarray_constructor
|
|
elem: "float32"
|
|
shift: 2
|
|
typedarray: true
|
|
es6: true
|
|
bidx: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 3
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_float32array_prototype
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
# matches V8, not specified explicitly in Khronos spec
|
|
- key: "name"
|
|
value: "Float32Array"
|
|
attributes: ""
|
|
duktape: true
|
|
- key: "BYTES_PER_ELEMENT"
|
|
value: 4
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
|
|
- id: bi_float32array_prototype
|
|
class: Object
|
|
internal_prototype: bi_typedarray_prototype
|
|
typedarray: true
|
|
es6: true
|
|
bidx: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_float32array_constructor
|
|
attributes: "wc"
|
|
typedarray: true
|
|
es6: true
|
|
|
|
- id: bi_float64array_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
varargs: false
|
|
native: duk_bi_typedarray_constructor
|
|
callable: true
|
|
constructable: true
|
|
magic:
|
|
type: typedarray_constructor
|
|
elem: "float64"
|
|
shift: 3
|
|
typedarray: true
|
|
es6: true
|
|
bidx: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 3
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_float64array_prototype
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
# matches V8, not specified explicitly in Khronos spec
|
|
- key: "name"
|
|
value: "Float64Array"
|
|
attributes: ""
|
|
duktape: true
|
|
- key: "BYTES_PER_ELEMENT"
|
|
value: 8
|
|
attributes: ""
|
|
typedarray: true
|
|
es6: true
|
|
|
|
- id: bi_float64array_prototype
|
|
class: Object
|
|
internal_prototype: bi_typedarray_prototype
|
|
typedarray: true
|
|
es6: true
|
|
bidx: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_float64array_constructor
|
|
attributes: "wc"
|
|
typedarray: true
|
|
es6: true
|
|
|
|
#
|
|
# Node.js Buffer
|
|
#
|
|
|
|
- id: bi_nodejs_buffer_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
varargs: false
|
|
native: duk_bi_nodejs_buffer_constructor
|
|
callable: true
|
|
constructable: true
|
|
nodejs_buffer: true
|
|
bidx: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 2
|
|
attributes: ""
|
|
nodejs_buffer: true
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_nodejs_buffer_prototype
|
|
attributes: ""
|
|
nodejs_buffer: true
|
|
- key: "name"
|
|
value: "Buffer"
|
|
attributes: ""
|
|
nodejs_buffer: true
|
|
|
|
- key: "concat"
|
|
value:
|
|
type: function
|
|
native: duk_bi_nodejs_buffer_concat
|
|
length: 2
|
|
varargs: false
|
|
nodejs_buffer: true
|
|
- key: "isEncoding"
|
|
value:
|
|
type: function
|
|
native: duk_bi_nodejs_buffer_is_encoding
|
|
length: 1
|
|
varargs:
|
|
nodejs_buffer: true
|
|
- key: "isBuffer"
|
|
value:
|
|
type: function
|
|
native: duk_bi_nodejs_buffer_is_buffer
|
|
length: 1
|
|
varargs: false
|
|
nodejs_buffer: true
|
|
- key: "byteLength"
|
|
value:
|
|
type: function
|
|
native: duk_bi_nodejs_buffer_byte_length
|
|
length: 2
|
|
varargs: false
|
|
nodejs_buffer: true
|
|
- key: "compare"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_compare_shared
|
|
length: 2
|
|
varargs: false
|
|
magic: 3 # magic: 0x02=static call + 0x01=compare = 0x03
|
|
nodejs_buffer: true
|
|
|
|
- id: bi_nodejs_buffer_prototype
|
|
internal_prototype: bi_uint8array_prototype
|
|
class: Object
|
|
nodejs_buffer: true
|
|
bidx: true
|
|
present_if: DUK_USE_BUFFEROBJECT_SUPPORT
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_nodejs_buffer_constructor
|
|
attributes: "wc"
|
|
nodejs_buffer: true
|
|
|
|
- key: "readUInt8"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 2
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "8bit"
|
|
signed: false
|
|
bigendian: false
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "readInt8"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 2
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "8bit"
|
|
signed: true
|
|
bigendian: false
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "readUInt16LE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 2
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "16bit"
|
|
signed: false
|
|
bigendian: false
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "readUInt16BE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 2
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "16bit"
|
|
signed: false
|
|
bigendian: true
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "readInt16LE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 2
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "16bit"
|
|
signed: true
|
|
bigendian: false
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "readInt16BE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 2
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "16bit"
|
|
signed: true
|
|
bigendian: true
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "readUInt32LE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 2
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "32bit"
|
|
signed: false
|
|
bigendian: false
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "readUInt32BE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 2
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "32bit"
|
|
signed: false
|
|
bigendian: true
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "readInt32LE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 2
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "32bit"
|
|
signed: true
|
|
bigendian: false
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "readInt32BE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 2
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "32bit"
|
|
signed: true
|
|
bigendian: true
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "readFloatLE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 2
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "float"
|
|
signed: false
|
|
bigendian: false
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "readFloatBE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 2
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "float"
|
|
signed: false
|
|
bigendian: true
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "readDoubleLE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 2
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "double"
|
|
signed: false
|
|
bigendian: false
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "readDoubleBE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 2
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "double"
|
|
signed: false
|
|
bigendian: true
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "readUIntLE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "varint"
|
|
signed: false
|
|
bigendian: false
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "readUIntBE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "varint"
|
|
signed: false
|
|
bigendian: true
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "readIntLE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "varint"
|
|
signed: true
|
|
bigendian: false
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "readIntBE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_readfield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_readfield
|
|
elem: "varint"
|
|
signed: true
|
|
bigendian: true
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "writeUInt8"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "8bit"
|
|
signed: false
|
|
bigendian: false
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "writeInt8"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "8bit"
|
|
signed: true
|
|
bigendian: false
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "writeUInt16LE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "16bit"
|
|
signed: false
|
|
bigendian: false
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "writeUInt16BE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "16bit"
|
|
signed: false
|
|
bigendian: true
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "writeInt16LE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "16bit"
|
|
signed: true
|
|
bigendian: false
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "writeInt16BE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "16bit"
|
|
signed: true
|
|
bigendian: true
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "writeUInt32LE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "32bit"
|
|
signed: false
|
|
bigendian: false
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "writeUInt32BE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "32bit"
|
|
signed: false
|
|
bigendian: true
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "writeInt32LE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "32bit"
|
|
signed: true
|
|
bigendian: false
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "writeInt32BE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "32bit"
|
|
signed: true
|
|
bigendian: true
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "writeFloatLE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "float"
|
|
signed: false
|
|
bigendian: false
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "writeFloatBE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "float"
|
|
signed: false
|
|
bigendian: true
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "writeDoubleLE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "double"
|
|
signed: false
|
|
bigendian: false
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "writeDoubleBE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 3
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "double"
|
|
signed: false
|
|
bigendian: true
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "writeUIntLE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 4
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "varint"
|
|
signed: false
|
|
bigendian: false
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "writeUIntBE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 4
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "varint"
|
|
signed: false
|
|
bigendian: true
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "writeIntLE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 4
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "varint"
|
|
signed: true
|
|
bigendian: false
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "writeIntBE"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_writefield
|
|
length: 4
|
|
varargs: false
|
|
magic:
|
|
type: buffer_writefield
|
|
elem: "varint"
|
|
signed: true
|
|
bigendian: true
|
|
typedarray: false
|
|
nodejs_buffer: true
|
|
- key: "toString"
|
|
value:
|
|
type: function
|
|
native: duk_bi_nodejs_buffer_tostring
|
|
length: 3
|
|
varargs: false
|
|
nodejs_buffer: true
|
|
- key: "toJSON"
|
|
value:
|
|
type: function
|
|
native: duk_bi_nodejs_buffer_tojson
|
|
length: 0
|
|
varargs: false
|
|
nodejs_buffer: true
|
|
- key: "fill"
|
|
value:
|
|
type: function
|
|
native: duk_bi_nodejs_buffer_fill
|
|
length: 3
|
|
varargs: false
|
|
nodejs_buffer: true
|
|
- key: "equals"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_compare_shared
|
|
length: 1
|
|
varargs: false
|
|
magic: 0 # magic = 0: equals
|
|
nodejs_buffer: true
|
|
- key: "compare"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_compare_shared
|
|
length: 1
|
|
varargs: false
|
|
magic: 1 # magic = 1: compare
|
|
nodejs_buffer: true
|
|
- key: "copy"
|
|
value:
|
|
type: function
|
|
native: duk_bi_nodejs_buffer_copy
|
|
length: 4
|
|
varargs: false
|
|
nodejs_buffer: true
|
|
- key: "slice"
|
|
value:
|
|
type: function
|
|
native: duk_bi_buffer_slice_shared
|
|
length: 2
|
|
varargs: false
|
|
magic: 4 # magic: 0x01=isView, 0x02=create copy, 0x04=Node.js Buffer special
|
|
nodejs_buffer: true
|
|
- key: "write"
|
|
value:
|
|
type: function
|
|
native: duk_bi_nodejs_buffer_write
|
|
length: 4
|
|
varargs: false
|
|
nodejs_buffer: true
|
|
|
|
#
|
|
# Encoding API
|
|
#
|
|
|
|
- id: bi_textencoder_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
nargs: 0
|
|
native: duk_bi_textencoder_constructor
|
|
callable: true
|
|
constructable: true
|
|
bidx: true
|
|
encoding_api: true
|
|
present_if: DUK_USE_ENCODING_BUILTINS
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 0
|
|
attributes: ""
|
|
encoding_api: true
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_textencoder_prototype
|
|
attributes: ""
|
|
encoding_api: true
|
|
- key: "name"
|
|
value: "TextEncoder"
|
|
attributes: ""
|
|
encoding_api: true
|
|
|
|
- id: bi_textencoder_prototype
|
|
internal_prototype: bi_object_prototype
|
|
class: Object
|
|
bidx: true
|
|
encoding_api: true
|
|
present_if: DUK_USE_ENCODING_BUILTINS
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_textencoder_constructor
|
|
attributes: "wc"
|
|
encoding_api: true
|
|
- key: "encoding"
|
|
value:
|
|
type: accessor
|
|
getter: duk_bi_textencoder_prototype_encoding_getter
|
|
getter_nargs: 0
|
|
getter_magic: 0
|
|
attributes: "ec"
|
|
encoding_api: true
|
|
- key: "encode"
|
|
value:
|
|
type: function
|
|
native: duk_bi_textencoder_prototype_encode
|
|
length: 0
|
|
nargs: 1
|
|
attributes: "wec"
|
|
encoding_api: true
|
|
|
|
- id: bi_textdecoder_constructor
|
|
class: Function
|
|
internal_prototype: bi_function_prototype
|
|
nargs: 2
|
|
native: duk_bi_textdecoder_constructor
|
|
callable: true
|
|
constructable: true
|
|
bidx: true
|
|
encoding_api: true
|
|
present_if: DUK_USE_ENCODING_BUILTINS
|
|
|
|
properties:
|
|
- key: "length"
|
|
value: 0
|
|
attributes: ""
|
|
encoding_api: true
|
|
- key: "prototype"
|
|
value:
|
|
type: object
|
|
id: bi_textdecoder_prototype
|
|
attributes: ""
|
|
encoding_api: true
|
|
- key: "name"
|
|
value: "TextDecoder"
|
|
attributes: ""
|
|
encoding_api: true
|
|
|
|
- id: bi_textdecoder_prototype
|
|
internal_prototype: bi_object_prototype
|
|
class: Object
|
|
bidx: true
|
|
encoding_api: true
|
|
present_if: DUK_USE_ENCODING_BUILTINS
|
|
|
|
properties:
|
|
- key: "constructor"
|
|
value:
|
|
type: object
|
|
id: bi_textdecoder_constructor
|
|
attributes: "wc"
|
|
encoding_api: true
|
|
- key: "encoding"
|
|
value:
|
|
type: accessor
|
|
getter: duk_bi_textdecoder_prototype_shared_getter
|
|
getter_nargs: 0
|
|
getter_magic: 0 # 0=encoding
|
|
attributes: "ec"
|
|
encoding_api: true
|
|
- key: "fatal"
|
|
value:
|
|
type: accessor
|
|
getter: duk_bi_textdecoder_prototype_shared_getter
|
|
getter_nargs: 0
|
|
getter_magic: 1 # 1=fatal
|
|
attributes: "ec"
|
|
encoding_api: true
|
|
- key: "ignoreBOM"
|
|
value:
|
|
type: accessor
|
|
getter: duk_bi_textdecoder_prototype_shared_getter
|
|
getter_nargs: 0
|
|
getter_magic: 2 # 2=ignoreBOM
|
|
attributes: "ec"
|
|
encoding_api: true
|
|
- key: "decode"
|
|
value:
|
|
type: function
|
|
native: duk_bi_textdecoder_prototype_decode
|
|
length: 0
|
|
nargs: 2
|
|
attributes: "wec"
|
|
encoding_api: true
|
|
|