📄 expand..c
字号:
Ptable _stmt_memtbl ; union _C9 _stmt__O9 ; } ; int _block_dcl ( ) ; Pstmt _block_simpl ( ) ; #line 659 "../../src/cfront.h"struct pair { /* sizeof = 36 */TOK _node_base ; TOK _node_n_key ; bit _node_permanent ; Pstmt _stmt_s ; Pstmt _stmt_s_list ; Loc _stmt_where ; union _C7 _stmt__O7 ; union _C8 _stmt__O8 ; Ptable _stmt_memtbl ; union _C9 _stmt__O9 ; } ; #line 663 "../../src/cfront.h"struct nlist { /* sizeof = 8 */Pname _nlist_head ; Pname _nlist_tail ; } ; struct nlist * _nlist__ctor ( ) ; int _nlist_add_list ( ) ; #line 672 "../../src/cfront.h"extern Pname name_unlist ( ) ; #line 674 "../../src/cfront.h"struct slist { /* sizeof = 8 */Pstmt _slist_head ; Pstmt _slist_tail ; } ; #line 682 "../../src/cfront.h"extern Pstmt stmt_unlist ( ) ; #line 684 "../../src/cfront.h"struct elist { /* sizeof = 8 */Pexpr _elist_head ; Pexpr _elist_tail ; } ; #line 692 "../../src/cfront.h"extern Pexpr expr_unlist ( ) ; #line 694 "../../src/cfront.h"extern struct dcl_context * cc ; #line 696 "../../src/cfront.h"struct dcl_context { /* sizeof = 24 */Pname _dcl_context_c_this ; Ptype _dcl_context_tot ; Pname _dcl_context_not ; Pclass _dcl_context_cot ; Ptable _dcl_context_ftbl ; Pname _dcl_context_nof ; } ; #line 710 "../../src/cfront.h"extern struct dcl_context ccvec [ 20] ; #line 712 "../../src/cfront.h"extern bit can_coerce ( ) ; #line 713 "../../src/cfront.h"extern int yyerror ( ) ; #line 714 "../../src/cfront.h"extern TOK back ; #line 717 "../../src/cfront.h"extern int Nspy ; #line 718 "../../src/cfront.h"extern int Nfile ; #line 718 "../../src/cfront.h"extern int Nline ; #line 718 "../../src/cfront.h"extern int Ntoken ; #line 718 "../../src/cfront.h"extern int Nname ; #line 718 "../../src/cfront.h"extern int Nfree_store ; #line 718 "../../src/cfront.h"extern int Nalloc ; #line 718 "../../src/cfront.h"extern int Nfree ; #line 719 "../../src/cfront.h"extern int NFn ; #line 719 "../../src/cfront.h"extern int NFtn ; #line 719 "../../src/cfront.h"extern int NFpv ; #line 719 "../../src/cfront.h"extern int NFbt ; #line 719 "../../src/cfront.h"extern int NFf ; #line 719 "../../src/cfront.h"extern int NFs ; #line 719 "../../src/cfront.h"extern int NFc ; #line 719 "../../src/cfront.h"extern int NFe ; #line 719 "../../src/cfront.h"extern int NFl ; #line 720 "../../src/cfront.h"extern char * line_format ; #line 722 "../../src/cfront.h"extern Plist isf_list ; #line 723 "../../src/cfront.h"extern Pstmt st_ilist ; #line 724 "../../src/cfront.h"extern Pstmt st_dlist ; #line 725 "../../src/cfront.h"extern Ptable sti_tbl ; #line 726 "../../src/cfront.h"extern Ptable std_tbl ; #line 728 "../../src/cfront.h"extern Ptype np_promote ( ) ; #line 729 "../../src/cfront.h"extern int new_key ( ) ; #line 731 "../../src/cfront.h"extern Pname dcl_list ; #line 732 "../../src/cfront.h"extern int over_call ( ) ; #line 733 "../../src/cfront.h"extern Pname Nover ; #line 734 "../../src/cfront.h"extern Pname Ncoerce ; #line 735 "../../src/cfront.h"extern int Nover_coerce ; #line 737 "../../src/cfront.h"#line 738 "../../src/cfront.h"struct iline { /* sizeof = 108 */Pname _iline_fct_name ; Pin _iline_i_next ; Ptable _iline_i_table ; Pname _iline_local [ 8] ; Pexpr _iline_arg [ 8] ; Ptype _iline_tp [ 8] ; } ; #line 747 "../../src/cfront.h"extern Pexpr curr_expr ; #line 748 "../../src/cfront.h"extern Pin curr_icall ; #line 751 "../../src/cfront.h"extern Pstmt curr_loop ; #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 20 "../../src/expand.c"extern char * temp ( _auto_vn , _auto_fn , _auto_cn ) char * _auto_vn ; char * _auto_fn ; char * _auto_cn ; #line 24 "../../src/expand.c"{ #line 24 "../../src/expand.c"char * _auto__result ; #line 24 "../../src/expand.c"if ( ( ( _auto_vn [ 0 ] ) != '_' ) || ( ( _auto_vn [ #line 24 "../../src/expand.c"1 ] ) != 'X' ) ) #line 24 "../../src/expand.c"{ #line 24 "../../src/expand.c"int _auto_vnl ; int _auto_fnl ; int _auto_cnl ; char * _auto_s ; #line 25 "../../src/expand.c"_auto_vnl = strlen ( _auto_vn ) ; #line 26 "../../src/expand.c"_auto_fnl = strlen ( _auto_fn ) ; #line 27 "../../src/expand.c"_auto_cnl = ( _auto_cn ? strlen ( _auto_cn ) : 0) ; #line 28 "../../src/expand.c"_auto_s = ( ( ( char * ) ( _new ( ( long ) ( ( #line 28 "../../src/expand.c"( _auto_vnl + _auto_fnl ) + _auto_cnl ) + 6 ) ) ) ) ) ; #line 30 "../../src/expand.c"( _auto_s [ 0 ] ) = '_' ; #line 31 "../../src/expand.c"( _auto_s [ 1 ] ) = 'X' ; #line 32 "../../src/expand.c"strcpy ( _auto_s + 2 , _auto_vn ) ; #line 33 "../../src/expand.c"( _auto_s [ _auto_vnl + 2 ] ) = '_' ; #line 34 "../../src/expand.c"strcpy ( ( _auto_s + _auto_vnl ) + 3 , _auto_fn ) ; #line 35 "../../src/expand.c"if ( _auto_cnl ) { #line 35 "../../src/expand.c"( _auto_s [ ( _auto_vnl + _auto_fnl ) + 3 ] ) = '_' ; #line 35 "../../src/expand.c"#line 37 "../../src/expand.c"strcpy ( ( ( _auto_s + _auto_vnl ) + _auto_fnl ) + 4 , _auto_cn ) ; } #line 39 "../../src/expand.c"{ #line 39 "../../src/expand.c"{ _auto__result = _auto_s ; #line 39 "../../src/expand.c"return _auto__result ; } } } else #line 42 "../../src/expand.c"{ #line 42 "../../src/expand.c"{ _auto__result = _auto_vn ; #line 42 "../../src/expand.c"return _auto__result ; } } } ; #line 46 "../../src/expand.c"Pname dcl_local ( _auto_scope , _auto_an , _auto_fn ) struct table * _auto_scope ; struct name * _auto_an ; struct name * _auto_fn ; #line 47 "../../src/expand.c"{ #line 47 "../../src/expand.c"Pname _auto__result ; Pname _auto_cn ; char * _auto_s ; Pname _auto_nx ; Pname _auto_r ; #line 48 "../../src/expand.c"if ( _auto_scope == 0 ) { #line 48 "../../src/expand.c"errorFI_PC__E ( ( int ) 's' , ( char * #line 48 "../../src/expand.c") "cannot expand inlineF needing temporary variable in nonF context") ; #line 50 "../../src/expand.c"{ #line 50 "../../src/expand.c"{ _auto__result = _auto_an ; #line 50 "../../src/expand.c"return _auto__result ; } } } #line 52 "../../src/expand.c"if ( _auto_an -> _name_n_stclass == 31 ) errorFI_PC__E ( ( int ) 's' , ( #line 52 "../../src/expand.c"char * ) "static%n in inlineF", _auto_an ) ; #line 53 "../../src/expand.c"_auto_cn = _auto_fn -> _expr__O5.__C5_n_table -> _table_t_name ; #line 53 "../../src/expand.c"_auto_s = temp ( _auto_an -> _expr__O3.__C3_string , _auto_fn -> _expr__O3.__C3_string , _auto_cn ? _auto_cn -> _expr__O3.__C3_string : ( ( ( char * #line 53 "../../src/expand.c") ( 0 ) ) ) ) ; #line 53 "../../src/expand.c"_auto_nx = ( struct name * ) _name__ctor ( ( struct name * ) 0 , _auto_s ) ; #line 53 "../../src/expand.c"#line 57 "../../src/expand.c"_auto_nx -> _expr__O2.__C2_tp = _auto_an -> _expr__O2.__C2_tp ; #line 58 "../../src/expand.c"_auto_nx -> _expr__O2.__C2_tp -> _node_permanent = 1 ; #line 59 "../../src/expand.c"_auto_nx -> _name_n_used = _auto_an -> _name_n_used ; #line 60 "../../src/expand.c"_auto_nx -> _name_n_assigned_to = _auto_an -> _name_n_assigned_to ; #line 61 "../../src/expand.c"_auto_nx -> _name_n_addr_taken = _auto_an -> _name_n_addr_taken ; #line 62 "../../src/expand.c"_auto_r = _table_insert ( ( struct table * ) _auto_scope , ( struct name * ) _auto_nx , ( int #line 62 "../../src/expand.c") 0 ) ; #line 63 "../../src/expand.c"_name__dtor ( ( struct name * ) _auto_nx , 1) ; #line 64 "../../src/expand.c"{ #line 64 "../../src/expand.c"{ _auto__result = _auto_r ; #line 64 "../../src/expand.c"return _auto__result ; } } } ; #line 67 "../../src/expand.c"Pstmt _stmt_expand ( _auto_this ) register struct stmt * _auto_this ; #line 75 "../../src/expand.c"{ #line 75 "../../src/expand.c"Pstmt _auto__result ; #line 76 "../../src/expand.c"if ( _auto_this == 0 ) errorFI_PC__E ( ( int ) 'i' , ( char * ) #line 76 "../../src/expand.c""0->stmt.expand() for%n", expand_fn ) ; #line 79 "../../src/expand.c"if ( _auto_this -> _stmt_memtbl ) { #line 79 "../../src/expand.c"register Ptable _auto_t ; register int _auto_i ; register Pname _auto_n ; #line 80 "../../src/expand.c"_auto_t = _auto_this -> _stmt_memtbl ; #line 82 "../../src/expand.c"for ( _auto_n = _table_get_mem ( ( struct table * ) _auto_t , _auto_i = 1 ) ;_auto_n ;( _auto_n = _table_get_mem ( #line 82 "../../src/expand.c"( struct table * ) _auto_t , ++ _auto_i ) ) ) #line 83 "../../src/expand.c"if ( _auto_n -> _name_n_stclass == 31 ) #line 83 "../../src/expand.c"#line 83 "../../src/expand.c"{ #line 83 "../../src/expand.c"errorFI_PC__E ( ( int ) 's' , ( char * ) "static%n in inlineF", _auto_n ) ; #line 85 "../../src/expand.c"_auto_n -> _name_n_stclass = 2 ; } } #line 89 "../../src/expand.c"if ( expand_tbl ) { #line 89 "../../src/expand.c"Pexpr _auto_ee ; #line 91 "../../src/expand.c"static int _static_ret_seen = 0 ; #line 93 "../../src/expand.c"if ( _auto_this -> _stmt_memtbl && ( _auto_this -> _node_base != 116 ) ) { #line 93 "../../src/expand.c"int _auto_i ; Pname _auto_n ; Ptable _auto_tbl ; #line 96 "../../src/expand.c"_auto_tbl = _auto_this -> _stmt_memtbl ; #line 97 "../../src/expand.c"for ( _auto_n = _table_get_mem ( ( struct table * ) _auto_tbl , _auto_i = 1 ) ;_auto_n ;( _auto_n = _table_get_mem ( #line 97 "../../src/expand.c"( struct table * ) _auto_tbl , ++ _auto_i ) ) ) #line 97 "../../src/expand.c"{ #line 97 "../../src/expand.c"Pname _auto_nn ; #line 99 "../../src/expand.c"_auto_nn = dcl_local ( ( struct table * ) scope , ( struct name * ) _auto_n , ( struct #line 99 "../../src/expand.c"name * ) expand_fn ) ; #line 100 "../../src/expand.c"_auto_nn -> _node_base = 85 ; #line 101 "../../src/expand.c"_auto_n -> _expr__O3.__C3_string = _auto_nn -> _expr__O3.__C3_string ; } } #line 105 "../../src/expand.c"switch ( _auto_this -> _node_base ) { #line 105 "../../src/expand.c"default : errorFI_PC__E ( ( int ) 's' , #line 105 "../../src/expand.c"( char * ) "%kS in inline%n", _auto_this -> _node_base , expand_fn ) ; #line 108 "../../src/expand.c"{ #line 108 "../../src/expand.c"{ _auto__result = ( ( ( struct stmt * ) ( dummy ) ) ) ; #line 108 "../../src/expand.c"#line 108 "../../src/expand.c"return _auto__result ; } } #line 110 "../../src/expand.c"case 116 : if ( _auto_this -> _stmt_s_list ) { #line 111 "../../src/expand.c"_auto_ee = ( ( ( struct #line 111 "../../src/expand.c"expr * ) ( _stmt_expand ( ( struct stmt * ) _auto_this -> _stmt_s_list ) ) ) ) ; #line 111 "../../src/expand.c"#line 113 "../../src/expand.c"if ( _auto_this -> _stmt_s ) { #line 113 "../../src/expand.c"_auto_ee = ( struct expr * ) _expr__ctor ( ( struct expr * #line 113 "../../src/expand.c") 0 , 71 , ( struct expr * ) ( ( ( struct expr * ) #line 113 "../../src/expand.c"( _stmt_expand ( ( struct stmt * ) _auto_this -> _stmt_s ) ) ) ) , ( struct #line 113 "../../src/expand.c"expr * ) _auto_ee ) ; #line 115 "../../src/expand.c"_auto_ee -> _node_permanent = 1 ; } #line 117 "../../src/expand.c"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -