- Timestamp:
- Aug 3, 2016, 11:22:09 AM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- f9cebb5
- Parents:
- 8a443f4 (diff), aea7168 (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:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Box.cc
r8a443f4 r73bf8cf2 619 619 return 0; 620 620 } 621 621 622 622 /// Returns T if the given declaration is a function with parameters (T*, T) for some TypeInstType T, NULL otherwise 623 623 TypeInstType *isTypeInstPtrValFn( DeclarationWithType *decl ) { … … 637 637 return 0; 638 638 } 639 639 640 640 /// Returns T if the given declaration is (*?=?)(T *, T) for some TypeInstType T (return not checked, but maybe should be), NULL otherwise 641 641 TypeInstType *isTypeInstAssignment( DeclarationWithType *decl ) { … … 677 677 return 0; 678 678 } 679 679 680 680 /// Returns T if the given declaration is a function with parameters (T*, T) for some type T, where neither parameter is cv-qualified, 681 681 /// NULL otherwise … … 772 772 copyOps.beginScope(); 773 773 dtorOps.beginScope(); 774 774 775 775 DeclarationWithType *oldRetval = retval; 776 776 bool oldUseRetval = useRetval; … … 1471 1471 VariableExpr *wrapFunctionDecl( DeclarationWithType *functionDecl ) { 1472 1472 // line below cloned from FixFunction.cc 1473 // xxx - functionObj is never added to a list of declarations... 1473 1474 ObjectDecl *functionObj = new ObjectDecl( functionDecl->get_name(), functionDecl->get_storageClass(), functionDecl->get_linkage(), 0, 1474 1475 new PointerType( Type::Qualifiers(), functionDecl->get_type()->clone() ), 0 ); 1475 1476 functionObj->set_mangleName( functionDecl->get_mangleName() ); 1477 functionObj->set_scopeLevel( functionDecl->get_scopeLevel() ); 1476 1478 return new VariableExpr( functionObj ); 1477 1479 } … … 1492 1494 = ParamEntry( assertOp->get_uniqueId(), assertOp->get_type()->clone(), actualDecl->get_type()->clone(), wrapFunctionDecl( assertOp ) ); 1493 1495 } 1494 1496 1495 1497 Statement * Pass1::mutate( ReturnStmt *returnStmt ) { 1496 1498 if ( retval && returnStmt->get_expr() ) { … … 1554 1556 DeclarationWithType *assertDtor = findOpForType( formalType, dtorOps, scopedDtorOps ); 1555 1557 if ( ! assertDtor ) throw SemanticError( "No destructor found for ", formalType ); 1556 1558 1557 1559 // add inferred parameters for otype operators to assignment expression 1558 1560 // NOTE: Code here assumes that first four assertions are assign op, ctor, copy ctor, dtor, in that order … … 1568 1570 ++actualIt; 1569 1571 addAssertionFor( assignExpr, *actualIt, assertDtor ); 1570 1571 //DeclarationWithType *actualDecl = asserts.front(); 1572 //assignExpr->get_inferParams()[ actualDecl->get_uniqueId() ] 1573 // = ParamEntry( assertAssign->get_uniqueId(), assertAssign->get_type()->clone(), actualDecl->get_type()->clone(), wrapFunctionDecl( assertAssign ) ); 1572 1574 1573 } 1575 1574 } … … 2181 2180 bool PolyGenericCalculator::findGeneric( Type *ty ) { 2182 2181 ty = replaceTypeInst( ty, env ); 2183 2182 2184 2183 if ( TypeInstType *typeInst = dynamic_cast< TypeInstType* >( ty ) ) { 2185 2184 if ( scopeTyVars.find( typeInst->get_name() ) != scopeTyVars.end() ) { -
src/driver/cfa.cc
r8a443f4 r73bf8cf2 10 10 // Created On : Tue Aug 20 13:44:49 2002 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Jul 7 08:56:01 201613 // Update Count : 14 412 // Last Modified On : Tue Aug 2 12:23:11 2016 13 // Update Count : 147 14 14 // 15 15 … … 87 87 bool cpp_flag = false; // -E or -M flag, preprocessor only 88 88 bool std_flag = false; // -std= flag 89 bool noincstd_flag = false; // -no-include-std= flag 89 90 bool debugging __attribute(( unused )) = false; // -g flag 90 91 … … 144 145 } else if ( arg == "-nohelp" ) { 145 146 help = false; // strip the nohelp flag 147 } else if ( arg == "-no-include-std" ) { 148 noincstd_flag = true; // strip the no-include-std flag 146 149 } else if ( arg == "-compiler" ) { 147 150 // use the user specified compiler … … 248 251 args[nargs] = "-I" CFA_INCDIR; 249 252 nargs += 1; 250 args[nargs] = "-I" CFA_INCDIR "/stdhdr"; 251 nargs += 1; 253 if ( ! noincstd_flag ) { // do not use during build 254 args[nargs] = "-I" CFA_INCDIR "/stdhdr"; 255 nargs += 1; 256 } // if 252 257 args[nargs] = "-I" CFA_INCDIR "/containers"; 253 258 nargs += 1; -
src/libcfa/Makefile.am
r8a443f4 r73bf8cf2 11 11 ## Created On : Sun May 31 08:54:01 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Fri Jul 8 23:05:11201614 ## Update Count : 19 213 ## Last Modified On : Tue Aug 2 12:17:23 2016 14 ## Update Count : 196 15 15 ############################################################################### 16 16 … … 26 26 # create extra forward types/declarations to reduce inclusion of library files 27 27 extras.cf : extras.regx extras.c 28 $ (AM_V_GEN)@BACKEND_CC@ @CFA_FLAGS@ -E ${srcdir}/extras.c | grep -f extras.regx > ${srcdir}/extras.cf28 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -E ${srcdir}/extras.c | grep -f extras.regx > ${srcdir}/extras.cf 29 29 30 30 # create forward declarations for gcc builtins 31 31 builtins.cf : builtins.c 32 $ (AM_V_GEN)if [ -e $< ] ; then \32 ${AM_V_GEN}if [ -e $< ] ; then \ 33 33 @BACKEND_CC@ -E -P $^ | sed -e "/targetm/s/.*//" -e "/_Decimal/s/.*//" -e "s/void (const char \*)0();//" -e "s/\"//g" -e "s/\(__builtin_\) /\1/" > $@ ; \ 34 34 fi 35 35 36 36 builtins.c : builtins.def prototypes.awk 37 $ (AM_V_GEN)if [ -e $< ] ; then \37 ${AM_V_GEN}if [ -e $< ] ; then \ 38 38 @BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@ ; \ 39 39 fi … … 48 48 49 49 libcfa-prelude.c : ${srcdir}/prelude.cf ${srcdir}/extras.cf ${srcdir}/builtins.cf 50 $ (AM_V_GEN)${abs_top_srcdir}/src/driver/cfa-cpp -l ${srcdir}/prelude.cf $@ # use src/cfa-cpp as not in lib until after install50 ${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -l ${srcdir}/prelude.cf $@ # use src/cfa-cpp as not in lib until after install 51 51 52 52 libcfa-prelude.o : libcfa-prelude.c 53 $ (AM_V_GEN)@BACKEND_CC@ @CFA_FLAGS@ -c -o $@ $<53 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -c -o $@ $< 54 54 55 CFLAGS = -quiet - g -Wall -Wno-unused-function @CFA_FLAGS@ -B${abs_top_srcdir}/src/driver -XCFA -t # TEMPORARY: does not build with -O255 CFLAGS = -quiet -no-include-std -g -Wall -Wno-unused-function @CFA_FLAGS@ -B${abs_top_srcdir}/src/driver -XCFA -t # TEMPORARY: does not build with -O2 56 56 CC = ${abs_top_srcdir}/src/driver/cfa 57 57 … … 63 63 @true 64 64 65 ${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp ${cfalib_DATA} 65 ${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator 66 66 67 67 libcfa_a_SOURCES = libcfa-prelude.c ${headers:=.c} -
src/libcfa/Makefile.in
r8a443f4 r73bf8cf2 136 136 CFA_LIBDIR = @CFA_LIBDIR@ 137 137 CFA_PREFIX = @CFA_PREFIX@ 138 CFLAGS = -quiet - g -Wall -Wno-unused-function @CFA_FLAGS@ -B${abs_top_srcdir}/src/driver -XCFA -t # TEMPORARY: does not build with -O2138 CFLAGS = -quiet -no-include-std -g -Wall -Wno-unused-function @CFA_FLAGS@ -B${abs_top_srcdir}/src/driver -XCFA -t # TEMPORARY: does not build with -O2 139 139 CPP = @CPP@ 140 140 CPPFLAGS = @CPPFLAGS@ … … 603 603 # create extra forward types/declarations to reduce inclusion of library files 604 604 extras.cf : extras.regx extras.c 605 $ (AM_V_GEN)@BACKEND_CC@ @CFA_FLAGS@ -E ${srcdir}/extras.c | grep -f extras.regx > ${srcdir}/extras.cf605 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -E ${srcdir}/extras.c | grep -f extras.regx > ${srcdir}/extras.cf 606 606 607 607 # create forward declarations for gcc builtins 608 608 builtins.cf : builtins.c 609 $ (AM_V_GEN)if [ -e $< ] ; then \609 ${AM_V_GEN}if [ -e $< ] ; then \ 610 610 @BACKEND_CC@ -E -P $^ | sed -e "/targetm/s/.*//" -e "/_Decimal/s/.*//" -e "s/void (const char \*)0();//" -e "s/\"//g" -e "s/\(__builtin_\) /\1/" > $@ ; \ 611 611 fi 612 612 613 613 builtins.c : builtins.def prototypes.awk 614 $ (AM_V_GEN)if [ -e $< ] ; then \614 ${AM_V_GEN}if [ -e $< ] ; then \ 615 615 @BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@ ; \ 616 616 fi … … 623 623 624 624 libcfa-prelude.c : ${srcdir}/prelude.cf ${srcdir}/extras.cf ${srcdir}/builtins.cf 625 $ (AM_V_GEN)${abs_top_srcdir}/src/driver/cfa-cpp -l ${srcdir}/prelude.cf $@ # use src/cfa-cpp as not in lib until after install625 ${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -l ${srcdir}/prelude.cf $@ # use src/cfa-cpp as not in lib until after install 626 626 627 627 libcfa-prelude.o : libcfa-prelude.c 628 $ (AM_V_GEN)@BACKEND_CC@ @CFA_FLAGS@ -c -o $@ $<628 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -c -o $@ $< 629 629 630 630 # extensionless header files are overridden by -o flag in default makerule => explicitly override default rule to silently do nothing … … 632 632 @true 633 633 634 ${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp ${cfalib_DATA} 634 ${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator 635 635 636 636 maintainer-clean-local:
Note:
See TracChangeset
for help on using the changeset viewer.