コード例 #1
0
ファイル: rename_temps.c プロジェクト: FauxFaux/cyclone
static int Cyc_RenameTemps_rename_visit_f1(struct Cyc_RenameTemps_Env*env,struct Cyc_Absyn_Exp*e){struct Cyc_Absyn_Exp*_T0;int*_T1;int _T2;struct Cyc_Absyn_Var_e_Absyn_Raw_exp_struct*_T3;void**_T4;void**_T5;void*_T6;int _T7;struct _handler_cons*_T8;int _T9;void**_TA;void*(*_TB)(struct Cyc_Dict_Dict,struct _tuple0*);void*(*_TC)(struct Cyc_Dict_Dict,void*);struct Cyc_RenameTemps_Env*_TD;struct Cyc_Dict_Dict _TE;struct _tuple0*_TF;void*_T10;struct Cyc_String_pa_PrintArg_struct _T11;struct Cyc___cycFILE*_T12;struct _fat_ptr _T13;struct _fat_ptr _T14;_T0=e;{
void*_T15=_T0->r;void*_T16;_T1=(int*)_T15;_T2=*_T1;if(_T2!=1)goto _TL6;{struct Cyc_Absyn_Var_e_Absyn_Raw_exp_struct*_T17=(struct Cyc_Absyn_Var_e_Absyn_Raw_exp_struct*)_T15;_T3=(struct Cyc_Absyn_Var_e_Absyn_Raw_exp_struct*)_T15;_T4=& _T3->f1;_T16=(void**)_T4;}{void**b=(void**)_T16;_T5=b;_T6=*_T5;{
# 59
struct _tuple0*qv=Cyc_Absyn_binding2qvar(_T6);_T7=
Cyc_RenameTemps_is_temp_var(qv);if(!_T7)goto _TL8;{struct _handler_cons _T17;_T8=& _T17;_push_handler(_T8);{int _T18=0;_T9=setjmp(_T17.handler);if(!_T9)goto _TLA;_T18=1;goto _TLB;_TLA: _TLB: if(_T18)goto _TLC;else{goto _TLE;}_TLE: _TA=b;_TC=Cyc_Dict_lookup;{
# 62
void*(*_T19)(struct Cyc_Dict_Dict,struct _tuple0*)=(void*(*)(struct Cyc_Dict_Dict,struct _tuple0*))_TC;_TB=_T19;}_TD=env;_TE=_TD->d;_TF=qv;*_TA=_TB(_TE,_TF);_pop_handler();goto _TLD;_TLC: _T10=Cyc_Core_get_exn_thrown();{void*_T19=(void*)_T10;{struct Cyc_String_pa_PrintArg_struct _T1A;_T1A.tag=0;
# 65
_T1A.f1=Cyc_Absynpp_exp2string(e);_T11=_T1A;}{struct Cyc_String_pa_PrintArg_struct _T1A=_T11;void*_T1B[1];_T1B[0]=& _T1A;_T12=Cyc_stderr;_T13=_tag_fat("can't find var %s!!!\n",sizeof(char),22U);_T14=_tag_fat(_T1B,sizeof(void*),1);Cyc_fprintf(_T12,_T13,_T14);}goto _LL5;_LL5:;}_TLD:;}}goto _TL9;_TL8: _TL9:
# 69
 return 0;}}_TL6:
 return 1;;}}
コード例 #2
0
ファイル: data_sun.c プロジェクト: Ntropy/DSSP-C
 void _BVarSt (void)	{	// Set (store) Byte Var value
	_TB(); // like !TB
 }
コード例 #3
0
ファイル: callgraph.c プロジェクト: pippijn/cyclone-boot
static struct Cyc_Dict_Dict Cyc_Callgraph_enter_fndecls(struct Cyc_Hashtable_Table * fds,
							struct Cyc_Dict_Dict cg,
							struct Cyc_List_List * ds) {
  struct Cyc_List_List * _T0;
  void * _T1;
  struct Cyc_Absyn_Decl * _T2;
  int * _T3;
  unsigned int _T4;
  void (* _T5)(struct Cyc_Hashtable_Table *,struct _tuple0 *,struct Cyc_Absyn_Fndecl *);
  void (* _T6)(struct Cyc_Hashtable_Table *,void *,void *);
  struct Cyc_Hashtable_Table * _T7;
  struct Cyc_Absyn_Fndecl * _T8;
  struct _tuple0 * _T9;
  struct Cyc_Absyn_Fndecl * _TA;
  struct Cyc_Dict_Dict (* _TB)(struct Cyc_Dict_Dict,struct Cyc_Absyn_Fndecl *);
  struct Cyc_Dict_Dict (* _TC)(struct Cyc_Dict_Dict,void *);
  struct Cyc_List_List * _TD;
  struct Cyc_Dict_Dict _TE;
  { struct Cyc_List_List * _TF = ds;
    struct Cyc_List_List * ds = _TF;
    _TL12: if (ds != 0) { goto _TL10;
    }else { goto _TL11;
    }
    _TL10: _T0 = ds;
    _T1 = _T0->hd;
    _T2 = (struct Cyc_Absyn_Decl *)_T1;
    { void * _T10 = _T2->r;
      struct Cyc_List_List * _T11;
      struct Cyc_Absyn_Fndecl * _T12;
      _T3 = (int *)_T10;
      _T4 = *_T3;
      switch (_T4) {
      case 1: 
	{ struct Cyc_Absyn_Fn_d_Absyn_Raw_decl_struct * _T13 = (struct Cyc_Absyn_Fn_d_Absyn_Raw_decl_struct *)_T10;
	  _T12 = _T13->f1;
	}{ struct Cyc_Absyn_Fndecl * f = _T12;
	  _T6 = Cyc_Hashtable_insert;
	  { void (* _T13)(struct Cyc_Hashtable_Table *,struct _tuple0 *,struct Cyc_Absyn_Fndecl *) = (void (*)(struct Cyc_Hashtable_Table *,
													       struct _tuple0 *,
													       struct Cyc_Absyn_Fndecl *))_T6;
	    _T5 = _T13;
	  }_T7 = fds;
	  _T8 = f;
	  _T9 = _T8->name;
	  _TA = f;
	  _T5(_T7,_T9,_TA);
	  _TC = Cyc_Graph_add_node;
	  { struct Cyc_Dict_Dict (* _T13)(struct Cyc_Dict_Dict,struct Cyc_Absyn_Fndecl *) = (struct Cyc_Dict_Dict (*)(struct Cyc_Dict_Dict,
														      struct Cyc_Absyn_Fndecl *))_TC;
	    _TB = _T13;
	  }cg = _TB(cg,f);
	  goto _LL0;
	}
      case 10: 
	{ struct Cyc_Absyn_Using_d_Absyn_Raw_decl_struct * _T13 = (struct Cyc_Absyn_Using_d_Absyn_Raw_decl_struct *)_T10;
	  _T11 = _T13->f2;
	}{ struct Cyc_List_List * ds = _T11;
	  _T11 = ds;
	  goto _LL6;
	}
      case 9: 
	{ struct Cyc_Absyn_Namespace_d_Absyn_Raw_decl_struct * _T13 = (struct Cyc_Absyn_Namespace_d_Absyn_Raw_decl_struct *)_T10;
	  _T11 = _T13->f2;
	}_LL6: { struct Cyc_List_List * ds = _T11;
	  cg = Cyc_Callgraph_enter_fndecls(fds,cg,ds);
	  goto _LL0;
	}
      default: 
	goto _LL0;
      }
      _LL0: ;
    }_TD = ds;
    ds = _TD->tl;
    goto _TL12;
    _TL11: ;
  }_TE = cg;
  return _TE;
}
コード例 #4
0
ファイル: xp.c プロジェクト: FauxFaux/cyclone
struct _fat_ptr Cyc_XP_tostr(struct _fat_ptr str,int size,int base,int n,struct _fat_ptr x){struct _fat_ptr _T0;unsigned char*_T1;unsigned _T2;int(*_T3)(struct _fat_ptr,struct _fat_ptr,unsigned);void*(*_T4)(struct _fat_ptr,struct _fat_ptr,unsigned);struct _fat_ptr _T5;struct _fat_ptr _T6;int(*_T7)(struct _fat_ptr,struct _fat_ptr,unsigned);void*(*_T8)(struct _fat_ptr,struct _fat_ptr,unsigned);struct _fat_ptr _T9;struct _fat_ptr _TA;int(*_TB)(struct _fat_ptr,struct _fat_ptr,unsigned);void*(*_TC)(struct _fat_ptr,struct _fat_ptr,unsigned);struct _fat_ptr _TD;struct _fat_ptr _TE;struct _fat_ptr _TF;int _T10;int _T11;unsigned char*_T12;char*_T13;struct _fat_ptr _T14;int _T15;unsigned char*_T16;const char*_T17;unsigned _T18;unsigned char*_T19;char*_T1A;struct _fat_ptr _T1B;int _T1C;unsigned char*_T1D;unsigned char*_T1E;unsigned char _T1F;int _T20;struct _fat_ptr _T21;unsigned char*_T22;unsigned char*_T23;unsigned char _T24;int _T25;int(*_T26)(struct _fat_ptr,struct _fat_ptr,unsigned);void*(*_T27)(struct _fat_ptr,struct _fat_ptr,unsigned);struct _fat_ptr _T28;struct _fat_ptr _T29;struct _fat_ptr _T2A;int _T2B;unsigned char*_T2C;char*_T2D;unsigned _T2E;unsigned char*_T2F;char*_T30;int _T31;int _T32;struct _fat_ptr _T33;int _T34;unsigned char*_T35;char*_T36;struct _fat_ptr _T37;int _T38;unsigned char*_T39;char*_T3A;struct _fat_ptr _T3B;int _T3C;unsigned char*_T3D;char*_T3E;unsigned _T3F;unsigned char*_T40;char*_T41;struct _fat_ptr _T42;int _T43;unsigned char*_T44;char*_T45;unsigned _T46;unsigned char*_T47;char*_T48;struct _fat_ptr _T49;
# 269
int i=0;_T0=str;_T1=_T0.curr;_T2=(unsigned)_T1;
if(!_T2)goto _TLAD;goto _TLAE;_TLAD: _T4=Cyc___assert_fail;{int(*_T4A)(struct _fat_ptr,struct _fat_ptr,unsigned)=(int(*)(struct _fat_ptr,struct _fat_ptr,unsigned))_T4;_T3=_T4A;}_T5=_tag_fat("str",sizeof(char),4U);_T6=_tag_fat("xp.cyc",sizeof(char),7U);_T3(_T5,_T6,270U);_TLAE:
 if(base < 2)goto _TLAF;if(base > 36)goto _TLAF;goto _TLB0;_TLAF: _T8=Cyc___assert_fail;{int(*_T4A)(struct _fat_ptr,struct _fat_ptr,unsigned)=(int(*)(struct _fat_ptr,struct _fat_ptr,unsigned))_T8;_T7=_T4A;}_T9=_tag_fat("base >= 2 && base <= 36",sizeof(char),24U);_TA=_tag_fat("xp.cyc",sizeof(char),7U);_T7(_T9,_TA,271U);_TLB0:
# 273
 _TLB1:{int r=Cyc_XP_quotient(n,x,x,base);
if(i >= size)goto _TLB3;goto _TLB4;_TLB3: _TC=Cyc___assert_fail;{int(*_T4A)(struct _fat_ptr,struct _fat_ptr,unsigned)=(int(*)(struct _fat_ptr,struct _fat_ptr,unsigned))_TC;_TB=_T4A;}_TD=_tag_fat("i < size",sizeof(char),9U);_TE=_tag_fat("xp.cyc",sizeof(char),7U);_TB(_TD,_TE,274U);_TLB4: _TF=str;_T10=i;
i=_T10 + 1;_T11=_T10;{struct _fat_ptr _T4A=_fat_ptr_plus(_TF,sizeof(char),_T11);_T12=_check_fat_subscript(_T4A,sizeof(char),0U);_T13=(char*)_T12;{char _T4B=*_T13;_T14=Cyc_digits;_T15=r;_T16=_check_fat_subscript(_T14,sizeof(char),_T15);_T17=(const char*)_T16;{char _T4C=*_T17;_T18=_get_fat_size(_T4A,sizeof(char));if(_T18!=1U)goto _TLB5;if(_T4B!=0)goto _TLB5;if(_T4C==0)goto _TLB5;_throw_arraybounds();goto _TLB6;_TLB5: _TLB6: _T19=_T4A.curr;_T1A=(char*)_T19;*_T1A=_T4C;}}}
_TLB7: if(n > 1)goto _TLBA;else{goto _TLB9;}_TLBA: _T1B=x;_T1C=n - 1;_T1D=_check_fat_subscript(_T1B,sizeof(unsigned char),_T1C);_T1E=(unsigned char*)_T1D;_T1F=*_T1E;_T20=(int)_T1F;if(_T20==0)goto _TLB8;else{goto _TLB9;}
_TLB8: n=n + -1;goto _TLB7;_TLB9:;}
# 272
if(n > 1)goto _TLB1;else{goto _TLBB;}_TLBB: _T21=x;_T22=_check_fat_subscript(_T21,sizeof(unsigned char),0);_T23=(unsigned char*)_T22;_T24=*_T23;_T25=(int)_T24;if(_T25!=0)goto _TLB1;else{goto _TLB2;}_TLB2:
# 279
 if(i >= size)goto _TLBC;goto _TLBD;_TLBC: _T27=Cyc___assert_fail;{int(*_T4A)(struct _fat_ptr,struct _fat_ptr,unsigned)=(int(*)(struct _fat_ptr,struct _fat_ptr,unsigned))_T27;_T26=_T4A;}_T28=_tag_fat("i < size",sizeof(char),9U);_T29=_tag_fat("xp.cyc",sizeof(char),7U);_T26(_T28,_T29,279U);_TLBD: _T2A=str;_T2B=i;{struct _fat_ptr _T4A=_fat_ptr_plus(_T2A,sizeof(char),_T2B);_T2C=_check_fat_subscript(_T4A,sizeof(char),0U);_T2D=(char*)_T2C;{char _T4B=*_T2D;char _T4C='\000';_T2E=_get_fat_size(_T4A,sizeof(char));if(_T2E!=1U)goto _TLBE;if(_T4B!=0)goto _TLBE;if(_T4C==0)goto _TLBE;_throw_arraybounds();goto _TLBF;_TLBE: _TLBF: _T2F=_T4A.curr;_T30=(char*)_T2F;*_T30=_T4C;}}{
# 282
int j;
j=0;_TLC3: _T31=j;i=i + -1;_T32=i;if(_T31 < _T32)goto _TLC1;else{goto _TLC2;}
_TLC1: _T33=str;_T34=j;_T35=_check_fat_subscript(_T33,sizeof(char),_T34);_T36=(char*)_T35;{char c=*_T36;_T37=str;_T38=j;{struct _fat_ptr _T4A=_fat_ptr_plus(_T37,sizeof(char),_T38);_T39=_T4A.curr;_T3A=(char*)_T39;{char _T4B=*_T3A;_T3B=str;_T3C=i;_T3D=_check_fat_subscript(_T3B,sizeof(char),_T3C);_T3E=(char*)_T3D;{char _T4C=*_T3E;_T3F=_get_fat_size(_T4A,sizeof(char));if(_T3F!=1U)goto _TLC4;if(_T4B!=0)goto _TLC4;if(_T4C==0)goto _TLC4;_throw_arraybounds();goto _TLC5;_TLC4: _TLC5: _T40=_T4A.curr;_T41=(char*)_T40;*_T41=_T4C;}}}_T42=str;_T43=i;{struct _fat_ptr _T4A=_fat_ptr_plus(_T42,sizeof(char),_T43);_T44=_T4A.curr;_T45=(char*)_T44;{char _T4B=*_T45;char _T4C=c;_T46=_get_fat_size(_T4A,sizeof(char));if(_T46!=1U)goto _TLC6;if(_T4B!=0)goto _TLC6;if(_T4C==0)goto _TLC6;_throw_arraybounds();goto _TLC7;_TLC6: _TLC7: _T47=_T4A.curr;_T48=(char*)_T47;*_T48=_T4C;}}}
# 283
j=j + 1;goto _TLC3;_TLC2:;}_T49=str;
# 289
return _T49;}