(ctx *objectExportCtx)
| 493 | } |
| 494 | |
| 495 | func (a *arrayObject) export(ctx *objectExportCtx) interface{} { |
| 496 | if v, exists := ctx.get(a.val); exists { |
| 497 | return v |
| 498 | } |
| 499 | arr := make([]interface{}, a.length) |
| 500 | ctx.put(a.val, arr) |
| 501 | if a.propValueCount == 0 && a.length == uint32(len(a.values)) && uint32(a.objCount) == a.length { |
| 502 | for i, v := range a.values { |
| 503 | if v != nil { |
| 504 | arr[i] = exportValue(v, ctx) |
| 505 | } |
| 506 | } |
| 507 | } else { |
| 508 | for i := uint32(0); i < a.length; i++ { |
| 509 | v := a.getIdx(valueInt(i), nil) |
| 510 | if v != nil { |
| 511 | arr[i] = exportValue(v, ctx) |
| 512 | } |
| 513 | } |
| 514 | } |
| 515 | return arr |
| 516 | } |
| 517 | |
| 518 | func (a *arrayObject) exportType() reflect.Type { |
| 519 | return reflectTypeArray |
nothing calls this directly
no test coverage detected