Lines Matching full:reflect
12 "reflect"
17 type encHelper func(state *encoderState, v reflect.Value) bool
121 type encOp func(i *encInstr, state *encoderState, v reflect.Value)
150 func encIndirect(pv reflect.Value, indir int) reflect.Value {
161 func encBool(i *encInstr, state *encoderState, v reflect.Value) {
174 func encInt(i *encInstr, state *encoderState, v reflect.Value) {
183 func encUint(i *encInstr, state *encoderState, v reflect.Value) {
209 func encFloat(i *encInstr, state *encoderState, v reflect.Value) {
220 func encComplex(i *encInstr, state *encoderState, v reflect.Value) {
233 func encUint8Array(i *encInstr, state *encoderState, v reflect.Value) {
244 func encString(i *encInstr, state *encoderState, v reflect.Value) {
255 func encStructTerminator(i *encInstr, state *encoderState, v reflect.Value) {
271 func valid(v reflect.Value) bool {
273 case reflect.Invalid:
275 case reflect.Ptr:
282 func (enc *Encoder) encodeSingle(b *encBuffer, engine *encEngine, value reflect.Value) {
299 func (enc *Encoder) encodeStruct(b *encBuffer, engine *encEngine, value reflect.Value) {
310 instr.op(instr, state, reflect.Value{})
326 func (enc *Encoder) encodeArray(b *encBuffer, value reflect.Value, op encOp, elemIndir int, length int, helper encHelper) {
349 func encodeReflectValue(state *encoderState, v reflect.Value, op encOp, indir int) {
351 v = reflect.Indirect(v)
360 func (enc *Encoder) encodeMap(b *encBuffer, mv reflect.Value, keyOp, elemOp encOp, keyIndir, elemIndir int) {
378 func (enc *Encoder) encodeInterface(b *encBuffer, iv reflect.Value) {
382 if elem.Kind() == reflect.Ptr && elem.IsNil() {
425 func isZero(val reflect.Value) bool {
427 case reflect.Array:
434 case reflect.Map, reflect.Slice, reflect.String:
436 case reflect.Bool:
438 case reflect.Complex64, reflect.Complex128:
440 case reflect.Chan, reflect.Func, reflect.Interface, reflect.Ptr:
442 case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
444 case reflect.Float32, reflect.Float64:
446 case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
448 case reflect.Struct:
461 func (enc *Encoder) encodeGobEncoder(b *encBuffer, ut *userTypeInfo, v reflect.Value) {
486 reflect.Bool: encBool,
487 reflect.Int: encInt,
488 reflect.Int8: encInt,
489 reflect.Int16: encInt,
490 reflect.Int32: encInt,
491 reflect.Int64: encInt,
492 reflect.Uint: encUint,
493 reflect.Uint8: encUint,
494 reflect.Uint16: encUint,
495 reflect.Uint32: encUint,
496 reflect.Uint64: encUint,
497 reflect.Uintptr: encUint,
498 reflect.Float32: encFloat,
499 reflect.Float64: encFloat,
500 reflect.Complex64: encComplex,
501 reflect.Complex128: encComplex,
502 reflect.String: encString,
507 func encOpFor(rt reflect.Type, inProgress map[reflect.Type]*encOp, building map[*typeInfo]bool) (*encOp, int) {
529 case reflect.Slice:
530 if t.Elem().Kind() == reflect.Uint8 {
537 op = func(i *encInstr, state *encoderState, slice reflect.Value) {
544 case reflect.Array:
548 op = func(i *encInstr, state *encoderState, array reflect.Value) {
552 case reflect.Map:
555 op = func(i *encInstr, state *encoderState, mv reflect.Value) {
564 case reflect.Struct:
568 op = func(i *encInstr, state *encoderState, sv reflect.Value) {
574 case reflect.Interface:
575 op = func(i *encInstr, state *encoderState, iv reflect.Value) {
594 rt = reflect.PtrTo(rt)
601 op = func(i *encInstr, state *encoderState, v reflect.Value) {
622 seen := make(map[reflect.Type]*encOp)
627 if ut.externalEnc == 0 && srt.Kind() == reflect.Struct {
681 func (enc *Encoder) encode(b *encBuffer, value reflect.Value, ut *userTypeInfo) {
689 value = reflect.Indirect(value)
691 if ut.externalEnc == 0 && value.Type().Kind() == reflect.Struct {