- Timestamp:
- Mar 23, 2017, 5:20:33 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 231f01c, f20dffa
- Parents:
- 1ca52db (diff), 578b637 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- src
- Files:
-
- 1 added
- 11 edited
-
CodeGen/CodeGenerator.cc (modified) (1 diff)
-
libcfa/Makefile.am (modified) (1 diff)
-
libcfa/Makefile.in (modified) (1 diff)
-
libcfa/fstream.c (modified) (4 diffs)
-
libcfa/iostream.c (modified) (3 diffs)
-
tests/.expect/32/KRfunctions.txt (modified) (3 diffs)
-
tests/.expect/32/attributes.txt (added)
-
tests/.expect/64/KRfunctions.txt (modified) (3 diffs)
-
tests/.expect/64/attributes.txt (modified) (4 diffs)
-
tests/Makefile.am (modified) (1 diff)
-
tests/Makefile.in (modified) (1 diff)
-
tests/test.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
r1ca52db rfe1b6a4 147 147 148 148 void CodeGenerator::visit( ObjectDecl * objectDecl ) { 149 if (objectDecl->get_name().empty()) { 150 static UniqueName name = { "__anonymous_object" }; 151 objectDecl->set_name( name.newName() ); 152 } 153 149 154 extension( objectDecl ); 150 155 genAttributes( objectDecl->get_attributes() ); -
src/libcfa/Makefile.am
r1ca52db rfe1b6a4 35 35 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -D__CFA_DEBUG__ -O0 -c -o $@ $< 36 36 37 EXTRA_FLAGS = -g -Wall -W no-unused-function -I${abs_top_srcdir}/src/libcfa/libhdr -imacros libcfa-prelude.c @CFA_FLAGS@37 EXTRA_FLAGS = -g -Wall -Werror -Wno-unused-function -I${abs_top_srcdir}/src/libcfa/libhdr -imacros libcfa-prelude.c @CFA_FLAGS@ 38 38 39 39 AM_CCASFLAGS = @CFA_FLAGS@ -
src/libcfa/Makefile.in
r1ca52db rfe1b6a4 305 305 AUTOMAKE_OPTIONS = subdir-objects 306 306 lib_LIBRARIES = $(am__append_1) $(am__append_2) 307 EXTRA_FLAGS = -g -Wall -W no-unused-function -I${abs_top_srcdir}/src/libcfa/libhdr -imacros libcfa-prelude.c @CFA_FLAGS@307 EXTRA_FLAGS = -g -Wall -Werror -Wno-unused-function -I${abs_top_srcdir}/src/libcfa/libhdr -imacros libcfa-prelude.c @CFA_FLAGS@ 308 308 AM_CCASFLAGS = @CFA_FLAGS@ 309 309 headers = limits stdlib math iostream fstream iterator rational assert \ -
src/libcfa/fstream.c
r1ca52db rfe1b6a4 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Mar 22 16:17:21 201713 // Update Count : 22 112 // Last Modified On : Thu Mar 23 08:20:41 2017 13 // Update Count : 226 14 14 // 15 15 … … 29 29 #define IO_MSG "I/O error: " 30 30 31 void ?{}( ofstream * this, void * file, _Bool sepDefault, _Bool sepOnOff, const char * separator, const char * tupleSeparator ) { 32 this->file = file; 33 this->sepDefault = sepDefault; 34 this->sepOnOff = sepOnOff; 35 sepSet( this, separator ); 36 sepSetCur( this, sepGet( this ) ); 37 sepSetTuple( this, tupleSeparator ); 38 } 39 31 40 _Bool sepPrt( ofstream * os ) { return os->sepOnOff; } 32 41 void sepOn( ofstream * os ) { os->sepOnOff = 1; } … … 83 92 exit( EXIT_FAILURE ); 84 93 } // if 85 os->file = file; 86 sepOff( os ); 87 sepSet( os, " " ); 94 ?{}( os, file, 1, 0, " ", ", " ); 88 95 } // open 89 96 … … 125 132 } // fmt 126 133 127 void ?{}( ofstream * this, void * file, _Bool sepDefault, _Bool sepOnOff, const char * separator, const char * tupleSeparator ) {128 this->file = file;129 this->sepDefault = sepDefault;130 this->sepOnOff = sepOnOff;131 sepSet( this, separator );132 sepSetCur( this, sepGet( this ) );133 sepSetTuple( this, tupleSeparator );134 }135 136 134 static ofstream soutFile = { (FILE *)(&_IO_2_1_stdout_), 1, 0, " ", ", " }; 137 135 ofstream *sout = &soutFile; -
src/libcfa/iostream.c
r1ca52db rfe1b6a4 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Mar 22 17:46:06201713 // Update Count : 3 5912 // Last Modified On : Thu Mar 23 08:20:40 2017 13 // Update Count : 367 14 14 // 15 15 … … 201 201 forall( dtype ostype, otype T, ttype Params | ostream( ostype ) | writeable( T ) | { ostype * ?|?( ostype *, Params ); } ) 202 202 ostype * ?|?( ostype * os, T arg, Params rest ) { 203 forall( ttype Params ) ostype * prtTuple( T arg, Params rest ) {204 os | arg; // print first argument205 os | rest; // print remaining arguments206 return os;207 } // prtTuple208 203 sepSetCur( os, sepGetTuple( os ) ); // switch to tuple separator 209 prtTuple( arg, rest ); // recursively print tuple 204 os | arg; // print first argument 205 os | rest; // print remaining arguments 210 206 sepSetCur( os, sepGet( os ) ); // switch to regular separator 211 207 return os; … … 223 219 os | '\n'; 224 220 flush( os ); 225 sepOff( os ); 221 sepOff( os ); // prepare for next line 226 222 return os; 227 223 } // endl -
src/tests/.expect/32/KRfunctions.txt
r1ca52db rfe1b6a4 47 47 int ___retval_f5__i_1; 48 48 } 49 int (*__f6__FPFi_i__iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1))(int ){50 int (*___retval_f6__PFi_i__1)(int );49 int (*__f6__FPFi_i__iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1))(int __anonymous_object0){ 50 int (*___retval_f6__PFi_i__1)(int __anonymous_object1); 51 51 } 52 52 int (*__f7__FPFi_ii__iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1))(int __a__i_1, int __b__i_1){ … … 61 61 int *(*__f10__FPFPi_ii__iPiPid__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1, double __y__d_1))(int __x__i_1, int __y__i_1){ 62 62 int *(*___retval_f10__PFPi_ii__1)(int __x__i_1, int __y__i_1); 63 int *__x__FPi_ii__2(int , int);63 int *__x__FPi_ii__2(int __anonymous_object2, int __anonymous_object3); 64 64 ((void)(___retval_f10__PFPi_ii__1=__x__FPi_ii__2) /* ?{} */); 65 65 return ((int *(*)(int __x__i_1, int __y__i_1))___retval_f10__PFPi_ii__1); … … 79 79 const int __fred__FCi___1(){ 80 80 const int ___retval_fred__Ci_1; 81 int *(*__x__PFPi_ii__2)(int , int);81 int *(*__x__PFPi_ii__2)(int __anonymous_object4, int __anonymous_object5); 82 82 int __a__i_2; 83 83 int __b__i_2; -
src/tests/.expect/64/KRfunctions.txt
r1ca52db rfe1b6a4 47 47 int ___retval_f5__i_1; 48 48 } 49 int (*__f6__FPFi_i__iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1))(int ){50 int (*___retval_f6__PFi_i__1)(int );49 int (*__f6__FPFi_i__iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1))(int __anonymous_object0){ 50 int (*___retval_f6__PFi_i__1)(int __anonymous_object1); 51 51 } 52 52 int (*__f7__FPFi_ii__iPiPi__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1))(int __a__i_1, int __b__i_1){ … … 61 61 int *(*__f10__FPFPi_ii__iPiPid__1(int __a__i_1, int *__b__Pi_1, int *__c__Pi_1, double __y__d_1))(int __x__i_1, int __y__i_1){ 62 62 int *(*___retval_f10__PFPi_ii__1)(int __x__i_1, int __y__i_1); 63 int *__x__FPi_ii__2(int , int);63 int *__x__FPi_ii__2(int __anonymous_object2, int __anonymous_object3); 64 64 ((void)(___retval_f10__PFPi_ii__1=__x__FPi_ii__2) /* ?{} */); 65 65 return ((int *(*)(int __x__i_1, int __y__i_1))___retval_f10__PFPi_ii__1); … … 79 79 const int __fred__FCi___1(){ 80 80 const int ___retval_fred__Ci_1; 81 int *(*__x__PFPi_ii__2)(int , int);81 int *(*__x__PFPi_ii__2)(int __anonymous_object4, int __anonymous_object5); 82 82 int __a__i_2; 83 83 int __b__i_2; -
src/tests/.expect/64/attributes.txt
r1ca52db rfe1b6a4 58 58 __attribute__ ((used,unused,unused)) int __f7__i_1; 59 59 __attribute__ ((used,used,unused)) int __f8__i_1; 60 __attribute__ ((unused)) int ;60 __attribute__ ((unused)) int __anonymous_object0; 61 61 __attribute__ ((unused,unused)) int *__f9__Pi_1; 62 62 }; … … 226 226 int **const ___retval_f2__CPPi_1; 227 227 } 228 __attribute__ ((unused,used,unused)) int (*__f3__FPA0i_i__1(int ))[];228 __attribute__ ((unused,used,unused)) int (*__f3__FPA0i_i__1(int __anonymous_object1))[]; 229 229 __attribute__ ((unused,unused)) int (*__f3__FPA0i_i__1(int __p__i_1))[]{ 230 230 int (*___retval_f3__PA0i_1)[]; 231 231 } 232 __attribute__ ((unused,used,unused)) int (*__f4__FPFi_i____1())(int );233 __attribute__ ((unused,unused)) int (*__f4__FPFi_i____1())(int ){234 int (*___retval_f4__PFi_i__1)(int );232 __attribute__ ((unused,used,unused)) int (*__f4__FPFi_i____1())(int __anonymous_object2); 233 __attribute__ ((unused,unused)) int (*__f4__FPFi_i____1())(int __anonymous_object3){ 234 int (*___retval_f4__PFi_i__1)(int __anonymous_object4); 235 235 } 236 236 __attribute__ ((__nothrow__,__leaf__,__malloc__)) extern void *malloc(long unsigned int __size); 237 237 __attribute__ ((__nothrow__,__leaf__)) extern void free(void *__ptr); 238 238 __attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void abort(void); 239 __attribute__ ((__nothrow__,__leaf__,__nonnull__(1))) extern int atexit0(void (*__func)(void), void * , void *);239 __attribute__ ((__nothrow__,__leaf__,__nonnull__(1))) extern int atexit0(void (*__func)(void), void *__anonymous_object5, void *__anonymous_object6); 240 240 __attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void exit(int __status); 241 241 __attribute__ ((format(printf, 1, 2))) extern int printf(const char *__restrict __format, ...); … … 268 268 int __tpr2__Fi_PPi__1(__attribute__ ((unused,unused,unused,unused,unused,unused)) int **__Foo__PPi_1); 269 269 int __tpr3__Fi_Pi__1(__attribute__ ((unused,unused,unused)) int *__Foo__Pi_1); 270 int __tpr4__Fi_PFi_Pi___1(__attribute__ ((unused,unused)) int (* )(__attribute__ ((unused,unused)) int[((long unsigned int )5)]));270 int __tpr4__Fi_PFi_Pi___1(__attribute__ ((unused,unused)) int (*__anonymous_object7)(__attribute__ ((unused,unused)) int __anonymous_object8[((long unsigned int )5)])); 271 271 int __tpr5__Fi_PFi____1(__attribute__ ((unused,unused,unused)) int (*__Foo__PFi___1)()); 272 272 int __tpr6__Fi_PFi____1(__attribute__ ((unused,unused,unused)) int (*__Foo__PFi___1)()); 273 int __tpr7__Fi_PFi_PFi_i____1(__attribute__ ((unused,unused)) int (* )(__attribute__ ((unused)) int (*)(__attribute__ ((unused,unused)) int)));273 int __tpr7__Fi_PFi_PFi_i____1(__attribute__ ((unused,unused)) int (*__anonymous_object9)(__attribute__ ((unused)) int (*__anonymous_object10)(__attribute__ ((unused,unused)) int __anonymous_object11))); 274 274 int __ad__Fi___1(){ 275 275 int ___retval_ad__i_1; … … 320 320 ((void)sizeof(enum __anonymous5 )); 321 321 } 322 int __apd1__Fi_PiPi__1(__attribute__ ((unused,unused,unused)) int * , __attribute__ ((unused,unused,unused)) int *);323 int __apd2__Fi_PPiPPi__1(__attribute__ ((unused,unused,unused,unused)) int ** , __attribute__ ((unused,unused,unused,unused)) int **);324 int __apd3__Fi_PiPi__1(__attribute__ ((unused,unused,unused)) int * , __attribute__ ((unused,unused,unused)) int *);325 int __apd4__Fi_PFi__PFi____1(__attribute__ ((unused,unused,unused)) int (* )(), __attribute__ ((unused,unused,unused)) int (*)());326 int __apd5__Fi_PFi_i_PFi_i___1(__attribute__ ((unused,unused,unused)) int (* )(__attribute__ ((unused)) int ), __attribute__ ((unused,unused,unused)) int (*)(__attribute__ ((unused)) int));327 int __apd6__Fi_PFi__PFi____1(__attribute__ ((unused,unused,unused)) int (* )(), __attribute__ ((unused,unused,unused)) int (*)());328 int __apd7__Fi_PFi_i_PFi_i___1(__attribute__ ((unused,unused,unused)) int (* )(__attribute__ ((unused)) int ), __attribute__ ((unused,unused,unused)) int (*)(__attribute__ ((unused)) int));322 int __apd1__Fi_PiPi__1(__attribute__ ((unused,unused,unused)) int *__anonymous_object12, __attribute__ ((unused,unused,unused)) int *__anonymous_object13); 323 int __apd2__Fi_PPiPPi__1(__attribute__ ((unused,unused,unused,unused)) int **__anonymous_object14, __attribute__ ((unused,unused,unused,unused)) int **__anonymous_object15); 324 int __apd3__Fi_PiPi__1(__attribute__ ((unused,unused,unused)) int *__anonymous_object16, __attribute__ ((unused,unused,unused)) int *__anonymous_object17); 325 int __apd4__Fi_PFi__PFi____1(__attribute__ ((unused,unused,unused)) int (*__anonymous_object18)(), __attribute__ ((unused,unused,unused)) int (*__anonymous_object19)()); 326 int __apd5__Fi_PFi_i_PFi_i___1(__attribute__ ((unused,unused,unused)) int (*__anonymous_object20)(__attribute__ ((unused)) int __anonymous_object21), __attribute__ ((unused,unused,unused)) int (*__anonymous_object22)(__attribute__ ((unused)) int __anonymous_object23)); 327 int __apd6__Fi_PFi__PFi____1(__attribute__ ((unused,unused,unused)) int (*__anonymous_object24)(), __attribute__ ((unused,unused,unused)) int (*__anonymous_object25)()); 328 int __apd7__Fi_PFi_i_PFi_i___1(__attribute__ ((unused,unused,unused)) int (*__anonymous_object26)(__attribute__ ((unused)) int __anonymous_object27), __attribute__ ((unused,unused,unused)) int (*__anonymous_object28)(__attribute__ ((unused)) int __anonymous_object29)); 329 329 struct Vad { 330 __attribute__ ((unused)) int ;331 __attribute__ ((unused,unused)) int * ;332 __attribute__ ((unused,unused)) int [((long unsigned int )10)];333 __attribute__ ((unused,unused)) int (* )();330 __attribute__ ((unused)) int __anonymous_object30; 331 __attribute__ ((unused,unused)) int *__anonymous_object31; 332 __attribute__ ((unused,unused)) int __anonymous_object32[((long unsigned int )10)]; 333 __attribute__ ((unused,unused)) int (*__anonymous_object33)(); 334 334 }; 335 335 static inline void ___constructor__F_P4sVad_autogen___1(struct Vad *___dst__P4sVad_1); -
src/tests/Makefile.am
r1ca52db rfe1b6a4 51 51 @+python test.py --list --concurrent=${concurrent} 52 52 53 .dummy : .dummy.c 54 ${CC} ${CFLAGS} -XCFA -n ${<} -o ${@} 55 53 56 constant0-1DP : constant0-1.c 54 57 ${CC} ${CFLAGS} -DDUPS ${<} -o ${@} -
src/tests/Makefile.in
r1ca52db rfe1b6a4 669 669 @+python test.py --list --concurrent=${concurrent} 670 670 671 .dummy : .dummy.c 672 ${CC} ${CFLAGS} -XCFA -n ${<} -o ${@} 673 671 674 constant0-1DP : constant0-1.c 672 675 ${CC} ${CFLAGS} -DDUPS ${<} -o ${@} -
src/tests/test.py
r1ca52db rfe1b6a4 25 25 # parses the Makefile to find the machine type (32-bit / 64-bit) 26 26 def getMachineType(): 27 sh('echo " int main() { return 0;}" > .dummy.c')27 sh('echo "void ?{}(int*a,int b){}int main(){return 0;}" > .dummy.c') 28 28 sh("make .dummy", print2stdout=False) 29 29 _, out = sh("file .dummy", print2stdout=False)
Note:
See TracChangeset
for help on using the changeset viewer.