Changeset fcd17b2f
- Timestamp:
- Jul 27, 2017, 2:56:39 PM (7 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:
- 874960b
- Parents:
- 4d4e5de (diff), a04ce4d (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. - Files:
-
- 8 added
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/LaTeXmacros/lstlang.sty
r4d4e5de rfcd17b2f 8 8 %% Created On : Sat May 13 16:34:42 2017 9 9 %% Last Modified By : Peter A. Buhr 10 %% Last Modified On : Wed Jul 12 22:42:09201711 %% Update Count : 1 210 %% Last Modified On : Mon Jul 24 20:40:37 2017 11 %% Update Count : 13 12 12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 13 13 … … 112 112 finally, forall, ftype, _Generic, _Imaginary, inline, __label__, lvalue, _Noreturn, one_t, 113 113 otype, restrict, _Static_assert, throw, throwResume, trait, try, ttype, typeof, __typeof, 114 __typeof__, with, zero_t},114 __typeof__, virtual, with, zero_t}, 115 115 morekeywords=[2]{ 116 116 _Atomic, coroutine, is_coroutine, is_monitor, is_thread, monitor, mutex, nomutex, -
src/CodeGen/CodeGenerator.cc
r4d4e5de rfcd17b2f 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : T hu Jun 8 16:00:00 201713 // Update Count : 48 512 // Last Modified On : Tus Jul 25 15:29:00 2017 13 // Update Count : 486 14 14 // 15 15 #include "CodeGenerator.h" … … 594 594 } 595 595 596 void CodeGenerator::visit( VirtualCastExpr * castExpr ) { 597 assertf( ! genC, "VirtualCastExpr should not reach code generation." ); 598 extension( castExpr ); 599 output << "(virtual "; 600 castExpr->get_arg()->accept( *this ); 601 output << ")"; 602 } 603 596 604 void CodeGenerator::visit( UntypedMemberExpr * memberExpr ) { 597 605 assertf( ! genC, "UntypedMemberExpr should not reach code generation." ); -
src/CodeGen/CodeGenerator.h
r4d4e5de rfcd17b2f 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Fri Jul 21 22:16:21201713 // Update Count : 5 311 // Last Modified By : Andrew Beach 12 // Last Modified On : Tus Jul 25 25:30:00 2017 13 // Update Count : 54 14 14 // 15 15 … … 59 59 virtual void visit( AddressExpr *addressExpr ); 60 60 virtual void visit( CastExpr *castExpr ); 61 virtual void visit( VirtualCastExpr *castExpr ); 61 62 virtual void visit( UntypedMemberExpr *memberExpr ); 62 63 virtual void visit( MemberExpr *memberExpr ); -
src/Common/PassVisitor.h
r4d4e5de rfcd17b2f 81 81 virtual void visit( NameExpr *nameExpr ) override final; 82 82 virtual void visit( CastExpr *castExpr ) override final; 83 virtual void visit( VirtualCastExpr *castExpr ) override final; 83 84 virtual void visit( AddressExpr *addressExpr ) override final; 84 85 virtual void visit( LabelAddressExpr *labAddressExpr ) override final; … … 168 169 virtual Expression* mutate( LabelAddressExpr *labAddressExpr ) override final; 169 170 virtual Expression* mutate( CastExpr *castExpr ) override final; 171 virtual Expression* mutate( VirtualCastExpr *castExpr ) override final; 170 172 virtual Expression* mutate( UntypedMemberExpr *memberExpr ) override final; 171 173 virtual Expression* mutate( MemberExpr *memberExpr ) override final; -
src/Common/PassVisitor.impl.h
r4d4e5de rfcd17b2f 607 607 608 608 template< typename pass_type > 609 void PassVisitor< pass_type >::visit( VirtualCastExpr * node ) { 610 VISIT_BODY( node ); 611 } 612 613 template< typename pass_type > 609 614 void PassVisitor< pass_type >::visit( AddressExpr * node ) { 610 615 VISIT_BODY( node ); … … 979 984 980 985 template< typename pass_type > 986 Expression * PassVisitor< pass_type >::mutate( VirtualCastExpr * node ) { 987 MUTATE_BODY( Expression, node ); 988 } 989 990 template< typename pass_type > 981 991 Expression * PassVisitor< pass_type >::mutate( UntypedMemberExpr * node ) { 982 992 MUTATE_BODY( Expression, node ); -
src/GenPoly/Box.cc
r4d4e5de rfcd17b2f 1750 1750 1751 1751 Expression *PolyGenericCalculator::mutate( SizeofExpr *sizeofExpr ) { 1752 Type *ty = sizeofExpr->get_ type();1752 Type *ty = sizeofExpr->get_isType() ? sizeofExpr->get_type() : sizeofExpr->get_expr()->get_result(); 1753 1753 if ( findGeneric( ty ) ) { 1754 1754 Expression *ret = new NameExpr( sizeofName( mangleType( ty ) ) ); … … 1760 1760 1761 1761 Expression *PolyGenericCalculator::mutate( AlignofExpr *alignofExpr ) { 1762 Type *ty = alignofExpr->get_ type();1762 Type *ty = alignofExpr->get_isType() ? alignofExpr->get_type() : alignofExpr->get_expr()->get_result(); 1763 1763 if ( findGeneric( ty ) ) { 1764 1764 Expression *ret = new NameExpr( alignofName( mangleType( ty ) ) ); -
src/Makefile.am
r4d4e5de rfcd17b2f 10 10 ## Author : Peter A. Buhr 11 11 ## Created On : Sun May 31 08:51:46 2015 12 ## Last Modified By : Peter A. Buhr13 ## Last Modified On : T hu Oct 27 20:41:25 201614 ## Update Count : 7 512 ## Last Modified By : Andrew Beach 13 ## Last Modified On : Tus Jul 25 10:34:00 2017 14 ## Update Count : 76 15 15 ############################################################################### 16 16 … … 37 37 include SynTree/module.mk 38 38 include Tuples/module.mk 39 include Virtual/module.mk 39 40 40 41 # put into lib for now -
src/Makefile.in
r4d4e5de rfcd17b2f 23 23 #SRC += ArgTweak/Rewriter.cc \ 24 24 # ArgTweak/Mutate.cc 25 26 ######################### -*- Mode: Makefile-Gmake -*- ######################## 27 ############################################################################### 25 28 26 29 ######################### -*- Mode: Makefile-Gmake -*- ######################## … … 255 258 Tuples/driver_cfa_cpp-TupleAssignment.$(OBJEXT) \ 256 259 Tuples/driver_cfa_cpp-TupleExpansion.$(OBJEXT) \ 257 Tuples/driver_cfa_cpp-Explode.$(OBJEXT) 260 Tuples/driver_cfa_cpp-Explode.$(OBJEXT) \ 261 Virtual/driver_cfa_cpp-ExpandCasts.$(OBJEXT) 258 262 am_driver_cfa_cpp_OBJECTS = $(am__objects_1) 259 263 driver_cfa_cpp_OBJECTS = $(am_driver_cfa_cpp_OBJECTS) … … 355 359 $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk \ 356 360 $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk \ 357 $(srcdir)/Tuples/module.mk $( top_srcdir)/automake/depcomp\358 $(top_srcdir)/automake/ ylwrap Parser/lex.cc Parser/parser.cc\359 Parser/ parser.hh361 $(srcdir)/Tuples/module.mk $(srcdir)/Virtual/module.mk \ 362 $(top_srcdir)/automake/depcomp $(top_srcdir)/automake/ylwrap \ 363 Parser/lex.cc Parser/parser.cc Parser/parser.hh 360 364 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 361 365 ACLOCAL = @ACLOCAL@ … … 533 537 SynTree/Attribute.cc SynTree/VarExprReplacer.cc \ 534 538 Tuples/TupleAssignment.cc Tuples/TupleExpansion.cc \ 535 Tuples/Explode.cc 539 Tuples/Explode.cc Virtual/ExpandCasts.cc 536 540 MAINTAINERCLEANFILES = Parser/parser.output ${libdir}/${notdir \ 537 541 ${cfa_cpplib_PROGRAMS}} … … 552 556 .SUFFIXES: 553 557 .SUFFIXES: .cc .ll .o .obj .yy 554 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Concurrency/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $( am__configure_deps)558 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Concurrency/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $(srcdir)/Virtual/module.mk $(am__configure_deps) 555 559 @for dep in $?; do \ 556 560 case '$(am__configure_deps)' in \ … … 572 576 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 573 577 esac; 574 $(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Concurrency/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $( am__empty):578 $(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Concurrency/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $(srcdir)/Virtual/module.mk $(am__empty): 575 579 576 580 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) … … 941 945 Tuples/driver_cfa_cpp-Explode.$(OBJEXT): Tuples/$(am__dirstamp) \ 942 946 Tuples/$(DEPDIR)/$(am__dirstamp) 947 Virtual/$(am__dirstamp): 948 @$(MKDIR_P) Virtual 949 @: > Virtual/$(am__dirstamp) 950 Virtual/$(DEPDIR)/$(am__dirstamp): 951 @$(MKDIR_P) Virtual/$(DEPDIR) 952 @: > Virtual/$(DEPDIR)/$(am__dirstamp) 953 Virtual/driver_cfa_cpp-ExpandCasts.$(OBJEXT): Virtual/$(am__dirstamp) \ 954 Virtual/$(DEPDIR)/$(am__dirstamp) 943 955 driver/$(am__dirstamp): 944 956 @$(MKDIR_P) driver … … 963 975 -rm -f SynTree/*.$(OBJEXT) 964 976 -rm -f Tuples/*.$(OBJEXT) 977 -rm -f Virtual/*.$(OBJEXT) 965 978 966 979 distclean-compile: … … 1078 1091 @AMDEP_TRUE@@am__include@ @am__quote@Tuples/$(DEPDIR)/driver_cfa_cpp-TupleAssignment.Po@am__quote@ 1079 1092 @AMDEP_TRUE@@am__include@ @am__quote@Tuples/$(DEPDIR)/driver_cfa_cpp-TupleExpansion.Po@am__quote@ 1093 @AMDEP_TRUE@@am__include@ @am__quote@Virtual/$(DEPDIR)/driver_cfa_cpp-ExpandCasts.Po@am__quote@ 1080 1094 1081 1095 .cc.o: … … 2648 2662 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 2649 2663 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Tuples/driver_cfa_cpp-Explode.obj `if test -f 'Tuples/Explode.cc'; then $(CYGPATH_W) 'Tuples/Explode.cc'; else $(CYGPATH_W) '$(srcdir)/Tuples/Explode.cc'; fi` 2664 2665 Virtual/driver_cfa_cpp-ExpandCasts.o: Virtual/ExpandCasts.cc 2666 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Virtual/driver_cfa_cpp-ExpandCasts.o -MD -MP -MF Virtual/$(DEPDIR)/driver_cfa_cpp-ExpandCasts.Tpo -c -o Virtual/driver_cfa_cpp-ExpandCasts.o `test -f 'Virtual/ExpandCasts.cc' || echo '$(srcdir)/'`Virtual/ExpandCasts.cc 2667 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Virtual/$(DEPDIR)/driver_cfa_cpp-ExpandCasts.Tpo Virtual/$(DEPDIR)/driver_cfa_cpp-ExpandCasts.Po 2668 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Virtual/ExpandCasts.cc' object='Virtual/driver_cfa_cpp-ExpandCasts.o' libtool=no @AMDEPBACKSLASH@ 2669 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 2670 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Virtual/driver_cfa_cpp-ExpandCasts.o `test -f 'Virtual/ExpandCasts.cc' || echo '$(srcdir)/'`Virtual/ExpandCasts.cc 2671 2672 Virtual/driver_cfa_cpp-ExpandCasts.obj: Virtual/ExpandCasts.cc 2673 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Virtual/driver_cfa_cpp-ExpandCasts.obj -MD -MP -MF Virtual/$(DEPDIR)/driver_cfa_cpp-ExpandCasts.Tpo -c -o Virtual/driver_cfa_cpp-ExpandCasts.obj `if test -f 'Virtual/ExpandCasts.cc'; then $(CYGPATH_W) 'Virtual/ExpandCasts.cc'; else $(CYGPATH_W) '$(srcdir)/Virtual/ExpandCasts.cc'; fi` 2674 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Virtual/$(DEPDIR)/driver_cfa_cpp-ExpandCasts.Tpo Virtual/$(DEPDIR)/driver_cfa_cpp-ExpandCasts.Po 2675 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Virtual/ExpandCasts.cc' object='Virtual/driver_cfa_cpp-ExpandCasts.obj' libtool=no @AMDEPBACKSLASH@ 2676 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 2677 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Virtual/driver_cfa_cpp-ExpandCasts.obj `if test -f 'Virtual/ExpandCasts.cc'; then $(CYGPATH_W) 'Virtual/ExpandCasts.cc'; else $(CYGPATH_W) '$(srcdir)/Virtual/ExpandCasts.cc'; fi` 2650 2678 2651 2679 .ll.cc: … … 2796 2824 -rm -f Tuples/$(DEPDIR)/$(am__dirstamp) 2797 2825 -rm -f Tuples/$(am__dirstamp) 2826 -rm -f Virtual/$(DEPDIR)/$(am__dirstamp) 2827 -rm -f Virtual/$(am__dirstamp) 2798 2828 -rm -f driver/$(am__dirstamp) 2799 2829 … … 2811 2841 2812 2842 distclean: distclean-am 2813 -rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) Concurrency/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR) 2843 -rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) Concurrency/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR) Virtual/$(DEPDIR) 2814 2844 -rm -f Makefile 2815 2845 distclean-am: clean-am distclean-compile distclean-generic \ … … 2857 2887 2858 2888 maintainer-clean: maintainer-clean-am 2859 -rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) Concurrency/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR) 2889 -rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) Concurrency/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR) Virtual/$(DEPDIR) 2860 2890 -rm -f Makefile 2861 2891 maintainer-clean-am: distclean-am maintainer-clean-generic -
src/Parser/ExpressionNode.cc
r4d4e5de rfcd17b2f 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Sat May 16 13:17:07 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : T us Jul 18 10:08:00 201713 // Update Count : 55 011 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 27 12:10:10 2017 13 // Update Count : 556 14 14 // 15 15 … … 62 62 bool dec = true, Unsigned = false; // decimal, unsigned constant 63 63 int size; // 0 => int, 1 => long, 2 => long long 64 unsigned long long int v; 64 unsigned long long int v; // converted integral value 65 65 size_t last = str.length() - 1; // last character of constant 66 66 Expression * ret; 67 68 // special constants 69 if ( str == "0" ) { 70 ret = new ConstantExpr( Constant( (Type *)new ZeroType( noQualifiers ), str, (unsigned long long int)0 ) ); 71 goto CLEANUP; 72 } // if 73 if ( str == "1" ) { 74 ret = new ConstantExpr( Constant( (Type *)new OneType( noQualifiers ), str, (unsigned long long int)1 ) ); 75 goto CLEANUP; 76 } // if 77 67 78 if ( str[0] == '0' ) { // octal/hex constant ? 68 79 dec = false; … … 118 129 } // if 119 130 120 Expression * ret = new ConstantExpr( Constant( new BasicType( noQualifiers, kind[Unsigned][size] ), str, v ) ); 131 ret = new ConstantExpr( Constant( new BasicType( noQualifiers, kind[Unsigned][size] ), str, v ) ); 132 CLEANUP: 121 133 delete &str; // created by lex 122 134 return ret; … … 174 186 return ret; 175 187 } // build_constantStr 176 177 Expression *build_constantZeroOne( const std::string & str ) {178 Expression * ret = new ConstantExpr( Constant( str == "0" ? (Type *)new ZeroType( noQualifiers ) : (Type*)new OneType( noQualifiers ), str,179 str == "0" ? (unsigned long long int)0 : (unsigned long long int)1 ) );180 delete &str; // created by lex181 return ret;182 } // build_constantChar183 188 184 189 Expression * build_field_name_FLOATINGconstant( const std::string & str ) { … … 252 257 } 253 258 259 260 Expression *build_virtual_cast( DeclarationNode *decl_node, ExpressionNode *expr_node ) { 261 Type *targetType = maybeMoveBuildType( decl_node ); 262 Expression *castArg = maybeMoveBuild< Expression >( expr_node ); 263 return new VirtualCastExpr( castArg, targetType ); 264 } 265 254 266 Expression *build_fieldSel( ExpressionNode *expr_node, Expression *member ) { 255 267 UntypedMemberExpr *ret = new UntypedMemberExpr( member, maybeMoveBuild< Expression >(expr_node) ); -
src/Parser/ParseNode.h
r4d4e5de rfcd17b2f 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jul 22 09:32:30201713 // Update Count : 78 612 // Last Modified On : Thu Jul 27 12:08:08 2017 13 // Update Count : 788 14 14 // 15 15 … … 159 159 Expression * build_constantFloat( const std::string &str ); 160 160 Expression * build_constantChar( const std::string &str ); 161 Expression * build_constantZeroOne( const std::string &str );162 161 ConstantExpr * build_constantStr( const std::string &str ); 163 162 Expression * build_field_name_FLOATINGconstant( const std::string & str ); … … 170 169 171 170 Expression * build_cast( DeclarationNode * decl_node, ExpressionNode * expr_node ); 171 Expression * build_virtual_cast( DeclarationNode * decl_node, ExpressionNode * expr_node ); 172 172 Expression * build_fieldSel( ExpressionNode * expr_node, Expression * member ); 173 173 Expression * build_pfieldSel( ExpressionNode * expr_node, Expression * member ); -
src/Parser/lex.ll
r4d4e5de rfcd17b2f 10 10 * Created On : Sat Sep 22 08:58:10 2001 11 11 * Last Modified By : Peter A. Buhr 12 * Last Modified On : Mon Jul 24 08:27:23201713 * Update Count : 54 512 * Last Modified On : Thu Jul 27 12:05:50 2017 13 * Update Count : 549 14 14 */ 15 15 … … 288 288 289 289 /* numeric constants */ 290 "0" { NUMERIC_RETURN(ZERO); } // CFA291 "1" { NUMERIC_RETURN(ONE); } // CFA292 290 {decimal_constant} { NUMERIC_RETURN(INTEGERconstant); } 293 291 {octal_constant} { NUMERIC_RETURN(INTEGERconstant); } -
src/Parser/parser.yy
r4d4e5de rfcd17b2f 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jul 24 09:01:14201713 // Update Count : 246 312 // Last Modified On : Thu Jul 27 12:08:08 2017 13 // Update Count : 2467 14 14 // 15 15 … … 142 142 // converted into the tuple index (.)(1). e.g., 3.x 143 143 %token<tok> REALDECIMALconstant REALFRACTIONconstant FLOATINGconstant 144 %token<tok> ZERO ONE // CFA145 144 146 145 // multi-character operators … … 159 158 %token ATassign // @= 160 159 161 %type<tok> identifier no_attr_identifier zero_one160 %type<tok> identifier no_attr_identifier 162 161 %type<tok> identifier_or_type_name no_attr_identifier_or_type_name attr_name 163 162 %type<constant> string_literal … … 360 359 ; 361 360 362 zero_one: // CFA363 ZERO364 | ONE365 ;366 367 361 string_literal: 368 362 string_literal_list { $$ = build_constantStr( *$1 ); } … … 384 378 IDENTIFIER // typedef name cannot be used as a variable name 385 379 { $$ = new ExpressionNode( build_varref( $1 ) ); } 386 | zero_one387 { $$ = new ExpressionNode( build_constantZeroOne( *$1 ) ); }388 380 | tuple 389 381 | '(' comma_expression ')' … … 484 476 { 485 477 $$ = new ExpressionNode( build_field_name_fraction_constants( build_varref( $1 ), $2 ) ); 486 }487 | zero_one fraction_constants488 {489 $$ = new ExpressionNode( build_field_name_fraction_constants( build_constantZeroOne( *$1 ), $2 ) );490 478 } 491 479 ; … … 573 561 // VIRTUAL cannot be opt because of look ahead issues 574 562 | '(' VIRTUAL ')' cast_expression 575 { $$ = new ExpressionNode( build_ cast( nullptr, $4 ) ); }563 { $$ = new ExpressionNode( build_virtual_cast( nullptr, $4 ) ); } 576 564 | '(' VIRTUAL type_no_function ')' cast_expression 577 { $$ = new ExpressionNode( build_ cast( $3, $5 ) ); }565 { $$ = new ExpressionNode( build_virtual_cast( $3, $5 ) ); } 578 566 // | '(' type_no_function ')' tuple 579 567 // { $$ = new ExpressionNode( build_cast( $2, $4 ) ); } -
src/ResolvExpr/AlternativeFinder.cc
r4d4e5de rfcd17b2f 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sat May 16 23:52:08 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Fri Mar 17 09:14:17201713 // Update Count : 3 011 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed Jul 26 11:33:00 2017 13 // Update Count : 31 14 14 // 15 15 … … 878 878 } 879 879 880 void AlternativeFinder::visit( VirtualCastExpr * castExpr ) { 881 assertf( castExpr->get_result(), "Implicate virtual cast targets not yet supported." ); 882 AlternativeFinder finder( indexer, env ); 883 // don't prune here, since it's guaranteed all alternatives will have the same type 884 // (giving the alternatives different types is half of the point of ConstructorExpr nodes) 885 finder.findWithAdjustment( castExpr->get_arg(), false ); 886 for ( Alternative & alt : finder.alternatives ) { 887 alternatives.push_back( Alternative( 888 new VirtualCastExpr( alt.expr->clone(), castExpr->get_result()->clone() ), 889 alt.env, alt.cost ) ); 890 } 891 } 892 880 893 void AlternativeFinder::visit( UntypedMemberExpr *memberExpr ) { 881 894 AlternativeFinder funcFinder( indexer, env ); -
src/ResolvExpr/AlternativeFinder.h
r4d4e5de rfcd17b2f 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sat May 16 23:56:12 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Sat Jul 22 09:35:32201713 // Update Count : 311 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed Jul 26 11:24:00 2017 13 // Update Count : 4 14 14 // 15 15 … … 49 49 virtual void visit( AddressExpr *addressExpr ); 50 50 virtual void visit( CastExpr *castExpr ); 51 virtual void visit( VirtualCastExpr *castExpr ); 51 52 virtual void visit( UntypedMemberExpr *memberExpr ); 52 53 virtual void visit( MemberExpr *memberExpr ); -
src/SynTree/ApplicationExpr.cc
r4d4e5de rfcd17b2f 44 44 } 45 45 46 ApplicationExpr::ApplicationExpr( Expression *funcExpr ) : function( funcExpr) {46 ApplicationExpr::ApplicationExpr( Expression *funcExpr, const std::list< Expression * > & argList ) : function( funcExpr ), args( argList ) { 47 47 PointerType *pointer = safe_dynamic_cast< PointerType* >( funcExpr->get_result() ); 48 48 FunctionType *function = safe_dynamic_cast< FunctionType* >( pointer->get_base() ); -
src/SynTree/Expression.cc
r4d4e5de rfcd17b2f 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Mar 30 16:41:13201713 // Update Count : 5 212 // Last Modified On : Tue Jul 25 14:15:47 2017 13 // Update Count : 54 14 14 // 15 15 … … 298 298 if ( result->isVoid() ) { 299 299 os << "nothing"; 300 } else { 301 result->print( os, indent+2 ); 302 } // if 303 os << std::endl; 304 Expression::print( os, indent ); 305 } 306 307 VirtualCastExpr::VirtualCastExpr( Expression *arg_, Type *toType ) : Expression(), arg(arg_) { 308 set_result(toType); 309 } 310 311 VirtualCastExpr::VirtualCastExpr( const VirtualCastExpr &other ) : Expression( other ), arg( maybeClone( other.arg ) ) { 312 } 313 314 VirtualCastExpr::~VirtualCastExpr() { 315 delete arg; 316 } 317 318 void VirtualCastExpr::print( std::ostream &os, int indent ) const { 319 os << "Virtual Cast of:" << std::endl << std::string( indent+2, ' ' ); 320 arg->print(os, indent+2); 321 os << std::endl << std::string( indent, ' ' ) << "to:" << std::endl; 322 os << std::string( indent+2, ' ' ); 323 if ( ! result ) { 324 os << "unknown"; 300 325 } else { 301 326 result->print( os, indent+2 ); -
src/SynTree/Expression.h
r4d4e5de rfcd17b2f 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Sat Jul 22 09:53:16201713 // Update Count : 4 211 // Last Modified By : Andrew Beach 12 // Last Modified On : Mon Jul 24 16:27:00 2017 13 // Update Count : 43 14 14 // 15 15 … … 79 79 class ApplicationExpr : public Expression { 80 80 public: 81 ApplicationExpr( Expression * function );81 ApplicationExpr( Expression * function, const std::list<Expression *> & args = std::list< Expression * >() ); 82 82 ApplicationExpr( const ApplicationExpr & other ); 83 83 virtual ~ApplicationExpr(); … … 194 194 195 195 Expression * get_arg() const { return arg; } 196 void set_arg( Expression * newValue ) { arg = newValue; }196 void set_arg( Expression * newValue ) { arg = newValue; } 197 197 198 198 virtual CastExpr * clone() const { return new CastExpr( * this ); } 199 virtual void accept( Visitor & v ) { v.visit( this ); } 200 virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); } 201 virtual void print( std::ostream & os, int indent = 0 ) const; 202 private: 203 Expression * arg; 204 }; 205 206 /// VirtualCastExpr repersents a virtual dynamic cast, e.g. (virtual exception)e 207 class VirtualCastExpr : public Expression { 208 public: 209 VirtualCastExpr( Expression * arg, Type * toType ); 210 VirtualCastExpr( const VirtualCastExpr & other ); 211 virtual ~VirtualCastExpr(); 212 213 Expression * get_arg() const { return arg; } 214 void set_arg( Expression * newValue ) { arg = newValue; } 215 216 virtual VirtualCastExpr * clone() const { return new VirtualCastExpr( * this ); } 199 217 virtual void accept( Visitor & v ) { v.visit( this ); } 200 218 virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); } -
src/SynTree/Mutator.cc
r4d4e5de rfcd17b2f 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Thu Jun 22 13:43:00 201713 // Update Count : 2 412 // Last Modified On : Mon Jul 24 16:32:00 2017 13 // Update Count : 25 14 14 // 15 15 … … 235 235 } 236 236 237 Expression *Mutator::mutate( VirtualCastExpr *castExpr ) { 238 castExpr->set_env( maybeMutate( castExpr->get_env(), *this ) ); 239 castExpr->set_result( maybeMutate( castExpr->get_result(), *this ) ); 240 castExpr->set_arg( maybeMutate( castExpr->get_arg(), *this ) ); 241 return castExpr; 242 } 243 237 244 Expression *Mutator::mutate( UntypedMemberExpr *memberExpr ) { 238 245 memberExpr->set_env( maybeMutate( memberExpr->get_env(), *this ) ); -
src/SynTree/Mutator.h
r4d4e5de rfcd17b2f 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Sat Jul 22 09:51:30 201713 // Update Count : 1 511 // Last Modified By : Andrew Beach 12 // Last Modified On : Mon Jul 24 16:31:00 2017 13 // Update Count : 16 14 14 // 15 15 #include <cassert> … … 59 59 virtual Expression* mutate( LabelAddressExpr *labAddressExpr ); 60 60 virtual Expression* mutate( CastExpr *castExpr ); 61 virtual Expression* mutate( VirtualCastExpr *castExpr ); 61 62 virtual Expression* mutate( UntypedMemberExpr *memberExpr ); 62 63 virtual Expression* mutate( MemberExpr *memberExpr ); -
src/SynTree/SynTree.h
r4d4e5de rfcd17b2f 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Sat Jul 22 09:51:46201713 // Update Count : 1 011 // Last Modified By : Andrew Beach 12 // Last Modified On : Mon Jul 24 16:54:00 2017 13 // Update Count : 11 14 14 // 15 15 … … 66 66 class LabelAddressExpr; 67 67 class CastExpr; 68 class VirtualCastExpr; 68 69 class MemberExpr; 69 70 class UntypedMemberExpr; -
src/SynTree/Visitor.cc
r4d4e5de rfcd17b2f 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Thu Jun 22 13:41:00 201713 // Update Count : 2 612 // Last Modified On : Mon Jul 24 16:30:00 2017 13 // Update Count : 27 14 14 // 15 15 … … 192 192 } 193 193 194 void Visitor::visit( VirtualCastExpr *castExpr ) { 195 maybeAccept( castExpr->get_result(), *this ); 196 maybeAccept( castExpr->get_arg(), *this ); 197 } 198 194 199 void Visitor::visit( UntypedMemberExpr *memberExpr ) { 195 200 maybeAccept( memberExpr->get_result(), *this ); -
src/SynTree/Visitor.h
r4d4e5de rfcd17b2f 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Sat Jul 22 09:54:04201713 // Update Count : 1 211 // Last Modified By : Andrew Beach 12 // Last Modified On : Mon Jul 24 16:28:00 2017 13 // Update Count : 13 14 14 // 15 15 … … 60 60 virtual void visit( NameExpr *nameExpr ); 61 61 virtual void visit( CastExpr *castExpr ); 62 virtual void visit( VirtualCastExpr *castExpr ); 62 63 virtual void visit( AddressExpr *addressExpr ); 63 64 virtual void visit( LabelAddressExpr *labAddressExpr ); -
src/libcfa/Makefile.am
r4d4e5de rfcd17b2f 10 10 ## Author : Peter A. Buhr 11 11 ## Created On : Sun May 31 08:54:01 2015 12 ## Last Modified By : Peter A. Buhr13 ## Last Modified On : Thu Jul 20 23:09:34201714 ## Update Count : 22 012 ## Last Modified By : Andrew Beach 13 ## Last Modified On : Wed Jul 26 14:15:00 2017 14 ## Update Count : 221 15 15 ############################################################################### 16 16 … … 56 56 libobjs = ${headers:=.o} 57 57 libsrc = libcfa-prelude.c interpose.c libhdr/libdebug.c ${headers:=.c} \ 58 assert.c exception.c typeobject.c58 assert.c exception.c virtual.c 59 59 60 60 # not all platforms support concurrency, add option do disable it … … 73 73 ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $< 74 74 75 libcfa_a- typeobject.o : typeobject.c75 libcfa_a-virtual.o : virtual.c 76 76 ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $< 77 77 … … 82 82 ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $< 83 83 84 libcfa_d_a- typeobject.o : typeobject.c84 libcfa_d_a-virtual.o : virtual.c 85 85 ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $< 86 86 -
src/libcfa/Makefile.in
r4d4e5de rfcd17b2f 154 154 concurrency/coroutine.c concurrency/thread.c \ 155 155 concurrency/kernel.c concurrency/monitor.c assert.c \ 156 exception.c typeobject.c\157 concurrency/ CtxSwitch-@MACHINE_TYPE@.S concurrency/alarm.c \158 concurrency/ invoke.c concurrency/preemption.c156 exception.c virtual.c concurrency/CtxSwitch-@MACHINE_TYPE@.S \ 157 concurrency/alarm.c concurrency/invoke.c \ 158 concurrency/preemption.c 159 159 am__dirstamp = $(am__leading_dot)dirstamp 160 160 @BUILD_CONCURRENCY_TRUE@am__objects_1 = concurrency/libcfa_d_a-coroutine.$(OBJEXT) \ … … 178 178 libhdr/libcfa_d_a-libdebug.$(OBJEXT) $(am__objects_2) \ 179 179 libcfa_d_a-assert.$(OBJEXT) libcfa_d_a-exception.$(OBJEXT) \ 180 libcfa_d_a- typeobject.$(OBJEXT) $(am__objects_3)180 libcfa_d_a-virtual.$(OBJEXT) $(am__objects_3) 181 181 am_libcfa_d_a_OBJECTS = $(am__objects_4) 182 182 libcfa_d_a_OBJECTS = $(am_libcfa_d_a_OBJECTS) … … 189 189 concurrency/coroutine.c concurrency/thread.c \ 190 190 concurrency/kernel.c concurrency/monitor.c assert.c \ 191 exception.c typeobject.c\192 concurrency/ CtxSwitch-@MACHINE_TYPE@.S concurrency/alarm.c \193 concurrency/ invoke.c concurrency/preemption.c191 exception.c virtual.c concurrency/CtxSwitch-@MACHINE_TYPE@.S \ 192 concurrency/alarm.c concurrency/invoke.c \ 193 concurrency/preemption.c 194 194 @BUILD_CONCURRENCY_TRUE@am__objects_5 = concurrency/libcfa_a-coroutine.$(OBJEXT) \ 195 195 @BUILD_CONCURRENCY_TRUE@ concurrency/libcfa_a-thread.$(OBJEXT) \ … … 211 211 libhdr/libcfa_a-libdebug.$(OBJEXT) $(am__objects_6) \ 212 212 libcfa_a-assert.$(OBJEXT) libcfa_a-exception.$(OBJEXT) \ 213 libcfa_a- typeobject.$(OBJEXT) $(am__objects_7)213 libcfa_a-virtual.$(OBJEXT) $(am__objects_7) 214 214 am_libcfa_a_OBJECTS = $(am__objects_8) 215 215 libcfa_a_OBJECTS = $(am_libcfa_a_OBJECTS) … … 423 423 libobjs = ${headers:=.o} 424 424 libsrc = libcfa-prelude.c interpose.c libhdr/libdebug.c ${headers:=.c} \ 425 assert.c exception.c typeobject.c $(am__append_4)425 assert.c exception.c virtual.c $(am__append_4) 426 426 libcfa_a_SOURCES = ${libsrc} 427 427 libcfa_a_CFLAGS = -nodebug -O2 … … 598 598 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-rational.Po@am__quote@ 599 599 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-stdlib.Po@am__quote@ 600 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a- typeobject.Po@am__quote@600 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-virtual.Po@am__quote@ 601 601 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-assert.Po@am__quote@ 602 602 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-exception.Po@am__quote@ … … 609 609 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-rational.Po@am__quote@ 610 610 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-stdlib.Po@am__quote@ 611 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a- typeobject.Po@am__quote@611 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-virtual.Po@am__quote@ 612 612 @AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/CtxSwitch-@MACHINE_TYPE@.Po@am__quote@ 613 613 @AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_a-alarm.Po@am__quote@ … … 920 920 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-exception.obj `if test -f 'exception.c'; then $(CYGPATH_W) 'exception.c'; else $(CYGPATH_W) '$(srcdir)/exception.c'; fi` 921 921 922 libcfa_d_a- typeobject.obj: typeobject.c923 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a- typeobject.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-typeobject.Tpo -c -o libcfa_d_a-typeobject.obj `if test -f 'typeobject.c'; then $(CYGPATH_W) 'typeobject.c'; else $(CYGPATH_W) '$(srcdir)/typeobject.c'; fi`924 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a- typeobject.Tpo $(DEPDIR)/libcfa_d_a-typeobject.Po925 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source=' typeobject.c' object='libcfa_d_a-typeobject.obj' libtool=no @AMDEPBACKSLASH@926 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 927 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a- typeobject.obj `if test -f 'typeobject.c'; then $(CYGPATH_W) 'typeobject.c'; else $(CYGPATH_W) '$(srcdir)/typeobject.c'; fi`922 libcfa_d_a-virtual.obj: virtual.c 923 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-virtual.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-virtual.Tpo -c -o libcfa_d_a-virtual.obj `if test -f 'virtual.c'; then $(CYGPATH_W) 'virtual.c'; else $(CYGPATH_W) '$(srcdir)/virtual.c'; fi` 924 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-virtual.Tpo $(DEPDIR)/libcfa_d_a-virtual.Po 925 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='virtual.c' object='libcfa_d_a-virtual.obj' libtool=no @AMDEPBACKSLASH@ 926 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 927 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-virtual.obj `if test -f 'virtual.c'; then $(CYGPATH_W) 'virtual.c'; else $(CYGPATH_W) '$(srcdir)/virtual.c'; fi` 928 928 929 929 concurrency/libcfa_d_a-alarm.o: concurrency/alarm.c … … 1214 1214 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-exception.obj `if test -f 'exception.c'; then $(CYGPATH_W) 'exception.c'; else $(CYGPATH_W) '$(srcdir)/exception.c'; fi` 1215 1215 1216 libcfa_a- typeobject.obj: typeobject.c1217 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a- typeobject.obj -MD -MP -MF $(DEPDIR)/libcfa_a-typeobject.Tpo -c -o libcfa_a-typeobject.obj `if test -f 'typeobject.c'; then $(CYGPATH_W) 'typeobject.c'; else $(CYGPATH_W) '$(srcdir)/typeobject.c'; fi`1218 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a- typeobject.Tpo $(DEPDIR)/libcfa_a-typeobject.Po1219 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source=' typeobject.c' object='libcfa_a-typeobject.obj' libtool=no @AMDEPBACKSLASH@1220 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1221 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a- typeobject.obj `if test -f 'typeobject.c'; then $(CYGPATH_W) 'typeobject.c'; else $(CYGPATH_W) '$(srcdir)/typeobject.c'; fi`1216 libcfa_a-virtual.obj: virtual.c 1217 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-virtual.obj -MD -MP -MF $(DEPDIR)/libcfa_a-virtual.Tpo -c -o libcfa_a-virtual.obj `if test -f 'virtual.c'; then $(CYGPATH_W) 'virtual.c'; else $(CYGPATH_W) '$(srcdir)/virtual.c'; fi` 1218 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-virtual.Tpo $(DEPDIR)/libcfa_a-virtual.Po 1219 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='virtual.c' object='libcfa_a-virtual.obj' libtool=no @AMDEPBACKSLASH@ 1220 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1221 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-virtual.obj `if test -f 'virtual.c'; then $(CYGPATH_W) 'virtual.c'; else $(CYGPATH_W) '$(srcdir)/virtual.c'; fi` 1222 1222 1223 1223 concurrency/libcfa_a-alarm.o: concurrency/alarm.c … … 1513 1513 ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $< 1514 1514 1515 libcfa_a- typeobject.o : typeobject.c1515 libcfa_a-virtual.o : virtual.c 1516 1516 ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $< 1517 1517 … … 1522 1522 ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $< 1523 1523 1524 libcfa_d_a- typeobject.o : typeobject.c1524 libcfa_d_a-virtual.o : virtual.c 1525 1525 ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $< 1526 1526 -
src/main.cc
r4d4e5de rfcd17b2f 11 11 // Created On : Fri May 15 23:12:02 2015 12 12 // Last Modified By : Andrew Beach 13 // Last Modified On : Fri Jul 7 11:13:00 201714 // Update Count : 44 213 // Last Modified On : Wed Jul 26 14:38:00 2017 14 // Update Count : 443 15 15 // 16 16 … … 58 58 #include "SynTree/Visitor.h" // for acceptAll 59 59 #include "Tuples/Tuples.h" // for expandMemberTuples, expan... 60 #include "Virtual/ExpandCasts.h" // for expandCasts 60 61 61 62 using namespace std; … … 313 314 } 314 315 316 OPTPRINT( "virtual expandCasts" ) // Must come after translateEHM 317 Virtual::expandCasts( translationUnit ); 318 315 319 OPTPRINT("instantiateGenerics") 316 320 GenPoly::instantiateGeneric( translationUnit ); -
src/prelude/builtins.c
r4d4e5de rfcd17b2f 1 // 1 // 2 2 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo 3 3 // 4 4 // The contents of this file are covered under the licence agreement in the 5 5 // file "LICENCE" distributed with Cforall. 6 // 7 // builtins.c -- 8 // 6 // 7 // builtins.c -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Fri Jul 21 16:21:03 2017 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Sat Jul 22 10:34:20 201713 // Update Count : 1 314 // 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Tus Jul 25 15:33:00 2017 13 // Update Count : 14 14 // 15 15 16 16 // exception implementation … … 18 18 typedef unsigned long long __cfaabi_exception_type_t; 19 19 20 #include "../libcfa/virtual.h" 20 21 #include "../libcfa/exception.h" 21 22 -
src/tests/designations.c
r4d4e5de rfcd17b2f 9 9 // Author : Rob Schluntz 10 10 // Created On : Thu Jun 29 15:26:36 2017 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Thu Ju n 29 15:27:05 201713 // Update Count : 211 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 27 11:46:35 2017 13 // Update Count : 3 14 14 // 15 15 … … 89 89 }; 90 90 91 struct Fred { 92 double i[3]; 93 int j; 94 struct Mary { 95 struct Jane { 96 double j; 97 } j; 98 double i; 99 } m; 100 }; 101 struct Fred s1 @= { .m.j : 3 }; 102 struct Fred s2 @= { .i : { [2] : 2 } }; 103 91 104 int main() { 92 105 // simple designation case - starting from beginning of structure, leaves ptr default-initialized (zero) … … 199 212 }; 200 213 #endif 201 214 // array designation 215 int i[2] = { [1] : 3 }; 202 216 // allowed to have 'too many' initialized lists - essentially they are ignored. 203 217 int i1 = { 3 }; … … 240 254 const char * str0 = "hello"; 241 255 char str1[] = "hello"; 256 const char c1[] = "abc"; 257 const char c2[] = { 'a', 'b', 'c' }; 258 const char c3[][2] = { { 'a', 'b' }, { 'c', 'd'}, { 'c', 'd'} }; 242 259 } 243 260
Note: See TracChangeset
for help on using the changeset viewer.