go-ethereum/vendor/github.com/robertkrimen/otto/inline.go

6650 lines
134 KiB
Go
Raw Normal View History

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