Debian Codegraph @

tools/gen-jscore/templates/function.tmpl

raw
1 &object{
2 runtime: rt,
3 class: classFunctionName,
4 objectClass: classObject,
5 prototype: rt.global.FunctionPrototype,
6 extensible: true,
7 property: map[string]property{
8 propertyLength: {
9 mode: 0,
10 value: Value{
11 kind: valueNumber,
12 value: {{if eq .Property.Function -1}}0{{else}}{{.Property.Function}}{{end}},
13 },
14 },
15 propertyName: {
16 mode: 0,
17 value: Value{
18 kind: valueString,
19 value: "{{.Property.Name}}",
20 },
21 },
22 },
23 propertyOrder: []string{
24 propertyLength,
25 propertyName,
26 },
27 value: nativeFunctionObject{
28 name: {{template "name.tmpl" .Property.Name}},
29 call: builtin{{if .Property.Call}}{{.Property.Call}}{{else}}{{.Name}}{{.Property.Name | ucfirst}}{{end}},
30 },
31 }{{/* No newline. */ -}}