📄 typ..c
字号:
#line 752 "../../src/cfront.h"extern Pblock curr_block ; #line 753 "../../src/cfront.h"extern Pstmt curr_switch ; #line 754 "../../src/cfront.h"extern bit arg_err_suppress ; #line 755 "../../src/cfront.h"extern struct loc last_line ; #line 757 "../../src/cfront.h"extern int no_of_undcl ; #line 758 "../../src/cfront.h"extern int no_of_badcall ; #line 759 "../../src/cfront.h"extern Pname undcl ; #line 759 "../../src/cfront.h"extern Pname badcall ; #line 761 "../../src/cfront.h"extern int strlen ( ) ; #line 762 "../../src/cfront.h"extern int strcpy ( ) ; #line 763 "../../src/cfront.h"extern int strcmp ( ) ; #line 764 "../../src/cfront.h"extern int str_to_int ( ) ; #line 765 "../../src/cfront.h"extern int c_strlen ( ) ; #line 767 "../../src/cfront.h"extern Pname vec_new_fct ; #line 768 "../../src/cfront.h"extern Pname vec_del_fct ; #line 777 "../../src/cfront.h"extern Pname find_hidden ( ) ; #line 778 "../../src/cfront.h"extern TOK lalex ( ) ; #line 779 "../../src/cfront.h"extern int Nstd ; #line 781 "../../src/cfront.h"extern int stcount ; #line 41 "../../src/size.h"extern int BI_IN_WORD ; #line 42 "../../src/size.h"extern int BI_IN_BYTE ; #line 44 "../../src/size.h"extern int SZ_CHAR ; #line 45 "../../src/size.h"extern int AL_CHAR ; #line 47 "../../src/size.h"extern int SZ_SHORT ; #line 48 "../../src/size.h"extern int AL_SHORT ; #line 50 "../../src/size.h"extern int SZ_INT ; #line 51 "../../src/size.h"extern int AL_INT ; #line 53 "../../src/size.h"extern int SZ_LONG ; #line 54 "../../src/size.h"extern int AL_LONG ; #line 56 "../../src/size.h"extern int SZ_FLOAT ; #line 57 "../../src/size.h"extern int AL_FLOAT ; #line 59 "../../src/size.h"extern int SZ_DOUBLE ; #line 60 "../../src/size.h"extern int AL_DOUBLE ; #line 62 "../../src/size.h"extern int SZ_STRUCT ; #line 63 "../../src/size.h"extern int AL_STRUCT ; #line 65 "../../src/size.h"extern int SZ_FRAME ; #line 66 "../../src/size.h"extern int AL_FRAME ; #line 68 "../../src/size.h"extern int SZ_WORD ; #line 70 "../../src/size.h"extern int SZ_WPTR ; #line 71 "../../src/size.h"extern int AL_WPTR ; #line 73 "../../src/size.h"extern int SZ_BPTR ; #line 74 "../../src/size.h"extern int AL_BPTR ; #line 77 "../../src/size.h"extern int SZ_TOP ; #line 78 "../../src/size.h"extern int SZ_BOTTOM ; #line 80 "../../src/size.h"extern char * LARGEST_INT ; #line 81 "../../src/size.h"extern int F_SENSITIVE ; #line 82 "../../src/size.h"extern int F_OPTIMIZED ; #line 20 "../../src/typ.c"Pbase short_type ; #line 21 "../../src/typ.c"Pbase int_type ; #line 22 "../../src/typ.c"Pbase char_type ; #line 23 "../../src/typ.c"Pbase long_type ; #line 25 "../../src/typ.c"Pbase uchar_type ; #line 26 "../../src/typ.c"Pbase ushort_type ; #line 27 "../../src/typ.c"Pbase uint_type ; #line 28 "../../src/typ.c"Pbase ulong_type ; #line 30 "../../src/typ.c"Pbase zero_type ; #line 31 "../../src/typ.c"Pbase float_type ; #line 32 "../../src/typ.c"Pbase double_type ; #line 33 "../../src/typ.c"Pbase void_type ; #line 34 "../../src/typ.c"Pbase any_type ; #line 36 "../../src/typ.c"Ptype Pint_type ; #line 37 "../../src/typ.c"Ptype Pchar_type ; #line 38 "../../src/typ.c"Ptype Pvoid_type ; #line 39 "../../src/typ.c"Ptype Pfctvec_type ; #line 41 "../../src/typ.c"Ptable gtbl ; #line 42 "../../src/typ.c"Ptable any_tbl ; #line 44 "../../src/typ.c"Pname Cdcl = 0 ; #line 45 "../../src/typ.c"Pstmt Cstmt = 0 ; #line 47 "../../src/typ.c"bit new_type = 0 ; #line 49 "../../src/typ.c"extern Ptype np_promote ( ) ; #line 50 "../../src/typ.c"extern Ptype np_promote ( _auto_oper , _auto_r1 , _auto_r2 , _auto_t1 , _auto_t2 , _auto_p ) int _auto_oper ; int _auto_r1 ; int _auto_r2 ; struct type * _auto_t1 ; struct type * _auto_t2 ; int _auto_p ; #line 63 "../../src/typ.c"{ #line 63 "../../src/typ.c"Ptype _auto__result ; #line 64 "../../src/typ.c"if ( _auto_r2 == 'A' ) { #line 64 "../../src/typ.c"{ _auto__result = _auto_t1 ; #line 64 "../../src/typ.c"return _auto__result ; } } #line 66 "../../src/typ.c"switch ( _auto_r1 ) { #line 66 "../../src/typ.c"case 'A' : { #line 67 "../../src/typ.c"{ _auto__result = _auto_t2 ; #line 67 "../../src/typ.c"return _auto__result ; } } #line 68 "../../src/typ.c"case 'Z' : switch ( _auto_r2 ) { #line 69 "../../src/typ.c"case 'Z' : { #line 70 "../../src/typ.c"{ _auto__result = ( #line 70 "../../src/typ.c"struct type * ) int_type ; #line 70 "../../src/typ.c"return _auto__result ; } } #line 71 "../../src/typ.c"case 'I' : case 'F' : { #line 72 "../../src/typ.c"{ _auto__result = ( struct type * ) ( #line 72 "../../src/typ.c"_auto_p ? _basetype_arit_conv ( ( struct basetype * ) ( ( ( struct basetype * ) ( _auto_t2 ) #line 72 "../../src/typ.c") ) , ( struct basetype * ) 0 ) : ( ( ( struct #line 72 "../../src/typ.c"basetype * ) ( 0 ) ) ) ) ; #line 72 "../../src/typ.c"return _auto__result ; } } #line 73 "../../src/typ.c"case 'P' : { #line 73 "../../src/typ.c"{ _auto__result = _auto_t2 ; #line 73 "../../src/typ.c"return _auto__result ; } } #line 74 "../../src/typ.c"default : errorFI_PC__E ( ( int ) 'i' , ( char * ) "zero(%d)", #line 74 "../../src/typ.c"_auto_r2 ) ; } #line 76 "../../src/typ.c"case 'I' : switch ( _auto_r2 ) { #line 77 "../../src/typ.c"case 'Z' : _auto_t2 = 0 ; #line 79 "../../src/typ.c"case 'I' : case 'F' : { #line 80 "../../src/typ.c"{ _auto__result = ( struct type * ) ( _auto_p ? _basetype_arit_conv ( #line 80 "../../src/typ.c"( struct basetype * ) ( ( ( struct basetype * ) ( _auto_t1 ) ) ) #line 80 "../../src/typ.c", ( struct basetype * ) ( ( ( struct basetype * ) ( _auto_t2 ) ) #line 80 "../../src/typ.c") ) : ( ( ( struct basetype * ) ( 0 ) ) ) #line 80 "../../src/typ.c") ; #line 80 "../../src/typ.c"return _auto__result ; } } #line 81 "../../src/typ.c"case 'P' : switch ( _auto_oper ) { #line 81 "../../src/typ.c"case 54 : case 126 : break ; #line 81 "../../src/typ.c"#line 84 "../../src/typ.c"default : errorFPC__E ( ( char * ) "int%kP", _auto_oper ) ; #line 84 "../../src/typ.c"{ #line 84 "../../src/typ.c"{ _auto__result = ( struct type * ) any_type ; #line 84 "../../src/typ.c"return _auto__result ; } } } #line 86 "../../src/typ.c"{ #line 86 "../../src/typ.c"{ _auto__result = _auto_t2 ; #line 86 "../../src/typ.c"return _auto__result ; } } #line 87 "../../src/typ.c"case 108 : errorFPC__E ( ( char * ) "int%kF", _auto_oper ) ; #line 87 "../../src/typ.c"{ #line 87 "../../src/typ.c"{ _auto__result = ( struct type * ) any_type ; #line 87 "../../src/typ.c"return _auto__result ; } } #line 88 "../../src/typ.c"default : errorFI_PC__E ( ( int ) 'i' , ( char * ) "int(%d)", #line 88 "../../src/typ.c"_auto_r2 ) ; } #line 90 "../../src/typ.c"case 'F' : switch ( _auto_r2 ) { #line 91 "../../src/typ.c"case 'Z' : _auto_t2 = 0 ; #line 93 "../../src/typ.c"case 'I' : case 'F' : { #line 94 "../../src/typ.c"{ _auto__result = ( struct type * ) ( _auto_p ? _basetype_arit_conv ( #line 94 "../../src/typ.c"( struct basetype * ) ( ( ( struct basetype * ) ( _auto_t1 ) ) ) #line 94 "../../src/typ.c", ( struct basetype * ) ( ( ( struct basetype * ) ( _auto_t2 ) ) #line 94 "../../src/typ.c") ) : ( ( ( struct basetype * ) ( 0 ) ) ) #line 94 "../../src/typ.c") ; #line 94 "../../src/typ.c"return _auto__result ; } } #line 95 "../../src/typ.c"case 'P' : errorFPC__E ( ( char * ) "float%kP", _auto_oper ) ; #line 95 "../../src/typ.c"{ #line 95 "../../src/typ.c"{ _auto__result = ( struct type * ) any_type ; #line 95 "../../src/typ.c"return _auto__result ; } } #line 96 "../../src/typ.c"case 108 : errorFPC__E ( ( char * ) "float%kF", _auto_oper ) ; #line 96 "../../src/typ.c"{ #line 96 "../../src/typ.c"{ _auto__result = ( struct type * ) any_type ; #line 96 "../../src/typ.c"return _auto__result ; } } #line 97 "../../src/typ.c"default : errorFI_PC__E ( ( int ) 'i' , ( char * ) "float(%d)", #line 97 "../../src/typ.c"_auto_r2 ) ; } #line 99 "../../src/typ.c"case 'P' : switch ( _auto_r2 ) { #line 100 "../../src/typ.c"case 'Z' : { #line 101 "../../src/typ.c"{ _auto__result = _auto_t1 ; #line 101 "../../src/typ.c"return _auto__result ; } } #line 102 "../../src/typ.c"case 'I' : switch ( _auto_oper ) { #line 103 "../../src/typ.c"case 54 : case 55 : case 126 : #line 103 "../../src/typ.c"#line 107 "../../src/typ.c"case 127 : break ; #line 108 "../../src/typ.c"default : errorFPC__E ( ( char * ) "P%k int", _auto_oper ) ; #line 108 "../../src/typ.c"{ #line 108 "../../src/typ.c"{ _auto__result = ( struct type * ) any_type ; #line 108 "../../src/typ.c"return _auto__result ; } } } #line 110 "../../src/typ.c"{ #line 110 "../../src/typ.c"{ _auto__result = _auto_t1 ; #line 110 "../../src/typ.c"return _auto__result ; } } #line 111 "../../src/typ.c"case 'F' : errorFPC__E ( ( char * ) "P%k float", _auto_oper ) ; #line 111 "../../src/typ.c"{ #line 111 "../../src/typ.c"{ _auto__result = ( struct type * ) any_type ; #line 111 "../../src/typ.c"return _auto__result ; } } #line 112 "../../src/typ.c"case 'P' : if ( _type_check ( ( struct type * ) _auto_t1 , _auto_t2 , 70 ) #line 112 "../../src/typ.c") #line 113 "../../src/typ.c"{ #line 113 "../../src/typ.c"switch ( _auto_oper ) { #line 114 "../../src/typ.c"case 62 : case 63 : case 59 : case 61 : #line 114 "../../src/typ.c"#line 119 "../../src/typ.c"case 60 : case 58 : case 68 : if ( _type_check ( ( struct type * ) _auto_t2 , #line 119 "../../src/typ.c"_auto_t1 , 70 ) == 0 ) #line 122 "../../src/typ.c"goto zz ; } #line 124 "../../src/typ.c"errorFPC__E ( ( char * ) "T mismatch:%t %k%t", _auto_t1 , _auto_oper , _auto_t2 ) ; #line 125 "../../src/typ.c"{ #line 125 "../../src/typ.c"{ _auto__result = ( struct type * ) any_type ; #line 125 "../../src/typ.c"return _auto__result ; } } } #line 127 "../../src/typ.c"zz : switch ( _auto_oper ) { #line 128 "../../src/typ.c"case 55 : case 127 : { #line 130 "../../src/typ.c"{ #line 130 "../../src/typ.c"#line 130 "../../src/typ.c"_auto__result = ( struct type * ) int_type ; #line 130 "../../src/typ.c"return _auto__result ; } } #line 131 "../../src/typ.c"case 54 : case 126 : errorFPC__E ( ( char * ) "P +P") ; #line 132 "../../src/typ.c"{ #line 132 "../../src/typ.c"{ _auto__result = ( struct type * ) any_type ; #line 132 "../../src/typ.c"return _auto__result ; } } #line 133 "../../src/typ.c"default : { #line 133 "../../src/typ.c"{ _auto__result = _auto_t1 ; #line 133 "../../src/typ.c"return _auto__result ; } } } #line 135 "../../src/typ.c"case 108 : { #line 135 "../../src/typ.c"{ _auto__result = _auto_t1 ; #line 135 "../../src/typ.c"return _auto__result ; } } #line 136 "../../src/typ.c"default : errorFI_PC__E ( ( int ) 'i' , ( char * ) "pointer(%d)", #line 136 "../../src/typ.c"_auto_r2 ) ; } #line 138 "../../src/typ.c"case 108 : errorFPC__E ( ( char * ) "F%k%t", _auto_oper , _auto_t2 ) ; #line 140 "../../src/typ.c"{ #line 140 "../../src/typ.c"{ _auto__result = ( struct type * ) any_type ; #line 140 "../../src/typ.c"return _auto__result ; } } #line 141 "../../src/typ.c"default : errorFI_PC__E ( ( int ) 'i' , ( char * ) "np_promote(%d,%d)", #line 141 "../../src/typ.c"_auto_r1 , _auto_r2 ) ; } } ; #line 146 "../../src/typ.c"TOK _type_kind ( _auto_this , _auto_oper , _auto_v ) register struct type * _auto_this ; int _auto_oper ; int _auto_v ; #line 151 "../../src/typ.c"{ #line 151 "../../src/typ.c"TOK _auto__result ; Ptype _auto_t ; char * _auto_s ; #line 152 "../../src/typ.c"_auto_t = ( struct type * ) _auto_this ; #line 153 "../../src/typ.c"_auto_s = ( _auto_oper ? ( keys [ _auto_oper ] ) : ( ( ( char * ) #line 153 "../../src/typ.c"( 0 ) ) ) ) ; #line 154 "../../src/typ.c"xx : switch ( _auto_t -> _node_base ) { #line 155 "../../src/typ.c"case 141 : { #line 156 "../../src/typ.c"{ _auto__result = 'A' ; #line 156 "../../src/typ.c"return _auto__result ; } } #line 157 "../../src/typ.c"case 138 : { #line 157 "../../src/typ.c"{ _auto__result = 'Z' ; #line 157 "../../src/typ.c"return _auto__result ; } } #line 158 "../../src/typ.c"case 114 : case 5 : case 29 : case 21 : case 22 : case 121 : #line 158 "../../src/typ.c"#line 163 "../../src/typ.c"{ #line 163 "../../src/typ.c"{ _auto__result = 'I' ; #line 163 "../../src/typ.c"return _auto__result ; } } #line 164 "../../src/typ.c"case 15 : case 11 : if ( _auto_v == 'I' ) errorFPC__E ( ( char * #line 164 "../../src/typ.c") "float operand for %s", _auto_s ) ; #line 165 "../../src/typ.c"{ #line 165 "../../src/typ.c"{ _auto__result = 'F' ; #line 165 "../../src/typ.c"return _auto__result ; } } #line 166 "../../src/typ.c"case 125 : if ( _auto_v != 'P' ) errorFPC__E ( ( char * ) "P operand for %s", #line 166 "../../src/typ.c"_auto_s ) ; #line 167 "../../src/typ.c"switch ( _auto_oper ) { #line 167 "../../src/typ.c"case 48 : case 49 : case 55 : case 54 : case 127 :
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -