コード例 #1
0
ファイル: rename_temps.c プロジェクト: FauxFaux/cyclone
static void*Cyc_RenameTemps_local_temp_var(int i){void**_T0;int _T1;char*_T2;void**_T3;void*_T4;void**_T5;int _T6;struct Cyc_Absyn_Unresolved_b_Absyn_Binding_struct*_T7;struct _tuple0*_T8;struct _fat_ptr*_T9;struct _fat_ptr _TA;struct Cyc_Int_pa_PrintArg_struct _TB;int _TC;struct _fat_ptr _TD;struct _fat_ptr _TE;void**_TF;int _T10;void*_T11;void*_T12;struct Cyc_Absyn_Unresolved_b_Absyn_Binding_struct*_T13;struct _tuple0*_T14;struct _fat_ptr*_T15;struct _fat_ptr _T16;struct Cyc_Int_pa_PrintArg_struct _T17;int _T18;struct _fat_ptr _T19;struct _fat_ptr _T1A;void*_T1B;
static void*memo_arr[256U]={};
if(i >= 256)goto _TL2;_T0=memo_arr;_T1=i;_T2=_check_known_subscript_notnull(_T0,256U,sizeof(void*),_T1);_T3=(void**)_T2;_T4=*_T3;
if(_T4!=0)goto _TL4;_T5=memo_arr;_T6=i;{struct Cyc_Absyn_Unresolved_b_Absyn_Binding_struct*_T1C=_cycalloc(sizeof(struct Cyc_Absyn_Unresolved_b_Absyn_Binding_struct));_T1C->tag=0;{struct _tuple0*_T1D=_cycalloc(sizeof(struct _tuple0));
_T1D->f0=Cyc_Absyn_Loc_n();{struct _fat_ptr*_T1E=_cycalloc(sizeof(struct _fat_ptr));{struct Cyc_Int_pa_PrintArg_struct _T1F;_T1F.tag=1;_TC=i;_T1F.f1=(unsigned)_TC;_TB=_T1F;}{struct Cyc_Int_pa_PrintArg_struct _T1F=_TB;void*_T20[1];_T20[0]=& _T1F;_TD=_tag_fat("_T%X",sizeof(char),5U);_TE=_tag_fat(_T20,sizeof(void*),1);_TA=Cyc_aprintf(_TD,_TE);}*_T1E=_TA;_T9=(struct _fat_ptr*)_T1E;}_T1D->f1=_T9;_T8=(struct _tuple0*)_T1D;}_T1C->f1=_T8;_T7=(struct Cyc_Absyn_Unresolved_b_Absyn_Binding_struct*)_T1C;}_T5[_T6]=(void*)_T7;goto _TL5;_TL4: _TL5: _TF=memo_arr;_T10=i;_T11=_TF[_T10];_T12=
_check_null(_T11);return _T12;_TL2:{struct Cyc_Absyn_Unresolved_b_Absyn_Binding_struct*_T1C=_cycalloc(sizeof(struct Cyc_Absyn_Unresolved_b_Absyn_Binding_struct));_T1C->tag=0;{struct _tuple0*_T1D=_cycalloc(sizeof(struct _tuple0));
# 51
_T1D->f0=Cyc_Absyn_Loc_n();{struct _fat_ptr*_T1E=_cycalloc(sizeof(struct _fat_ptr));{struct Cyc_Int_pa_PrintArg_struct _T1F;_T1F.tag=1;_T18=i;_T1F.f1=(unsigned)_T18;_T17=_T1F;}{struct Cyc_Int_pa_PrintArg_struct _T1F=_T17;void*_T20[1];_T20[0]=& _T1F;_T19=_tag_fat("_T%X",sizeof(char),5U);_T1A=_tag_fat(_T20,sizeof(void*),1);_T16=Cyc_aprintf(_T19,_T1A);}*_T1E=_T16;_T15=(struct _fat_ptr*)_T1E;}_T1D->f1=_T15;_T14=(struct _tuple0*)_T1D;}_T1C->f1=_T14;_T13=(struct Cyc_Absyn_Unresolved_b_Absyn_Binding_struct*)_T1C;}_T1B=(void*)_T13;return _T1B;}
コード例 #2
0
ファイル: rename_temps.c プロジェクト: FauxFaux/cyclone
static void*Cyc_RenameTemps_toplevel_temp_var(int i){struct Cyc_Absyn_Unresolved_b_Absyn_Binding_struct*_T0;struct _tuple0*_T1;struct _fat_ptr*_T2;struct _fat_ptr _T3;struct Cyc_Int_pa_PrintArg_struct _T4;int _T5;struct _fat_ptr _T6;struct _fat_ptr _T7;void*_T8;{struct Cyc_Absyn_Unresolved_b_Absyn_Binding_struct*_T9=_cycalloc(sizeof(struct Cyc_Absyn_Unresolved_b_Absyn_Binding_struct));_T9->tag=0;{struct _tuple0*_TA=_cycalloc(sizeof(struct _tuple0));
_TA->f0=Cyc_Absyn_Loc_n();{struct _fat_ptr*_TB=_cycalloc(sizeof(struct _fat_ptr));{struct Cyc_Int_pa_PrintArg_struct _TC;_TC.tag=1;_T5=i;_TC.f1=(unsigned)_T5;_T4=_TC;}{struct Cyc_Int_pa_PrintArg_struct _TC=_T4;void*_TD[1];_TD[0]=& _TC;_T6=_tag_fat("_TmpG%X",sizeof(char),8U);_T7=_tag_fat(_TD,sizeof(void*),1);_T3=Cyc_aprintf(_T6,_T7);}*_TB=_T3;_T2=(struct _fat_ptr*)_TB;}_TA->f1=_T2;_T1=(struct _tuple0*)_TA;}_T9->f1=_T1;_T0=(struct Cyc_Absyn_Unresolved_b_Absyn_Binding_struct*)_T9;}_T8=(void*)_T0;return _T8;}
コード例 #3
0
ファイル: apq.c プロジェクト: Denis-Ulybysh/CS590Project
struct _fat_ptr Cyc_APQ_tostr(struct Cyc_APQ_T*q,int base){struct Cyc_APQ_T*_T0;struct Cyc_AP_T*_T1;struct Cyc_AP_T*_T2;int _T3;struct _fat_ptr _T4;struct Cyc_APQ_T*_T5;struct Cyc_AP_T*_T6;int _T7;void*_T8;void*_T9;unsigned _TA;struct _fat_ptr _TB;struct Cyc_String_pa_PrintArg_struct _TC;struct _fat_ptr _TD;struct Cyc_APQ_T*_TE;struct Cyc_AP_T*_TF;int _T10;void*_T11;void*_T12;unsigned _T13;struct Cyc_String_pa_PrintArg_struct _T14;struct _fat_ptr _T15;struct Cyc_APQ_T*_T16;struct Cyc_AP_T*_T17;int _T18;void*_T19;void*_T1A;unsigned _T1B;struct _fat_ptr _T1C;struct _fat_ptr _T1D;_T0=
_check_null(q);_T1=_T0->d;_T2=Cyc_AP_one;_T3=Cyc_AP_cmp(_T1,_T2);if(_T3!=0)goto _TLE;_T5=q;_T6=_T5->n;_T7=base;{char*_T1E=
Cyc_AP_tostr(_T6,_T7);_T8=(void*)_T1E;_T9=(void*)_T1E;_TA=_get_zero_arr_size_char(_T9,1U);_T4=_tag_fat(_T8,sizeof(char),_TA);}return _T4;_TLE:{struct Cyc_String_pa_PrintArg_struct _T1E;_T1E.tag=0;_TE=q;_TF=_TE->n;_T10=base;{char*_T1F=
Cyc_AP_tostr(_TF,_T10);_T11=(void*)_T1F;_T12=(void*)_T1F;_T13=_get_zero_arr_size_char(_T12,1U);_TD=_tag_fat(_T11,sizeof(char),_T13);}_T1E.f1=_TD;_TC=_T1E;}{struct Cyc_String_pa_PrintArg_struct _T1E=_TC;{struct Cyc_String_pa_PrintArg_struct _T1F;_T1F.tag=0;_T16=q;_T17=_T16->d;_T18=base;{char*_T20=Cyc_AP_tostr(_T17,_T18);_T19=(void*)_T20;_T1A=(void*)_T20;_T1B=_get_zero_arr_size_char(_T1A,1U);_T15=_tag_fat(_T19,sizeof(char),_T1B);}_T1F.f1=_T15;_T14=_T1F;}{struct Cyc_String_pa_PrintArg_struct _T1F=_T14;void*_T20[2];_T20[0]=& _T1E;_T20[1]=& _T1F;_T1C=_tag_fat("%s/%s",sizeof(char),6U);_T1D=_tag_fat(_T20,sizeof(void*),2);_TB=Cyc_aprintf(_T1C,_T1D);}}return _TB;}
コード例 #4
0
ファイル: position.c プロジェクト: pippijn/cyclone-boot
struct _fat_ptr Cyc_Position_string_of_loc(unsigned int seg) {
  struct _fat_ptr _T0;
  unsigned int _T1;
  int _T2;
  long _T3;
  struct _fat_ptr _T4;
  struct Cyc_String_pa_PrintArg_struct _T5;
  struct Cyc_Lineno_Pos * _T6;
  struct Cyc_Int_pa_PrintArg_struct _T7;
  struct Cyc_Lineno_Pos * _T8;
  int _T9;
  struct _fat_ptr _TA;
  struct _fat_ptr _TB;
  struct _fat_ptr _TC;
  struct Cyc_String_pa_PrintArg_struct _TD;
  struct Cyc_Lineno_Pos * _TE;
  struct Cyc_Int_pa_PrintArg_struct _TF;
  struct Cyc_Lineno_Pos * _T10;
  int _T11;
  struct Cyc_Int_pa_PrintArg_struct _T12;
  struct Cyc_Lineno_Pos * _T13;
  int _T14;
  struct _fat_ptr _T15;
  struct _fat_ptr _T16;
  struct _tuple0 _T17 = Cyc_Position_seg_to_loc(seg);
  unsigned int _T18;
  struct _fat_ptr _T19;
  _T19 = _T17.f0;
  _T18 = _T17.f1;
  { struct _fat_ptr source = _T19;
    unsigned int loc = _T18;
    _T0 = source;
    _T1 = loc;
    _T2 = (int)_T1;
    { struct Cyc_Lineno_Pos * pos = Cyc_Lineno_pos_of_abs(_T0,_T2);
      _T3 = Cyc_Position_use_gcc_style_location;
      if (! _T3) { goto _TL4;
      }
      { struct Cyc_String_pa_PrintArg_struct _T1A;
	_T1A.tag = 0;
	_T6 = pos;
	_T1A.f1 = _T6->logical_file;
	_T5 = _T1A;
      }{ struct Cyc_String_pa_PrintArg_struct _T1A = _T5;
	{ struct Cyc_Int_pa_PrintArg_struct _T1B;
	  _T1B.tag = 1;
	  _T8 = pos;
	  _T9 = _T8->line_no;
	  _T1B.f1 = (unsigned long)_T9;
	  _T7 = _T1B;
	}{ struct Cyc_Int_pa_PrintArg_struct _T1B = _T7;
	  void * _T1C[2];
	  _T1C[0] = &_T1A;
	  _T1C[1] = &_T1B;
	  _TA = _tag_fat("%s:%d",sizeof(char),6U);
	  _TB = _tag_fat(_T1C,sizeof(void *),2);
	  _T4 = Cyc_aprintf(_TA,_TB);
	}
      }return _T4;
      _TL4: { struct Cyc_String_pa_PrintArg_struct _T1A;
	_T1A.tag = 0;
	_TE = pos;
	_T1A.f1 = _TE->logical_file;
	_TD = _T1A;
      }{ struct Cyc_String_pa_PrintArg_struct _T1A = _TD;
	{ struct Cyc_Int_pa_PrintArg_struct _T1B;
	  _T1B.tag = 1;
	  _T10 = pos;
	  _T11 = _T10->line_no;
	  _T1B.f1 = (unsigned long)_T11;
	  _TF = _T1B;
	}{ struct Cyc_Int_pa_PrintArg_struct _T1B = _TF;
	  { struct Cyc_Int_pa_PrintArg_struct _T1C;
	    _T1C.tag = 1;
	    _T13 = pos;
	    _T14 = _T13->col;
	    _T1C.f1 = (unsigned long)_T14;
	    _T12 = _T1C;
	  }{ struct Cyc_Int_pa_PrintArg_struct _T1C = _T12;
	    void * _T1D[3];
	    _T1D[0] = &_T1A;
	    _T1D[1] = &_T1B;
	    _T1D[2] = &_T1C;
	    _T15 = _tag_fat("%s:(%d:%d)",sizeof(char),11U);
	    _T16 = _tag_fat(_T1D,sizeof(void *),3);
	    _TC = Cyc_aprintf(_T15,_T16);
	  }
	}
      }return _TC;
    }
  }
}
コード例 #5
0
ファイル: position.c プロジェクト: pippijn/cyclone-boot
struct _fat_ptr Cyc_Position_get_line_directive(unsigned int s) {
  struct _fat_ptr _T0;
  unsigned char * _T1;
  unsigned int _T2;
  struct _fat_ptr _T3;
  unsigned int _T4;
  int _T5;
  struct _fat_ptr _T6;
  struct Cyc_Int_pa_PrintArg_struct _T7;
  struct Cyc_Lineno_Pos * _T8;
  int _T9;
  struct Cyc_String_pa_PrintArg_struct _TA;
  struct Cyc_Lineno_Pos * _TB;
  struct _fat_ptr _TC;
  struct _fat_ptr _TD;
  struct _fat_ptr _TE;
  struct _tuple0 _TF = Cyc_Position_seg_to_loc(s);
  unsigned int _T10;
  struct _fat_ptr _T11;
  _T11 = _TF.f0;
  _T10 = _TF.f1;
  { struct _fat_ptr source = _T11;
    unsigned int loc = _T10;
    _T0 = source;
    _T1 = _T0.curr;
    _T2 = (unsigned int)_T1;
    if (! _T2) { goto _TLC;
    }
    _T3 = source;
    _T4 = loc;
    _T5 = (int)_T4;
    { struct Cyc_Lineno_Pos * pos_s = Cyc_Lineno_pos_of_abs(_T3,_T5);
      if (pos_s == 0) { goto _TLE;
      }
      { struct Cyc_Int_pa_PrintArg_struct _T12;
	_T12.tag = 1;
	_T8 = pos_s;
	_T9 = _T8->line_no;
	_T12.f1 = (unsigned long)_T9;
	_T7 = _T12;
      }{ struct Cyc_Int_pa_PrintArg_struct _T12 = _T7;
	{ struct Cyc_String_pa_PrintArg_struct _T13;
	  _T13.tag = 0;
	  _TB = pos_s;
	  _T13.f1 = _TB->logical_file;
	  _TA = _T13;
	}{ struct Cyc_String_pa_PrintArg_struct _T13 = _TA;
	  void * _T14[2];
	  _T14[0] = &_T12;
	  _T14[1] = &_T13;
	  _TC = _tag_fat("\n#line %d \"%s\"\n",sizeof(char),16U);
	  _TD = _tag_fat(_T14,sizeof(void *),2);
	  _T6 = Cyc_aprintf(_TC,_TD);
	}
      }return _T6;
      _TLE: ;
    }goto _TLD;
    _TLC: _TLD: _TE = _tag_fat(0,0,0);
    return _TE;
  }
}
コード例 #6
0
ファイル: position.c プロジェクト: pippijn/cyclone-boot
static struct _fat_ptr Cyc_Position_string_of_pos_pr(struct Cyc_Lineno_Pos * pos) {
  long _T0;
  struct _fat_ptr _T1;
  struct Cyc_String_pa_PrintArg_struct _T2;
  struct Cyc_Lineno_Pos * _T3;
  struct Cyc_Int_pa_PrintArg_struct _T4;
  struct Cyc_Lineno_Pos * _T5;
  int _T6;
  struct _fat_ptr _T7;
  struct _fat_ptr _T8;
  struct _fat_ptr _T9;
  struct Cyc_String_pa_PrintArg_struct _TA;
  struct Cyc_Lineno_Pos * _TB;
  struct Cyc_Int_pa_PrintArg_struct _TC;
  struct Cyc_Lineno_Pos * _TD;
  int _TE;
  struct Cyc_Int_pa_PrintArg_struct _TF;
  struct Cyc_Lineno_Pos * _T10;
  int _T11;
  struct _fat_ptr _T12;
  struct _fat_ptr _T13;
  _T0 = Cyc_Position_use_gcc_style_location;
  if (! _T0) { goto _TL6;
  }
  { struct Cyc_String_pa_PrintArg_struct _T14;
    _T14.tag = 0;
    _T3 = pos;
    _T14.f1 = _T3->logical_file;
    _T2 = _T14;
  }{ struct Cyc_String_pa_PrintArg_struct _T14 = _T2;
    { struct Cyc_Int_pa_PrintArg_struct _T15;
      _T15.tag = 1;
      _T5 = pos;
      _T6 = _T5->line_no;
      _T15.f1 = (unsigned long)_T6;
      _T4 = _T15;
    }{ struct Cyc_Int_pa_PrintArg_struct _T15 = _T4;
      void * _T16[2];
      _T16[0] = &_T14;
      _T16[1] = &_T15;
      _T7 = _tag_fat("%s:%d",sizeof(char),6U);
      _T8 = _tag_fat(_T16,sizeof(void *),2);
      _T1 = Cyc_aprintf(_T7,_T8);
    }
  }return _T1;
  _TL6: { struct Cyc_String_pa_PrintArg_struct _T14;
    _T14.tag = 0;
    _TB = pos;
    _T14.f1 = _TB->logical_file;
    _TA = _T14;
  }{ struct Cyc_String_pa_PrintArg_struct _T14 = _TA;
    { struct Cyc_Int_pa_PrintArg_struct _T15;
      _T15.tag = 1;
      _TD = pos;
      _TE = _TD->line_no;
      _T15.f1 = (unsigned long)_TE;
      _TC = _T15;
    }{ struct Cyc_Int_pa_PrintArg_struct _T15 = _TC;
      { struct Cyc_Int_pa_PrintArg_struct _T16;
	_T16.tag = 1;
	_T10 = pos;
	_T11 = _T10->col;
	_T16.f1 = (unsigned long)_T11;
	_TF = _T16;
      }{ struct Cyc_Int_pa_PrintArg_struct _T16 = _TF;
	void * _T17[3];
	_T17[0] = &_T14;
	_T17[1] = &_T15;
	_T17[2] = &_T16;
	_T12 = _tag_fat("%s:(%d:%d)",sizeof(char),11U);
	_T13 = _tag_fat(_T17,sizeof(void *),3);
	_T9 = Cyc_aprintf(_T12,_T13);
      }
    }
  }return _T9;
}