mirror of https://github.com/ethereum/go-ethereum
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.
6650 lines
134 KiB
6650 lines
134 KiB
10 years ago
|
package otto
|
||
|
|
||
|
import (
|
||
|
"math"
|
||
|
)
|
||
|
|
||
|
func _newContext(runtime *_runtime) {
|
||
|
{
|
||
10 years ago
|
runtime.global.ObjectPrototype = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "Object",
|
||
|
objectClass: _classObject,
|
||
|
prototype: nil,
|
||
|
extensible: true,
|
||
|
value: prototypeValueObject,
|
||
|
}
|
||
|
}
|
||
|
{
|
||
10 years ago
|
runtime.global.FunctionPrototype = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.ObjectPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
value: prototypeValueFunction,
|
||
|
}
|
||
|
}
|
||
|
{
|
||
|
valueOf_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "valueOf",
|
||
|
call: builtinObject_valueOf,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
toString_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toString",
|
||
|
call: builtinObject_toString,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
toLocaleString_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toLocaleString",
|
||
|
call: builtinObject_toLocaleString,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
hasOwnProperty_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "hasOwnProperty",
|
||
|
call: builtinObject_hasOwnProperty,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
isPrototypeOf_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "isPrototypeOf",
|
||
|
call: builtinObject_isPrototypeOf,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
propertyIsEnumerable_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "propertyIsEnumerable",
|
||
|
call: builtinObject_propertyIsEnumerable,
|
||
10 years ago
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.ObjectPrototype.property = map[string]_property{
|
||
10 years ago
|
"valueOf": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: valueOf_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"toString": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toString_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"toLocaleString": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toLocaleString_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"hasOwnProperty": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: hasOwnProperty_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"isPrototypeOf": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: isPrototypeOf_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"propertyIsEnumerable": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: propertyIsEnumerable_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"constructor": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{},
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.ObjectPrototype.propertyOrder = []string{
|
||
10 years ago
|
"valueOf",
|
||
|
"toString",
|
||
|
"toLocaleString",
|
||
|
"hasOwnProperty",
|
||
|
"isPrototypeOf",
|
||
|
"propertyIsEnumerable",
|
||
|
"constructor",
|
||
|
}
|
||
|
}
|
||
|
{
|
||
|
toString_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toString",
|
||
|
call: builtinFunction_toString,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
apply_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 2,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "apply",
|
||
|
call: builtinFunction_apply,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
call_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "call",
|
||
|
call: builtinFunction_call,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
bind_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "bind",
|
||
|
call: builtinFunction_bind,
|
||
10 years ago
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.FunctionPrototype.property = map[string]_property{
|
||
10 years ago
|
"toString": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toString_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"apply": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: apply_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"call": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: call_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"bind": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: bind_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"constructor": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{},
|
||
|
},
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.FunctionPrototype.propertyOrder = []string{
|
||
10 years ago
|
"toString",
|
||
|
"apply",
|
||
|
"call",
|
||
|
"bind",
|
||
|
"constructor",
|
||
|
"length",
|
||
|
}
|
||
|
}
|
||
|
{
|
||
|
getPrototypeOf_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "getPrototypeOf",
|
||
|
call: builtinObject_getPrototypeOf,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
getOwnPropertyDescriptor_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 2,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "getOwnPropertyDescriptor",
|
||
|
call: builtinObject_getOwnPropertyDescriptor,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
defineProperty_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 3,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "defineProperty",
|
||
|
call: builtinObject_defineProperty,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
defineProperties_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 2,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "defineProperties",
|
||
|
call: builtinObject_defineProperties,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
create_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 2,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "create",
|
||
|
call: builtinObject_create,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
isExtensible_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "isExtensible",
|
||
|
call: builtinObject_isExtensible,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
preventExtensions_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "preventExtensions",
|
||
|
call: builtinObject_preventExtensions,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
isSealed_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "isSealed",
|
||
|
call: builtinObject_isSealed,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
seal_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "seal",
|
||
|
call: builtinObject_seal,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
isFrozen_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "isFrozen",
|
||
|
call: builtinObject_isFrozen,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
freeze_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "freeze",
|
||
|
call: builtinObject_freeze,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
keys_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "keys",
|
||
|
call: builtinObject_keys,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
getOwnPropertyNames_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "getOwnPropertyNames",
|
||
|
call: builtinObject_getOwnPropertyNames,
|
||
10 years ago
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.Object = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "Object",
|
||
|
call: builtinObject,
|
||
10 years ago
|
construct: builtinNewObject,
|
||
|
},
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"prototype": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.ObjectPrototype,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"getPrototypeOf": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: getPrototypeOf_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"getOwnPropertyDescriptor": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: getOwnPropertyDescriptor_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"defineProperty": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: defineProperty_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"defineProperties": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: defineProperties_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"create": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: create_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"isExtensible": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: isExtensible_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"preventExtensions": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: preventExtensions_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"isSealed": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: isSealed_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"seal": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: seal_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"isFrozen": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: isFrozen_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"freeze": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: freeze_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"keys": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: keys_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"getOwnPropertyNames": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: getOwnPropertyNames_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
"prototype",
|
||
|
"getPrototypeOf",
|
||
|
"getOwnPropertyDescriptor",
|
||
|
"defineProperty",
|
||
|
"defineProperties",
|
||
|
"create",
|
||
|
"isExtensible",
|
||
|
"preventExtensions",
|
||
|
"isSealed",
|
||
|
"seal",
|
||
|
"isFrozen",
|
||
|
"freeze",
|
||
|
"keys",
|
||
|
"getOwnPropertyNames",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.ObjectPrototype.property["constructor"] =
|
||
10 years ago
|
_property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.Object,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
}
|
||
|
{
|
||
|
Function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "Function",
|
||
|
call: builtinFunction,
|
||
10 years ago
|
construct: builtinNewFunction,
|
||
|
},
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"prototype": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.FunctionPrototype,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
"prototype",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.Function = Function
|
||
|
runtime.global.FunctionPrototype.property["constructor"] =
|
||
10 years ago
|
_property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.Function,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
}
|
||
|
{
|
||
|
toString_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toString",
|
||
|
call: builtinArray_toString,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
toLocaleString_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toLocaleString",
|
||
|
call: builtinArray_toLocaleString,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
concat_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "concat",
|
||
|
call: builtinArray_concat,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
join_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "join",
|
||
|
call: builtinArray_join,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
splice_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 2,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "splice",
|
||
|
call: builtinArray_splice,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
shift_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "shift",
|
||
|
call: builtinArray_shift,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
pop_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "pop",
|
||
|
call: builtinArray_pop,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
push_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "push",
|
||
|
call: builtinArray_push,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
slice_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 2,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "slice",
|
||
|
call: builtinArray_slice,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
unshift_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "unshift",
|
||
|
call: builtinArray_unshift,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
reverse_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "reverse",
|
||
|
call: builtinArray_reverse,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
sort_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "sort",
|
||
|
call: builtinArray_sort,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
indexOf_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "indexOf",
|
||
|
call: builtinArray_indexOf,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
lastIndexOf_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "lastIndexOf",
|
||
|
call: builtinArray_lastIndexOf,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
every_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "every",
|
||
|
call: builtinArray_every,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
some_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "some",
|
||
|
call: builtinArray_some,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
forEach_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "forEach",
|
||
|
call: builtinArray_forEach,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
map_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "map",
|
||
|
call: builtinArray_map,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
filter_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "filter",
|
||
|
call: builtinArray_filter,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
reduce_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "reduce",
|
||
|
call: builtinArray_reduce,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
reduceRight_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "reduceRight",
|
||
|
call: builtinArray_reduceRight,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
isArray_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "isArray",
|
||
|
call: builtinArray_isArray,
|
||
10 years ago
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.ArrayPrototype = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "Array",
|
||
|
objectClass: _classArray,
|
||
10 years ago
|
prototype: runtime.global.ObjectPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
value: nil,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0100,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: uint32(0),
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"toString": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toString_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"toLocaleString": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toLocaleString_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"concat": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: concat_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"join": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: join_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"splice": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: splice_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"shift": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: shift_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"pop": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: pop_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"push": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: push_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"slice": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: slice_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"unshift": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: unshift_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"reverse": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: reverse_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"sort": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: sort_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"indexOf": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: indexOf_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"lastIndexOf": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: lastIndexOf_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"every": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: every_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"some": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: some_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"forEach": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: forEach_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"map": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: map_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"filter": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: filter_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"reduce": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: reduce_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"reduceRight": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: reduceRight_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
"toString",
|
||
|
"toLocaleString",
|
||
|
"concat",
|
||
|
"join",
|
||
|
"splice",
|
||
|
"shift",
|
||
|
"pop",
|
||
|
"push",
|
||
|
"slice",
|
||
|
"unshift",
|
||
|
"reverse",
|
||
|
"sort",
|
||
|
"indexOf",
|
||
|
"lastIndexOf",
|
||
|
"every",
|
||
|
"some",
|
||
|
"forEach",
|
||
|
"map",
|
||
|
"filter",
|
||
|
"reduce",
|
||
|
"reduceRight",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.Array = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "Array",
|
||
|
call: builtinArray,
|
||
10 years ago
|
construct: builtinNewArray,
|
||
|
},
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"prototype": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.ArrayPrototype,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"isArray": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: isArray_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
"prototype",
|
||
|
"isArray",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.ArrayPrototype.property["constructor"] =
|
||
10 years ago
|
_property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.Array,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
}
|
||
|
{
|
||
|
toString_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toString",
|
||
|
call: builtinString_toString,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
valueOf_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "valueOf",
|
||
|
call: builtinString_valueOf,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
charAt_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "charAt",
|
||
|
call: builtinString_charAt,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
charCodeAt_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "charCodeAt",
|
||
|
call: builtinString_charCodeAt,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
concat_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "concat",
|
||
|
call: builtinString_concat,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
indexOf_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "indexOf",
|
||
|
call: builtinString_indexOf,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
lastIndexOf_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "lastIndexOf",
|
||
|
call: builtinString_lastIndexOf,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
match_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "match",
|
||
|
call: builtinString_match,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
replace_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 2,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "replace",
|
||
|
call: builtinString_replace,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
search_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "search",
|
||
|
call: builtinString_search,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
split_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 2,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "split",
|
||
|
call: builtinString_split,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
slice_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 2,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "slice",
|
||
|
call: builtinString_slice,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
substring_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 2,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "substring",
|
||
|
call: builtinString_substring,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
toLowerCase_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toLowerCase",
|
||
|
call: builtinString_toLowerCase,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
toUpperCase_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toUpperCase",
|
||
|
call: builtinString_toUpperCase,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
substr_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 2,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "substr",
|
||
|
call: builtinString_substr,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
trim_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "trim",
|
||
|
call: builtinString_trim,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
trimLeft_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "trimLeft",
|
||
|
call: builtinString_trimLeft,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
trimRight_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "trimRight",
|
||
|
call: builtinString_trimRight,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
localeCompare_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "localeCompare",
|
||
|
call: builtinString_localeCompare,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
toLocaleLowerCase_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toLocaleLowerCase",
|
||
|
call: builtinString_toLocaleLowerCase,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
toLocaleUpperCase_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toLocaleUpperCase",
|
||
|
call: builtinString_toLocaleUpperCase,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
fromCharCode_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "fromCharCode",
|
||
|
call: builtinString_fromCharCode,
|
||
10 years ago
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.StringPrototype = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "String",
|
||
|
objectClass: _classString,
|
||
10 years ago
|
prototype: runtime.global.ObjectPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
value: prototypeValueString,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: int(0),
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"toString": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toString_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"valueOf": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: valueOf_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"charAt": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: charAt_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"charCodeAt": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: charCodeAt_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"concat": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: concat_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"indexOf": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: indexOf_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"lastIndexOf": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: lastIndexOf_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"match": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: match_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"replace": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: replace_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"search": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: search_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"split": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: split_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"slice": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: slice_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"substring": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: substring_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"toLowerCase": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toLowerCase_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"toUpperCase": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toUpperCase_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"substr": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: substr_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"trim": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: trim_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"trimLeft": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: trimLeft_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"trimRight": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: trimRight_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"localeCompare": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: localeCompare_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"toLocaleLowerCase": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toLocaleLowerCase_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"toLocaleUpperCase": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toLocaleUpperCase_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
"toString",
|
||
|
"valueOf",
|
||
|
"charAt",
|
||
|
"charCodeAt",
|
||
|
"concat",
|
||
|
"indexOf",
|
||
|
"lastIndexOf",
|
||
|
"match",
|
||
|
"replace",
|
||
|
"search",
|
||
|
"split",
|
||
|
"slice",
|
||
|
"substring",
|
||
|
"toLowerCase",
|
||
|
"toUpperCase",
|
||
|
"substr",
|
||
|
"trim",
|
||
|
"trimLeft",
|
||
|
"trimRight",
|
||
|
"localeCompare",
|
||
|
"toLocaleLowerCase",
|
||
|
"toLocaleUpperCase",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.String = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "String",
|
||
|
call: builtinString,
|
||
10 years ago
|
construct: builtinNewString,
|
||
|
},
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"prototype": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.StringPrototype,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"fromCharCode": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: fromCharCode_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
"prototype",
|
||
|
"fromCharCode",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.StringPrototype.property["constructor"] =
|
||
10 years ago
|
_property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.String,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
}
|
||
|
{
|
||
|
toString_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toString",
|
||
|
call: builtinBoolean_toString,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
valueOf_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "valueOf",
|
||
|
call: builtinBoolean_valueOf,
|
||
10 years ago
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.BooleanPrototype = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "Boolean",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.ObjectPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
value: prototypeValueBoolean,
|
||
|
property: map[string]_property{
|
||
|
"toString": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toString_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"valueOf": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: valueOf_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"toString",
|
||
|
"valueOf",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.Boolean = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "Boolean",
|
||
|
call: builtinBoolean,
|
||
10 years ago
|
construct: builtinNewBoolean,
|
||
|
},
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"prototype": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.BooleanPrototype,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
"prototype",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.BooleanPrototype.property["constructor"] =
|
||
10 years ago
|
_property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.Boolean,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
}
|
||
|
{
|
||
|
toString_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toString",
|
||
|
call: builtinNumber_toString,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
valueOf_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "valueOf",
|
||
|
call: builtinNumber_valueOf,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
toFixed_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toFixed",
|
||
|
call: builtinNumber_toFixed,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
toExponential_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toExponential",
|
||
|
call: builtinNumber_toExponential,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
toPrecision_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toPrecision",
|
||
|
call: builtinNumber_toPrecision,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
toLocaleString_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toLocaleString",
|
||
|
call: builtinNumber_toLocaleString,
|
||
10 years ago
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.NumberPrototype = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "Number",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.ObjectPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
value: prototypeValueNumber,
|
||
|
property: map[string]_property{
|
||
|
"toString": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toString_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"valueOf": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: valueOf_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"toFixed": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toFixed_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"toExponential": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toExponential_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"toPrecision": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toPrecision_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"toLocaleString": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toLocaleString_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"toString",
|
||
|
"valueOf",
|
||
|
"toFixed",
|
||
|
"toExponential",
|
||
|
"toPrecision",
|
||
|
"toLocaleString",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.Number = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "Number",
|
||
|
call: builtinNumber,
|
||
10 years ago
|
construct: builtinNewNumber,
|
||
|
},
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"prototype": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.NumberPrototype,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"MAX_VALUE": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: math.MaxFloat64,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"MIN_VALUE": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: math.SmallestNonzeroFloat64,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"NaN": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: math.NaN(),
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"NEGATIVE_INFINITY": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: math.Inf(-1),
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"POSITIVE_INFINITY": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: math.Inf(+1),
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
"prototype",
|
||
|
"MAX_VALUE",
|
||
|
"MIN_VALUE",
|
||
|
"NaN",
|
||
|
"NEGATIVE_INFINITY",
|
||
|
"POSITIVE_INFINITY",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.NumberPrototype.property["constructor"] =
|
||
10 years ago
|
_property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.Number,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
}
|
||
|
{
|
||
|
abs_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "abs",
|
||
|
call: builtinMath_abs,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
acos_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "acos",
|
||
|
call: builtinMath_acos,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
asin_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "asin",
|
||
|
call: builtinMath_asin,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
atan_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "atan",
|
||
|
call: builtinMath_atan,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
atan2_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "atan2",
|
||
|
call: builtinMath_atan2,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
ceil_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "ceil",
|
||
|
call: builtinMath_ceil,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
cos_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "cos",
|
||
|
call: builtinMath_cos,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
exp_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "exp",
|
||
|
call: builtinMath_exp,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
floor_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "floor",
|
||
|
call: builtinMath_floor,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
log_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "log",
|
||
|
call: builtinMath_log,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
max_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 2,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "max",
|
||
|
call: builtinMath_max,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
min_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 2,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "min",
|
||
|
call: builtinMath_min,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
pow_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 2,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "pow",
|
||
|
call: builtinMath_pow,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
random_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "random",
|
||
|
call: builtinMath_random,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
round_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "round",
|
||
|
call: builtinMath_round,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
sin_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "sin",
|
||
|
call: builtinMath_sin,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
sqrt_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "sqrt",
|
||
|
call: builtinMath_sqrt,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
tan_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "tan",
|
||
|
call: builtinMath_tan,
|
||
10 years ago
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.Math = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "Math",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.ObjectPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"abs": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: abs_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"acos": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: acos_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"asin": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: asin_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"atan": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: atan_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"atan2": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: atan2_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"ceil": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: ceil_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"cos": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: cos_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"exp": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: exp_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"floor": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: floor_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"log": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: log_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"max": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: max_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"min": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: min_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"pow": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: pow_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"random": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: random_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"round": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: round_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"sin": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: sin_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"sqrt": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: sqrt_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"tan": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: tan_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"E": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: math.E,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"LN10": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: math.Ln10,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"LN2": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: math.Ln2,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"LOG2E": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: math.Log2E,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"LOG10E": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: math.Log10E,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"PI": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: math.Pi,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"SQRT1_2": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: sqrt1_2,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"SQRT2": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: math.Sqrt2,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"abs",
|
||
|
"acos",
|
||
|
"asin",
|
||
|
"atan",
|
||
|
"atan2",
|
||
|
"ceil",
|
||
|
"cos",
|
||
|
"exp",
|
||
|
"floor",
|
||
|
"log",
|
||
|
"max",
|
||
|
"min",
|
||
|
"pow",
|
||
|
"random",
|
||
|
"round",
|
||
|
"sin",
|
||
|
"sqrt",
|
||
|
"tan",
|
||
|
"E",
|
||
|
"LN10",
|
||
|
"LN2",
|
||
|
"LOG2E",
|
||
|
"LOG10E",
|
||
|
"PI",
|
||
|
"SQRT1_2",
|
||
|
"SQRT2",
|
||
|
},
|
||
|
}
|
||
|
}
|
||
|
{
|
||
|
toString_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toString",
|
||
|
call: builtinDate_toString,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
toDateString_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toDateString",
|
||
|
call: builtinDate_toDateString,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
toTimeString_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toTimeString",
|
||
|
call: builtinDate_toTimeString,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
toUTCString_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toUTCString",
|
||
|
call: builtinDate_toUTCString,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
toISOString_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toISOString",
|
||
|
call: builtinDate_toISOString,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
toJSON_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toJSON",
|
||
|
call: builtinDate_toJSON,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
toGMTString_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toGMTString",
|
||
|
call: builtinDate_toGMTString,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
toLocaleString_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toLocaleString",
|
||
|
call: builtinDate_toLocaleString,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
toLocaleDateString_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toLocaleDateString",
|
||
|
call: builtinDate_toLocaleDateString,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
toLocaleTimeString_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toLocaleTimeString",
|
||
|
call: builtinDate_toLocaleTimeString,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
valueOf_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "valueOf",
|
||
|
call: builtinDate_valueOf,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
getTime_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "getTime",
|
||
|
call: builtinDate_getTime,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
getYear_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "getYear",
|
||
|
call: builtinDate_getYear,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
getFullYear_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "getFullYear",
|
||
|
call: builtinDate_getFullYear,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
getUTCFullYear_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "getUTCFullYear",
|
||
|
call: builtinDate_getUTCFullYear,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
getMonth_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "getMonth",
|
||
|
call: builtinDate_getMonth,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
getUTCMonth_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "getUTCMonth",
|
||
|
call: builtinDate_getUTCMonth,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
getDate_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "getDate",
|
||
|
call: builtinDate_getDate,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
getUTCDate_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "getUTCDate",
|
||
|
call: builtinDate_getUTCDate,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
getDay_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "getDay",
|
||
|
call: builtinDate_getDay,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
getUTCDay_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "getUTCDay",
|
||
|
call: builtinDate_getUTCDay,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
getHours_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "getHours",
|
||
|
call: builtinDate_getHours,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
getUTCHours_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "getUTCHours",
|
||
|
call: builtinDate_getUTCHours,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
getMinutes_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "getMinutes",
|
||
|
call: builtinDate_getMinutes,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
getUTCMinutes_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "getUTCMinutes",
|
||
|
call: builtinDate_getUTCMinutes,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
getSeconds_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "getSeconds",
|
||
|
call: builtinDate_getSeconds,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
getUTCSeconds_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "getUTCSeconds",
|
||
|
call: builtinDate_getUTCSeconds,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
getMilliseconds_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "getMilliseconds",
|
||
|
call: builtinDate_getMilliseconds,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
getUTCMilliseconds_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "getUTCMilliseconds",
|
||
|
call: builtinDate_getUTCMilliseconds,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
getTimezoneOffset_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "getTimezoneOffset",
|
||
|
call: builtinDate_getTimezoneOffset,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
setTime_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "setTime",
|
||
|
call: builtinDate_setTime,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
setMilliseconds_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "setMilliseconds",
|
||
|
call: builtinDate_setMilliseconds,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
setUTCMilliseconds_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "setUTCMilliseconds",
|
||
|
call: builtinDate_setUTCMilliseconds,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
setSeconds_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 2,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "setSeconds",
|
||
|
call: builtinDate_setSeconds,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
setUTCSeconds_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 2,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "setUTCSeconds",
|
||
|
call: builtinDate_setUTCSeconds,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
setMinutes_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 3,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "setMinutes",
|
||
|
call: builtinDate_setMinutes,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
setUTCMinutes_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 3,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "setUTCMinutes",
|
||
|
call: builtinDate_setUTCMinutes,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
setHours_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 4,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "setHours",
|
||
|
call: builtinDate_setHours,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
setUTCHours_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 4,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "setUTCHours",
|
||
|
call: builtinDate_setUTCHours,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
setDate_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "setDate",
|
||
|
call: builtinDate_setDate,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
setUTCDate_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "setUTCDate",
|
||
|
call: builtinDate_setUTCDate,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
setMonth_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 2,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "setMonth",
|
||
|
call: builtinDate_setMonth,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
setUTCMonth_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 2,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "setUTCMonth",
|
||
|
call: builtinDate_setUTCMonth,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
setYear_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "setYear",
|
||
|
call: builtinDate_setYear,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
setFullYear_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 3,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "setFullYear",
|
||
|
call: builtinDate_setFullYear,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
setUTCFullYear_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 3,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "setUTCFullYear",
|
||
|
call: builtinDate_setUTCFullYear,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
parse_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "parse",
|
||
|
call: builtinDate_parse,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
UTC_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 7,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "UTC",
|
||
|
call: builtinDate_UTC,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
now_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "now",
|
||
|
call: builtinDate_now,
|
||
10 years ago
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.DatePrototype = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "Date",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.ObjectPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
value: prototypeValueDate,
|
||
|
property: map[string]_property{
|
||
|
"toString": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toString_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"toDateString": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toDateString_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"toTimeString": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toTimeString_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"toUTCString": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toUTCString_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"toISOString": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toISOString_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"toJSON": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toJSON_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"toGMTString": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toGMTString_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"toLocaleString": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toLocaleString_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"toLocaleDateString": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toLocaleDateString_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"toLocaleTimeString": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toLocaleTimeString_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"valueOf": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: valueOf_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"getTime": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: getTime_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"getYear": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: getYear_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"getFullYear": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: getFullYear_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"getUTCFullYear": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: getUTCFullYear_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"getMonth": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: getMonth_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"getUTCMonth": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: getUTCMonth_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"getDate": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: getDate_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"getUTCDate": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: getUTCDate_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"getDay": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: getDay_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"getUTCDay": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: getUTCDay_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"getHours": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: getHours_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"getUTCHours": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: getUTCHours_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"getMinutes": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: getMinutes_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"getUTCMinutes": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: getUTCMinutes_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"getSeconds": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: getSeconds_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"getUTCSeconds": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: getUTCSeconds_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"getMilliseconds": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: getMilliseconds_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"getUTCMilliseconds": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: getUTCMilliseconds_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"getTimezoneOffset": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: getTimezoneOffset_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"setTime": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: setTime_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"setMilliseconds": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: setMilliseconds_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"setUTCMilliseconds": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: setUTCMilliseconds_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"setSeconds": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: setSeconds_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"setUTCSeconds": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: setUTCSeconds_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"setMinutes": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: setMinutes_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"setUTCMinutes": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: setUTCMinutes_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"setHours": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: setHours_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"setUTCHours": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: setUTCHours_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"setDate": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: setDate_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"setUTCDate": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: setUTCDate_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"setMonth": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: setMonth_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"setUTCMonth": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: setUTCMonth_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"setYear": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: setYear_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"setFullYear": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: setFullYear_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"setUTCFullYear": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: setUTCFullYear_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"toString",
|
||
|
"toDateString",
|
||
|
"toTimeString",
|
||
|
"toUTCString",
|
||
|
"toISOString",
|
||
|
"toJSON",
|
||
|
"toGMTString",
|
||
|
"toLocaleString",
|
||
|
"toLocaleDateString",
|
||
|
"toLocaleTimeString",
|
||
|
"valueOf",
|
||
|
"getTime",
|
||
|
"getYear",
|
||
|
"getFullYear",
|
||
|
"getUTCFullYear",
|
||
|
"getMonth",
|
||
|
"getUTCMonth",
|
||
|
"getDate",
|
||
|
"getUTCDate",
|
||
|
"getDay",
|
||
|
"getUTCDay",
|
||
|
"getHours",
|
||
|
"getUTCHours",
|
||
|
"getMinutes",
|
||
|
"getUTCMinutes",
|
||
|
"getSeconds",
|
||
|
"getUTCSeconds",
|
||
|
"getMilliseconds",
|
||
|
"getUTCMilliseconds",
|
||
|
"getTimezoneOffset",
|
||
|
"setTime",
|
||
|
"setMilliseconds",
|
||
|
"setUTCMilliseconds",
|
||
|
"setSeconds",
|
||
|
"setUTCSeconds",
|
||
|
"setMinutes",
|
||
|
"setUTCMinutes",
|
||
|
"setHours",
|
||
|
"setUTCHours",
|
||
|
"setDate",
|
||
|
"setUTCDate",
|
||
|
"setMonth",
|
||
|
"setUTCMonth",
|
||
|
"setYear",
|
||
|
"setFullYear",
|
||
|
"setUTCFullYear",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.Date = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "Date",
|
||
|
call: builtinDate,
|
||
10 years ago
|
construct: builtinNewDate,
|
||
|
},
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 7,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"prototype": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.DatePrototype,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"parse": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: parse_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"UTC": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: UTC_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"now": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: now_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
"prototype",
|
||
|
"parse",
|
||
|
"UTC",
|
||
|
"now",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.DatePrototype.property["constructor"] =
|
||
10 years ago
|
_property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.Date,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
}
|
||
|
{
|
||
|
toString_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toString",
|
||
|
call: builtinRegExp_toString,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
exec_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "exec",
|
||
|
call: builtinRegExp_exec,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
test_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "test",
|
||
|
call: builtinRegExp_test,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
compile_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "compile",
|
||
|
call: builtinRegExp_compile,
|
||
10 years ago
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.RegExpPrototype = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "RegExp",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.ObjectPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
value: prototypeValueRegExp,
|
||
|
property: map[string]_property{
|
||
|
"toString": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toString_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"exec": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: exec_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"test": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: test_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"compile": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: compile_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"toString",
|
||
|
"exec",
|
||
|
"test",
|
||
|
"compile",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.RegExp = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "RegExp",
|
||
|
call: builtinRegExp,
|
||
10 years ago
|
construct: builtinNewRegExp,
|
||
|
},
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 2,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"prototype": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.RegExpPrototype,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
"prototype",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.RegExpPrototype.property["constructor"] =
|
||
10 years ago
|
_property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.RegExp,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
}
|
||
|
{
|
||
|
toString_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "toString",
|
||
|
call: builtinError_toString,
|
||
10 years ago
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.ErrorPrototype = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "Error",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.ObjectPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
value: nil,
|
||
|
property: map[string]_property{
|
||
|
"toString": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: toString_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"name": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueString,
|
||
|
value: "Error",
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"message": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueString,
|
||
|
value: "",
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"toString",
|
||
|
"name",
|
||
|
"message",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.Error = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "Error",
|
||
|
call: builtinError,
|
||
10 years ago
|
construct: builtinNewError,
|
||
|
},
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"prototype": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.ErrorPrototype,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
"prototype",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.ErrorPrototype.property["constructor"] =
|
||
10 years ago
|
_property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.Error,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
}
|
||
|
{
|
||
10 years ago
|
runtime.global.EvalErrorPrototype = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "EvalError",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.ErrorPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
value: nil,
|
||
|
property: map[string]_property{
|
||
|
"name": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueString,
|
||
|
value: "EvalError",
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"name",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.EvalError = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "EvalError",
|
||
|
call: builtinEvalError,
|
||
10 years ago
|
construct: builtinNewEvalError,
|
||
|
},
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"prototype": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.EvalErrorPrototype,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
"prototype",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.EvalErrorPrototype.property["constructor"] =
|
||
10 years ago
|
_property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.EvalError,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
}
|
||
|
{
|
||
10 years ago
|
runtime.global.TypeErrorPrototype = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "TypeError",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.ErrorPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
value: nil,
|
||
|
property: map[string]_property{
|
||
|
"name": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueString,
|
||
|
value: "TypeError",
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"name",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.TypeError = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "TypeError",
|
||
|
call: builtinTypeError,
|
||
10 years ago
|
construct: builtinNewTypeError,
|
||
|
},
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"prototype": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.TypeErrorPrototype,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
"prototype",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.TypeErrorPrototype.property["constructor"] =
|
||
10 years ago
|
_property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.TypeError,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
}
|
||
|
{
|
||
10 years ago
|
runtime.global.RangeErrorPrototype = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "RangeError",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.ErrorPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
value: nil,
|
||
|
property: map[string]_property{
|
||
|
"name": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueString,
|
||
|
value: "RangeError",
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"name",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.RangeError = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "RangeError",
|
||
|
call: builtinRangeError,
|
||
10 years ago
|
construct: builtinNewRangeError,
|
||
|
},
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"prototype": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.RangeErrorPrototype,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
"prototype",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.RangeErrorPrototype.property["constructor"] =
|
||
10 years ago
|
_property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.RangeError,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
}
|
||
|
{
|
||
10 years ago
|
runtime.global.ReferenceErrorPrototype = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "ReferenceError",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.ErrorPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
value: nil,
|
||
|
property: map[string]_property{
|
||
|
"name": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueString,
|
||
|
value: "ReferenceError",
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"name",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.ReferenceError = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "ReferenceError",
|
||
|
call: builtinReferenceError,
|
||
10 years ago
|
construct: builtinNewReferenceError,
|
||
|
},
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"prototype": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.ReferenceErrorPrototype,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
"prototype",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.ReferenceErrorPrototype.property["constructor"] =
|
||
10 years ago
|
_property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.ReferenceError,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
}
|
||
|
{
|
||
10 years ago
|
runtime.global.SyntaxErrorPrototype = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "SyntaxError",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.ErrorPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
value: nil,
|
||
|
property: map[string]_property{
|
||
|
"name": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueString,
|
||
|
value: "SyntaxError",
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"name",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.SyntaxError = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "SyntaxError",
|
||
|
call: builtinSyntaxError,
|
||
10 years ago
|
construct: builtinNewSyntaxError,
|
||
|
},
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"prototype": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.SyntaxErrorPrototype,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
"prototype",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.SyntaxErrorPrototype.property["constructor"] =
|
||
10 years ago
|
_property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.SyntaxError,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
}
|
||
|
{
|
||
10 years ago
|
runtime.global.URIErrorPrototype = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "URIError",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.ErrorPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
value: nil,
|
||
|
property: map[string]_property{
|
||
|
"name": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueString,
|
||
|
value: "URIError",
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"name",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.URIError = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "URIError",
|
||
|
call: builtinURIError,
|
||
10 years ago
|
construct: builtinNewURIError,
|
||
|
},
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"prototype": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.URIErrorPrototype,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
"prototype",
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.URIErrorPrototype.property["constructor"] =
|
||
10 years ago
|
_property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.URIError,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
}
|
||
|
{
|
||
|
parse_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 2,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "parse",
|
||
|
call: builtinJSON_parse,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
stringify_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 3,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "stringify",
|
||
|
call: builtinJSON_stringify,
|
||
10 years ago
|
},
|
||
|
}
|
||
10 years ago
|
runtime.global.JSON = &_object{
|
||
10 years ago
|
runtime: runtime,
|
||
|
class: "JSON",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.ObjectPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"parse": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: parse_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"stringify": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: stringify_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"parse",
|
||
|
"stringify",
|
||
|
},
|
||
|
}
|
||
|
}
|
||
|
{
|
||
|
eval_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "eval",
|
||
|
call: builtinGlobal_eval,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
parseInt_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 2,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "parseInt",
|
||
|
call: builtinGlobal_parseInt,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
parseFloat_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "parseFloat",
|
||
|
call: builtinGlobal_parseFloat,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
isNaN_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "isNaN",
|
||
|
call: builtinGlobal_isNaN,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
isFinite_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "isFinite",
|
||
|
call: builtinGlobal_isFinite,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
decodeURI_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "decodeURI",
|
||
|
call: builtinGlobal_decodeURI,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
decodeURIComponent_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "decodeURIComponent",
|
||
|
call: builtinGlobal_decodeURIComponent,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
encodeURI_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "encodeURI",
|
||
|
call: builtinGlobal_encodeURI,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
encodeURIComponent_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "encodeURIComponent",
|
||
|
call: builtinGlobal_encodeURIComponent,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
escape_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "escape",
|
||
|
call: builtinGlobal_escape,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
unescape_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 1,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "unescape",
|
||
|
call: builtinGlobal_unescape,
|
||
10 years ago
|
},
|
||
|
}
|
||
10 years ago
|
runtime.globalObject.property = map[string]_property{
|
||
10 years ago
|
"eval": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: eval_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"parseInt": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: parseInt_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"parseFloat": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: parseFloat_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"isNaN": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: isNaN_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"isFinite": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: isFinite_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"decodeURI": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: decodeURI_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"decodeURIComponent": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: decodeURIComponent_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"encodeURI": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: encodeURI_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"encodeURIComponent": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: encodeURIComponent_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"escape": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: escape_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"unescape": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: unescape_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"Object": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.Object,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"Function": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.Function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"Array": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.Array,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"String": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.String,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"Boolean": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.Boolean,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"Number": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.Number,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"Math": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.Math,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"Date": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.Date,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"RegExp": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.RegExp,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"Error": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.Error,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"EvalError": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.EvalError,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"TypeError": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.TypeError,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"RangeError": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.RangeError,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"ReferenceError": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.ReferenceError,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"SyntaxError": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.SyntaxError,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"URIError": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.URIError,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"JSON": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: runtime.global.JSON,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"undefined": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueUndefined,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"NaN": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: math.NaN(),
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"Infinity": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: math.Inf(+1),
|
||
10 years ago
|
},
|
||
|
},
|
||
|
}
|
||
10 years ago
|
runtime.globalObject.propertyOrder = []string{
|
||
10 years ago
|
"eval",
|
||
|
"parseInt",
|
||
|
"parseFloat",
|
||
|
"isNaN",
|
||
|
"isFinite",
|
||
|
"decodeURI",
|
||
|
"decodeURIComponent",
|
||
|
"encodeURI",
|
||
|
"encodeURIComponent",
|
||
|
"escape",
|
||
|
"unescape",
|
||
|
"Object",
|
||
|
"Function",
|
||
|
"Array",
|
||
|
"String",
|
||
|
"Boolean",
|
||
|
"Number",
|
||
|
"Math",
|
||
|
"Date",
|
||
|
"RegExp",
|
||
|
"Error",
|
||
|
"EvalError",
|
||
|
"TypeError",
|
||
|
"RangeError",
|
||
|
"ReferenceError",
|
||
|
"SyntaxError",
|
||
|
"URIError",
|
||
|
"JSON",
|
||
|
"undefined",
|
||
|
"NaN",
|
||
|
"Infinity",
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func newConsoleObject(runtime *_runtime) *_object {
|
||
|
{
|
||
|
log_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "log",
|
||
|
call: builtinConsole_log,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
debug_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "debug",
|
||
|
call: builtinConsole_log,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
info_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "info",
|
||
|
call: builtinConsole_log,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
error_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "error",
|
||
|
call: builtinConsole_error,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
warn_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "warn",
|
||
|
call: builtinConsole_error,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
dir_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "dir",
|
||
|
call: builtinConsole_dir,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
time_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "time",
|
||
|
call: builtinConsole_time,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
timeEnd_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "timeEnd",
|
||
|
call: builtinConsole_timeEnd,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
trace_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "trace",
|
||
|
call: builtinConsole_trace,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
assert_function := &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Function",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.FunctionPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"length": _property{
|
||
|
mode: 0,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: 0,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"length",
|
||
|
},
|
||
10 years ago
|
value: _nativeFunctionObject{
|
||
|
name: "assert",
|
||
|
call: builtinConsole_assert,
|
||
10 years ago
|
},
|
||
|
}
|
||
|
return &_object{
|
||
|
runtime: runtime,
|
||
|
class: "Object",
|
||
|
objectClass: _classObject,
|
||
10 years ago
|
prototype: runtime.global.ObjectPrototype,
|
||
10 years ago
|
extensible: true,
|
||
|
property: map[string]_property{
|
||
|
"log": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: log_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"debug": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: debug_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"info": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: info_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"error": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: error_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"warn": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: warn_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"dir": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: dir_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"time": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: time_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"timeEnd": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: timeEnd_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"trace": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: trace_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
"assert": _property{
|
||
|
mode: 0101,
|
||
|
value: Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: assert_function,
|
||
10 years ago
|
},
|
||
|
},
|
||
|
},
|
||
|
propertyOrder: []string{
|
||
|
"log",
|
||
|
"debug",
|
||
|
"info",
|
||
|
"error",
|
||
|
"warn",
|
||
|
"dir",
|
||
|
"time",
|
||
|
"timeEnd",
|
||
|
"trace",
|
||
|
"assert",
|
||
|
},
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func toValue_int(value int) Value {
|
||
|
return Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: value,
|
||
10 years ago
|
}
|
||
|
}
|
||
|
|
||
|
func toValue_int8(value int8) Value {
|
||
|
return Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: value,
|
||
10 years ago
|
}
|
||
|
}
|
||
|
|
||
|
func toValue_int16(value int16) Value {
|
||
|
return Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: value,
|
||
10 years ago
|
}
|
||
|
}
|
||
|
|
||
|
func toValue_int32(value int32) Value {
|
||
|
return Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: value,
|
||
10 years ago
|
}
|
||
|
}
|
||
|
|
||
|
func toValue_int64(value int64) Value {
|
||
|
return Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: value,
|
||
10 years ago
|
}
|
||
|
}
|
||
|
|
||
|
func toValue_uint(value uint) Value {
|
||
|
return Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: value,
|
||
10 years ago
|
}
|
||
|
}
|
||
|
|
||
|
func toValue_uint8(value uint8) Value {
|
||
|
return Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: value,
|
||
10 years ago
|
}
|
||
|
}
|
||
|
|
||
|
func toValue_uint16(value uint16) Value {
|
||
|
return Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: value,
|
||
10 years ago
|
}
|
||
|
}
|
||
|
|
||
|
func toValue_uint32(value uint32) Value {
|
||
|
return Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: value,
|
||
10 years ago
|
}
|
||
|
}
|
||
|
|
||
|
func toValue_uint64(value uint64) Value {
|
||
|
return Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: value,
|
||
10 years ago
|
}
|
||
|
}
|
||
|
|
||
|
func toValue_float32(value float32) Value {
|
||
|
return Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: value,
|
||
10 years ago
|
}
|
||
|
}
|
||
|
|
||
|
func toValue_float64(value float64) Value {
|
||
|
return Value{
|
||
10 years ago
|
kind: valueNumber,
|
||
|
value: value,
|
||
10 years ago
|
}
|
||
|
}
|
||
|
|
||
|
func toValue_string(value string) Value {
|
||
|
return Value{
|
||
10 years ago
|
kind: valueString,
|
||
|
value: value,
|
||
10 years ago
|
}
|
||
|
}
|
||
|
|
||
|
func toValue_string16(value []uint16) Value {
|
||
|
return Value{
|
||
10 years ago
|
kind: valueString,
|
||
|
value: value,
|
||
10 years ago
|
}
|
||
|
}
|
||
|
|
||
|
func toValue_bool(value bool) Value {
|
||
|
return Value{
|
||
10 years ago
|
kind: valueBoolean,
|
||
|
value: value,
|
||
10 years ago
|
}
|
||
|
}
|
||
|
|
||
|
func toValue_object(value *_object) Value {
|
||
|
return Value{
|
||
10 years ago
|
kind: valueObject,
|
||
|
value: value,
|
||
10 years ago
|
}
|
||
|
}
|