(prototype *Object)
| 7 | ) |
| 8 | |
| 9 | func (r *Runtime) newArray(prototype *Object) (a *arrayObject) { |
| 10 | v := &Object{runtime: r} |
| 11 | |
| 12 | a = &arrayObject{} |
| 13 | a.class = classArray |
| 14 | a.val = v |
| 15 | a.extensible = true |
| 16 | v.self = a |
| 17 | a.prototype = prototype |
| 18 | a.init() |
| 19 | return |
| 20 | } |
| 21 | |
| 22 | func (r *Runtime) newArrayObject() *arrayObject { |
| 23 | return r.newArray(r.getArrayPrototype()) |