| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
package stdlib |
| 7 |
|
| 8 |
import ( |
| 9 |
"encoding/binary" |
| 10 |
"go/constant" |
| 11 |
"go/token" |
| 12 |
"reflect" |
| 13 |
) |
| 14 |
|
| 15 |
func init() { |
| 16 |
Symbols["encoding/binary/binary"] = map[string]reflect.Value{ |
| 17 |
|
| 18 |
"AppendUvarint": reflect.ValueOf(binary.AppendUvarint), |
| 19 |
"AppendVarint": reflect.ValueOf(binary.AppendVarint), |
| 20 |
"BigEndian": reflect.ValueOf(&binary.BigEndian).Elem(), |
| 21 |
"LittleEndian": reflect.ValueOf(&binary.LittleEndian).Elem(), |
| 22 |
"MaxVarintLen16": reflect.ValueOf(constant.MakeFromLiteral("3", token.INT, 0)), |
| 23 |
"MaxVarintLen32": reflect.ValueOf(constant.MakeFromLiteral("5", token.INT, 0)), |
| 24 |
"MaxVarintLen64": reflect.ValueOf(constant.MakeFromLiteral("10", token.INT, 0)), |
| 25 |
"NativeEndian": reflect.ValueOf(&binary.NativeEndian).Elem(), |
| 26 |
"PutUvarint": reflect.ValueOf(binary.PutUvarint), |
| 27 |
"PutVarint": reflect.ValueOf(binary.PutVarint), |
| 28 |
"Read": reflect.ValueOf(binary.Read), |
| 29 |
"ReadUvarint": reflect.ValueOf(binary.ReadUvarint), |
| 30 |
"ReadVarint": reflect.ValueOf(binary.ReadVarint), |
| 31 |
"Size": reflect.ValueOf(binary.Size), |
| 32 |
"Uvarint": reflect.ValueOf(binary.Uvarint), |
| 33 |
"Varint": reflect.ValueOf(binary.Varint), |
| 34 |
"Write": reflect.ValueOf(binary.Write), |
| 35 |
|
| 36 |
|
| 37 |
"AppendByteOrder": reflect.ValueOf((*binary.AppendByteOrder)(nil)), |
| 38 |
"ByteOrder": reflect.ValueOf((*binary.ByteOrder)(nil)), |
| 39 |
|
| 40 |
|
| 41 |
"_AppendByteOrder": reflect.ValueOf((*_encoding_binary_AppendByteOrder)(nil)), |
| 42 |
"_ByteOrder": reflect.ValueOf((*_encoding_binary_ByteOrder)(nil)), |
| 43 |
} |
| 44 |
} |
| 45 |
|
| 46 |
|
| 47 |
type _encoding_binary_AppendByteOrder struct { |
| 48 |
IValue interface{} |
| 49 |
WAppendUint16 func(a0 []byte, a1 uint16) []byte |
| 50 |
WAppendUint32 func(a0 []byte, a1 uint32) []byte |
| 51 |
WAppendUint64 func(a0 []byte, a1 uint64) []byte |
| 52 |
WString func() string |
| 53 |
} |
| 54 |
|
| 55 |
func (W _encoding_binary_AppendByteOrder) AppendUint16(a0 []byte, a1 uint16) []byte { |
| 56 |
return W.WAppendUint16(a0, a1) |
| 57 |
} |
| 58 |
func (W _encoding_binary_AppendByteOrder) AppendUint32(a0 []byte, a1 uint32) []byte { |
| 59 |
return W.WAppendUint32(a0, a1) |
| 60 |
} |
| 61 |
func (W _encoding_binary_AppendByteOrder) AppendUint64(a0 []byte, a1 uint64) []byte { |
| 62 |
return W.WAppendUint64(a0, a1) |
| 63 |
} |
| 64 |
func (W _encoding_binary_AppendByteOrder) String() string { |
| 65 |
if W.WString == nil { |
| 66 |
return "" |
| 67 |
} |
| 68 |
return W.WString() |
| 69 |
} |
| 70 |
|
| 71 |
|
| 72 |
type _encoding_binary_ByteOrder struct { |
| 73 |
IValue interface{} |
| 74 |
WPutUint16 func(a0 []byte, a1 uint16) |
| 75 |
WPutUint32 func(a0 []byte, a1 uint32) |
| 76 |
WPutUint64 func(a0 []byte, a1 uint64) |
| 77 |
WString func() string |
| 78 |
WUint16 func(a0 []byte) uint16 |
| 79 |
WUint32 func(a0 []byte) uint32 |
| 80 |
WUint64 func(a0 []byte) uint64 |
| 81 |
} |
| 82 |
|
| 83 |
func (W _encoding_binary_ByteOrder) PutUint16(a0 []byte, a1 uint16) { W.WPutUint16(a0, a1) } |
| 84 |
func (W _encoding_binary_ByteOrder) PutUint32(a0 []byte, a1 uint32) { W.WPutUint32(a0, a1) } |
| 85 |
func (W _encoding_binary_ByteOrder) PutUint64(a0 []byte, a1 uint64) { W.WPutUint64(a0, a1) } |
| 86 |
func (W _encoding_binary_ByteOrder) String() string { |
| 87 |
if W.WString == nil { |
| 88 |
return "" |
| 89 |
} |
| 90 |
return W.WString() |
| 91 |
} |
| 92 |
func (W _encoding_binary_ByteOrder) Uint16(a0 []byte) uint16 { return W.WUint16(a0) } |
| 93 |
func (W _encoding_binary_ByteOrder) Uint32(a0 []byte) uint32 { return W.WUint32(a0) } |
| 94 |
func (W _encoding_binary_ByteOrder) Uint64(a0 []byte) uint64 { return W.WUint64(a0) } |