| ... | ... | @@ -9,47 +9,47 @@ class TypePrinter: |
| 9 | 9 | # Keep in sync with src/type.zig |
| 10 | 10 | # Types which have no payload do not need to be entered here. |
| 11 | 11 | payload_type_names = { |
| 12 | | 'array_u8': 'type.Len', |
| 13 | | 'array_u8_sentinel_0': 'Len', |
| 14 | | |
| 15 | | 'single_const_pointer': 'ElemType', |
| 16 | | 'single_mut_pointer': 'ElemType', |
| 17 | | 'many_const_pointer': 'ElemType', |
| 18 | | 'many_mut_pointer': 'ElemType', |
| 19 | | 'c_const_pointer': 'ElemType', |
| 20 | | 'c_mut_pointer': 'ElemType', |
| 21 | | 'const_slice': 'ElemType', |
| 22 | | 'mut_slice': 'ElemType', |
| 23 | | 'optional': 'ElemType', |
| 24 | | 'optional_single_mut_pointer': 'ElemType', |
| 25 | | 'optional_single_const_pointer': 'ElemType', |
| 26 | | 'anyframe_T': 'ElemType', |
| 27 | | |
| 28 | | 'int_signed': 'Bits', |
| 29 | | 'int_unsigned': 'Bits', |
| 30 | | |
| 31 | | 'error_set': 'ErrorSet', |
| 32 | | 'error_set_inferred': 'ErrorSetInferred', |
| 33 | | 'error_set_merged': 'ErrorSetMerged', |
| 34 | | |
| 35 | | 'array': 'Array', |
| 36 | | 'vector': 'Array', |
| 37 | | |
| 38 | | 'array_sentinel': 'ArraySentinel', |
| 39 | | 'pointer': 'Pointer', |
| 40 | | 'function': 'Function', |
| 41 | | 'error_union': 'ErrorUnion', |
| 42 | | 'error_set_single': 'Name', |
| 43 | | 'opaque': 'Opaque', |
| 44 | | 'struct': 'Struct', |
| 45 | | 'union': 'Union', |
| 46 | | 'union_tagged': 'Union', |
| 47 | | 'enum_full, .enum_nonexhaustive': 'EnumFull', |
| 48 | | 'enum_simple': 'EnumSimple', |
| 49 | | 'enum_numbered': 'EnumNumbered', |
| 50 | | 'empty_struct': 'ContainerScope', |
| 51 | | 'tuple': 'Tuple', |
| 52 | | 'anon_struct': 'AnonStruct', |
| 12 | 'array_u8': 'Type.Payload.Len', |
| 13 | 'array_u8_sentinel_0': 'Type.Payload.Len', |
| 14 | |
| 15 | 'single_const_pointer': 'Type.Payload.ElemType', |
| 16 | 'single_mut_pointer': 'Type.Payload.ElemType', |
| 17 | 'many_const_pointer': 'Type.Payload.ElemType', |
| 18 | 'many_mut_pointer': 'Type.Payload.ElemType', |
| 19 | 'c_const_pointer': 'Type.Payload.ElemType', |
| 20 | 'c_mut_pointer': 'Type.Payload.ElemType', |
| 21 | 'const_slice': 'Type.Payload.ElemType', |
| 22 | 'mut_slice': 'Type.Payload.ElemType', |
| 23 | 'optional': 'Type.Payload.ElemType', |
| 24 | 'optional_single_mut_pointer': 'Type.Payload.ElemType', |
| 25 | 'optional_single_const_pointer': 'Type.Payload.ElemType', |
| 26 | 'anyframe_T': 'Type.Payload.ElemType', |
| 27 | |
| 28 | 'int_signed': 'Type.Payload.Bits', |
| 29 | 'int_unsigned': 'Type.Payload.Bits', |
| 30 | |
| 31 | 'error_set': 'Type.Payload.ErrorSet', |
| 32 | 'error_set_inferred': 'Type.Payload.ErrorSetInferred', |
| 33 | 'error_set_merged': 'Type.Payload.ErrorSetMerged', |
| 34 | |
| 35 | 'array': 'Type.Payload.Array', |
| 36 | 'vector': 'Type.Payload.Array', |
| 37 | |
| 38 | 'array_sentinel': 'Type.Payload.ArraySentinel', |
| 39 | 'pointer': 'Type.Payload.Pointer', |
| 40 | 'function': 'Type.Payload.Function', |
| 41 | 'error_union': 'Type.Payload.ErrorUnion', |
| 42 | 'error_set_single': 'Type.Payload.Name', |
| 43 | 'opaque': 'Type.Payload.Opaque', |
| 44 | 'struct': 'Type.Payload.Struct', |
| 45 | 'union': 'Type.Payload.Union', |
| 46 | 'union_tagged': 'Type.Payload.Union', |
| 47 | 'enum_full, .enum_nonexhaustive': 'Type.Payload.EnumFull', |
| 48 | 'enum_simple': 'Type.Payload.EnumSimple', |
| 49 | 'enum_numbered': 'Type.Payload.EnumNumbered', |
| 50 | 'empty_struct': 'Type.Payload.ContainerScope', |
| 51 | 'tuple': 'Type.Payload.Tuple', |
| 52 | 'anon_struct': 'Type.Payload.AnonStruct', |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | def __init__(self, val): |
| ... | ... | @@ -98,48 +98,48 @@ class ValuePrinter: |
| 98 | 98 | # Keep in sync with src/value.zig |
| 99 | 99 | # Values which have no payload do not need to be entered here. |
| 100 | 100 | payload_type_names = { |
| 101 | | 'big_int_positive': 'BigInt', |
| 102 | | 'big_int_negative': 'BigInt', |
| 103 | | |
| 104 | | 'extern_fn': 'ExternFn', |
| 105 | | |
| 106 | | 'decl_ref': 'Decl', |
| 107 | | |
| 108 | | 'repeated': 'SubValue', |
| 109 | | 'eu_payload': 'SubValue', |
| 110 | | 'opt_payload': 'SubValue', |
| 111 | | 'empty_array_sentinel': 'SubValue', |
| 112 | | |
| 113 | | 'eu_payload_ptr': 'PayloadPtr', |
| 114 | | 'opt_payload_ptr': 'PayloadPtr', |
| 115 | | |
| 116 | | 'bytes': 'Bytes', |
| 117 | | 'enum_literal': 'Bytes', |
| 118 | | |
| 119 | | 'slice': 'Slice', |
| 120 | | |
| 121 | | 'enum_field_index': 'U32', |
| 122 | | |
| 123 | | 'ty': 'Ty', |
| 124 | | 'int_type': 'IntType', |
| 125 | | 'int_u64': 'U64', |
| 126 | | 'int_i64': 'I64', |
| 127 | | 'function': 'Function', |
| 128 | | 'variable': 'Variable', |
| 129 | | 'decl_ref_mut': 'DeclRefMut', |
| 130 | | 'elem_ptr': 'ElemPtr', |
| 131 | | 'field_ptr': 'FieldPtr', |
| 132 | | 'float_16': 'Float_16', |
| 133 | | 'float_32': 'Float_32', |
| 134 | | 'float_64': 'Float_64', |
| 135 | | 'float_80': 'Float_80', |
| 136 | | 'float_128': 'Float_128', |
| 137 | | 'error': 'Error', |
| 138 | | 'inferred_alloc': 'InferredAlloc', |
| 139 | | 'inferred_alloc_comptime': 'InferredAllocComptime', |
| 140 | | 'aggregate': 'Aggregate', |
| 141 | | 'union': 'Union', |
| 142 | | 'bound_fn': 'BoundFn', |
| 101 | 'big_int_positive': 'Value.Payload.BigInt', |
| 102 | 'big_int_negative': 'Value.Payload.BigInt', |
| 103 | |
| 104 | 'extern_fn': 'Value.Payload.ExternFn', |
| 105 | |
| 106 | 'decl_ref': 'Value.Payload.Decl', |
| 107 | |
| 108 | 'repeated': 'Value.Payload.SubValue', |
| 109 | 'eu_payload': 'Value.Payload.SubValue', |
| 110 | 'opt_payload': 'Value.Payload.SubValue', |
| 111 | 'empty_array_sentinel': 'Value.Payload.SubValue', |
| 112 | |
| 113 | 'eu_payload_ptr': 'Value.Payload.PayloadPtr', |
| 114 | 'opt_payload_ptr': 'Value.Payload.PayloadPtr', |
| 115 | |
| 116 | 'bytes': 'Value.Payload.Bytes', |
| 117 | 'enum_literal': 'Value.Payload.Bytes', |
| 118 | |
| 119 | 'slice': 'Value.Payload.Slice', |
| 120 | |
| 121 | 'enum_field_index': 'Value.Payload.U32', |
| 122 | |
| 123 | 'ty': 'Value.Payload.Ty', |
| 124 | 'int_type': 'Value.Payload.IntType', |
| 125 | 'int_u64': 'Value.Payload.U64', |
| 126 | 'int_i64': 'Value.Payload.I64', |
| 127 | 'function': 'Value.Payload.Function', |
| 128 | 'variable': 'Value.Payload.Variable', |
| 129 | 'decl_ref_mut': 'Value.Payload.DeclRefMut', |
| 130 | 'elem_ptr': 'Value.Payload.ElemPtr', |
| 131 | 'field_ptr': 'Value.Payload.FieldPtr', |
| 132 | 'float_16': 'Value.Payload.Float_16', |
| 133 | 'float_32': 'Value.Payload.Float_32', |
| 134 | 'float_64': 'Value.Payload.Float_64', |
| 135 | 'float_80': 'Value.Payload.Float_80', |
| 136 | 'float_128': 'Value.Payload.Float_128', |
| 137 | 'error': 'Value.Payload.Error', |
| 138 | 'inferred_alloc': 'Value.Payload.InferredAlloc', |
| 139 | 'inferred_alloc_comptime': 'Value.Payload.InferredAllocComptime', |
| 140 | 'aggregate': 'Value.Payload.Aggregate', |
| 141 | 'union': 'Value.Payload.Union', |
| 142 | 'bound_fn': 'Value.Payload.BoundFn', |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | def __init__(self, val): |