Changes in / [fcd17b2f:4d4e5de]
- Files:
-
- 8 deleted
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/LaTeXmacros/lstlang.sty
rfcd17b2f r4d4e5de 8 8 %% Created On : Sat May 13 16:34:42 2017 9 9 %% Last Modified By : Peter A. Buhr 10 %% Last Modified On : Mon Jul 24 20:40:37201711 %% Update Count : 1 310 %% Last Modified On : Wed Jul 12 22:42:09 2017 11 %% Update Count : 12 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__, virtual,with, zero_t},114 __typeof__, with, zero_t}, 115 115 morekeywords=[2]{ 116 116 _Atomic, coroutine, is_coroutine, is_monitor, is_thread, monitor, mutex, nomutex, -
src/CodeGen/CodeGenerator.cc
rfcd17b2f r4d4e5de 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : T us Jul 25 15:29:00 201713 // Update Count : 48 612 // Last Modified On : Thu Jun 8 16:00:00 2017 13 // Update Count : 485 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 604 596 void CodeGenerator::visit( UntypedMemberExpr * memberExpr ) { 605 597 assertf( ! genC, "UntypedMemberExpr should not reach code generation." ); -
src/CodeGen/CodeGenerator.h
rfcd17b2f r4d4e5de 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Tus Jul 25 25:30:00201713 // Update Count : 5 411 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 21 22:16:21 2017 13 // Update Count : 53 14 14 // 15 15 … … 59 59 virtual void visit( AddressExpr *addressExpr ); 60 60 virtual void visit( CastExpr *castExpr ); 61 virtual void visit( VirtualCastExpr *castExpr );62 61 virtual void visit( UntypedMemberExpr *memberExpr ); 63 62 virtual void visit( MemberExpr *memberExpr ); -
src/Common/PassVisitor.h
rfcd17b2f r4d4e5de 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;84 83 virtual void visit( AddressExpr *addressExpr ) override final; 85 84 virtual void visit( LabelAddressExpr *labAddressExpr ) override final; … … 169 168 virtual Expression* mutate( LabelAddressExpr *labAddressExpr ) override final; 170 169 virtual Expression* mutate( CastExpr *castExpr ) override final; 171 virtual Expression* mutate( VirtualCastExpr *castExpr ) override final;172 170 virtual Expression* mutate( UntypedMemberExpr *memberExpr ) override final; 173 171 virtual Expression* mutate( MemberExpr *memberExpr ) override final; -
src/Common/PassVisitor.impl.h
rfcd17b2f r4d4e5de 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 >614 609 void PassVisitor< pass_type >::visit( AddressExpr * node ) { 615 610 VISIT_BODY( node ); … … 984 979 985 980 template< typename pass_type > 986 Expression * PassVisitor< pass_type >::mutate( VirtualCastExpr * node ) {987 MUTATE_BODY( Expression, node );988 }989 990 template< typename pass_type >991 981 Expression * PassVisitor< pass_type >::mutate( UntypedMemberExpr * node ) { 992 982 MUTATE_BODY( Expression, node ); -
src/GenPoly/Box.cc
rfcd17b2f r4d4e5de 1750 1750 1751 1751 Expression *PolyGenericCalculator::mutate( SizeofExpr *sizeofExpr ) { 1752 Type *ty = sizeofExpr->get_ isType() ? sizeofExpr->get_type() : sizeofExpr->get_expr()->get_result();1752 Type *ty = sizeofExpr->get_type(); 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_ isType() ? alignofExpr->get_type() : alignofExpr->get_expr()->get_result();1762 Type *ty = alignofExpr->get_type(); 1763 1763 if ( findGeneric( ty ) ) { 1764 1764 Expression *ret = new NameExpr( alignofName( mangleType( ty ) ) ); -
src/Makefile.am
rfcd17b2f r4d4e5de 10 10 ## Author : Peter A. Buhr 11 11 ## Created On : Sun May 31 08:51:46 2015 12 ## Last Modified By : Andrew Beach13 ## Last Modified On : T us Jul 25 10:34:00 201714 ## Update Count : 7 612 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Thu Oct 27 20:41:25 2016 14 ## Update Count : 75 15 15 ############################################################################### 16 16 … … 37 37 include SynTree/module.mk 38 38 include Tuples/module.mk 39 include Virtual/module.mk40 39 41 40 # put into lib for now -
src/Makefile.in
rfcd17b2f r4d4e5de 23 23 #SRC += ArgTweak/Rewriter.cc \ 24 24 # ArgTweak/Mutate.cc 25 26 ######################### -*- Mode: Makefile-Gmake -*- ########################27 ###############################################################################28 25 29 26 ######################### -*- Mode: Makefile-Gmake -*- ######################## … … 258 255 Tuples/driver_cfa_cpp-TupleAssignment.$(OBJEXT) \ 259 256 Tuples/driver_cfa_cpp-TupleExpansion.$(OBJEXT) \ 260 Tuples/driver_cfa_cpp-Explode.$(OBJEXT) \ 261 Virtual/driver_cfa_cpp-ExpandCasts.$(OBJEXT) 257 Tuples/driver_cfa_cpp-Explode.$(OBJEXT) 262 258 am_driver_cfa_cpp_OBJECTS = $(am__objects_1) 263 259 driver_cfa_cpp_OBJECTS = $(am_driver_cfa_cpp_OBJECTS) … … 359 355 $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk \ 360 356 $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk \ 361 $(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.hh357 $(srcdir)/Tuples/module.mk $(top_srcdir)/automake/depcomp \ 358 $(top_srcdir)/automake/ylwrap Parser/lex.cc Parser/parser.cc \ 359 Parser/parser.hh 364 360 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 365 361 ACLOCAL = @ACLOCAL@ … … 537 533 SynTree/Attribute.cc SynTree/VarExprReplacer.cc \ 538 534 Tuples/TupleAssignment.cc Tuples/TupleExpansion.cc \ 539 Tuples/Explode.cc Virtual/ExpandCasts.cc535 Tuples/Explode.cc 540 536 MAINTAINERCLEANFILES = Parser/parser.output ${libdir}/${notdir \ 541 537 ${cfa_cpplib_PROGRAMS}} … … 556 552 .SUFFIXES: 557 553 .SUFFIXES: .cc .ll .o .obj .yy 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)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) 559 555 @for dep in $?; do \ 560 556 case '$(am__configure_deps)' in \ … … 576 572 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 577 573 esac; 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):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): 579 575 580 576 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) … … 945 941 Tuples/driver_cfa_cpp-Explode.$(OBJEXT): Tuples/$(am__dirstamp) \ 946 942 Tuples/$(DEPDIR)/$(am__dirstamp) 947 Virtual/$(am__dirstamp):948 @$(MKDIR_P) Virtual949 @: > 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)955 943 driver/$(am__dirstamp): 956 944 @$(MKDIR_P) driver … … 975 963 -rm -f SynTree/*.$(OBJEXT) 976 964 -rm -f Tuples/*.$(OBJEXT) 977 -rm -f Virtual/*.$(OBJEXT)978 965 979 966 distclean-compile: … … 1091 1078 @AMDEP_TRUE@@am__include@ @am__quote@Tuples/$(DEPDIR)/driver_cfa_cpp-TupleAssignment.Po@am__quote@ 1092 1079 @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@1094 1080 1095 1081 .cc.o: … … 2662 2648 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 2663 2649 @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.cc2666 @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.cc2667 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Virtual/$(DEPDIR)/driver_cfa_cpp-ExpandCasts.Tpo Virtual/$(DEPDIR)/driver_cfa_cpp-ExpandCasts.Po2668 @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.cc2671 2672 Virtual/driver_cfa_cpp-ExpandCasts.obj: Virtual/ExpandCasts.cc2673 @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.Po2675 @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`2678 2650 2679 2651 .ll.cc: … … 2824 2796 -rm -f Tuples/$(DEPDIR)/$(am__dirstamp) 2825 2797 -rm -f Tuples/$(am__dirstamp) 2826 -rm -f Virtual/$(DEPDIR)/$(am__dirstamp)2827 -rm -f Virtual/$(am__dirstamp)2828 2798 -rm -f driver/$(am__dirstamp) 2829 2799 … … 2841 2811 2842 2812 distclean: distclean-am 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)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) 2844 2814 -rm -f Makefile 2845 2815 distclean-am: clean-am distclean-compile distclean-generic \ … … 2887 2857 2888 2858 maintainer-clean: maintainer-clean-am 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)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) 2890 2860 -rm -f Makefile 2891 2861 maintainer-clean-am: distclean-am maintainer-clean-generic -
src/Parser/ExpressionNode.cc
rfcd17b2f r4d4e5de 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Sat May 16 13:17:07 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : T hu Jul 27 12:10:10 201713 // Update Count : 55 611 // Last Modified By : Andrew Beach 12 // Last Modified On : Tus Jul 18 10:08:00 2017 13 // Update Count : 550 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; // converted integral value64 unsigned long long int v; // converted integral value 65 65 size_t last = str.length() - 1; // last character of constant 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 66 78 67 if ( str[0] == '0' ) { // octal/hex constant ? 79 68 dec = false; … … 129 118 } // if 130 119 131 ret = new ConstantExpr( Constant( new BasicType( noQualifiers, kind[Unsigned][size] ), str, v ) ); 132 CLEANUP: 120 Expression * ret = new ConstantExpr( Constant( new BasicType( noQualifiers, kind[Unsigned][size] ), str, v ) ); 133 121 delete &str; // created by lex 134 122 return ret; … … 186 174 return ret; 187 175 } // 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 lex 181 return ret; 182 } // build_constantChar 188 183 189 184 Expression * build_field_name_FLOATINGconstant( const std::string & str ) { … … 257 252 } 258 253 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 266 254 Expression *build_fieldSel( ExpressionNode *expr_node, Expression *member ) { 267 255 UntypedMemberExpr *ret = new UntypedMemberExpr( member, maybeMoveBuild< Expression >(expr_node) ); -
src/Parser/ParseNode.h
rfcd17b2f r4d4e5de 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 27 12:08:08201713 // Update Count : 78 812 // Last Modified On : Sat Jul 22 09:32:30 2017 13 // Update Count : 786 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 ); 161 162 ConstantExpr * build_constantStr( const std::string &str ); 162 163 Expression * build_field_name_FLOATINGconstant( const std::string & str ); … … 169 170 170 171 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
rfcd17b2f r4d4e5de 10 10 * Created On : Sat Sep 22 08:58:10 2001 11 11 * Last Modified By : Peter A. Buhr 12 * Last Modified On : Thu Jul 27 12:05:50201713 * Update Count : 54 912 * Last Modified On : Mon Jul 24 08:27:23 2017 13 * Update Count : 545 14 14 */ 15 15 … … 288 288 289 289 /* numeric constants */ 290 "0" { NUMERIC_RETURN(ZERO); } // CFA 291 "1" { NUMERIC_RETURN(ONE); } // CFA 290 292 {decimal_constant} { NUMERIC_RETURN(INTEGERconstant); } 291 293 {octal_constant} { NUMERIC_RETURN(INTEGERconstant); } -
src/Parser/parser.yy
rfcd17b2f r4d4e5de 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 27 12:08:08201713 // Update Count : 246 712 // Last Modified On : Mon Jul 24 09:01:14 2017 13 // Update Count : 2463 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 // CFA 144 145 145 146 // multi-character operators … … 158 159 %token ATassign // @= 159 160 160 %type<tok> identifier no_attr_identifier 161 %type<tok> identifier no_attr_identifier zero_one 161 162 %type<tok> identifier_or_type_name no_attr_identifier_or_type_name attr_name 162 163 %type<constant> string_literal … … 359 360 ; 360 361 362 zero_one: // CFA 363 ZERO 364 | ONE 365 ; 366 361 367 string_literal: 362 368 string_literal_list { $$ = build_constantStr( *$1 ); } … … 378 384 IDENTIFIER // typedef name cannot be used as a variable name 379 385 { $$ = new ExpressionNode( build_varref( $1 ) ); } 386 | zero_one 387 { $$ = new ExpressionNode( build_constantZeroOne( *$1 ) ); } 380 388 | tuple 381 389 | '(' comma_expression ')' … … 476 484 { 477 485 $$ = new ExpressionNode( build_field_name_fraction_constants( build_varref( $1 ), $2 ) ); 486 } 487 | zero_one fraction_constants 488 { 489 $$ = new ExpressionNode( build_field_name_fraction_constants( build_constantZeroOne( *$1 ), $2 ) ); 478 490 } 479 491 ; … … 561 573 // VIRTUAL cannot be opt because of look ahead issues 562 574 | '(' VIRTUAL ')' cast_expression 563 { $$ = new ExpressionNode( build_ virtual_cast( nullptr, $4 ) ); }575 { $$ = new ExpressionNode( build_cast( nullptr, $4 ) ); } 564 576 | '(' VIRTUAL type_no_function ')' cast_expression 565 { $$ = new ExpressionNode( build_ virtual_cast( $3, $5 ) ); }577 { $$ = new ExpressionNode( build_cast( $3, $5 ) ); } 566 578 // | '(' type_no_function ')' tuple 567 579 // { $$ = new ExpressionNode( build_cast( $2, $4 ) ); } -
src/ResolvExpr/AlternativeFinder.cc
rfcd17b2f r4d4e5de 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sat May 16 23:52:08 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Wed Jul 26 11:33:00201713 // Update Count : 3 111 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Mar 17 09:14:17 2017 13 // Update Count : 30 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 type884 // (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 893 880 void AlternativeFinder::visit( UntypedMemberExpr *memberExpr ) { 894 881 AlternativeFinder funcFinder( indexer, env ); -
src/ResolvExpr/AlternativeFinder.h
rfcd17b2f r4d4e5de 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sat May 16 23:56:12 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Wed Jul 26 11:24:00201713 // Update Count : 411 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jul 22 09:35:32 2017 13 // Update Count : 3 14 14 // 15 15 … … 49 49 virtual void visit( AddressExpr *addressExpr ); 50 50 virtual void visit( CastExpr *castExpr ); 51 virtual void visit( VirtualCastExpr *castExpr );52 51 virtual void visit( UntypedMemberExpr *memberExpr ); 53 52 virtual void visit( MemberExpr *memberExpr ); -
src/SynTree/ApplicationExpr.cc
rfcd17b2f r4d4e5de 44 44 } 45 45 46 ApplicationExpr::ApplicationExpr( Expression *funcExpr , const std::list< Expression * > & argList ) : function( funcExpr ), args( argList) {46 ApplicationExpr::ApplicationExpr( Expression *funcExpr ) : function( funcExpr ) { 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
rfcd17b2f r4d4e5de 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Jul 25 14:15:47201713 // Update Count : 5 412 // Last Modified On : Thu Mar 30 16:41:13 2017 13 // Update Count : 52 14 14 // 15 15 … … 298 298 if ( result->isVoid() ) { 299 299 os << "nothing"; 300 } else {301 result->print( os, indent+2 );302 } // if303 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";325 300 } else { 326 301 result->print( os, indent+2 ); -
src/SynTree/Expression.h
rfcd17b2f r4d4e5de 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Mon Jul 24 16:27:00201713 // Update Count : 4 311 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jul 22 09:53:16 2017 13 // Update Count : 42 14 14 // 15 15 … … 79 79 class ApplicationExpr : public Expression { 80 80 public: 81 ApplicationExpr( Expression * function , const std::list<Expression *> & args = std::list< Expression * >());81 ApplicationExpr( Expression * function ); 82 82 ApplicationExpr( const ApplicationExpr & other ); 83 83 virtual ~ApplicationExpr(); … … 194 194 195 195 Expression * get_arg() const { return arg; } 196 void set_arg( 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)e207 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 ); }217 199 virtual void accept( Visitor & v ) { v.visit( this ); } 218 200 virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); } -
src/SynTree/Mutator.cc
rfcd17b2f r4d4e5de 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Mon Jul 24 16:32:00 201713 // Update Count : 2 512 // Last Modified On : Thu Jun 22 13:43:00 2017 13 // Update Count : 24 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 244 237 Expression *Mutator::mutate( UntypedMemberExpr *memberExpr ) { 245 238 memberExpr->set_env( maybeMutate( memberExpr->get_env(), *this ) ); -
src/SynTree/Mutator.h
rfcd17b2f r4d4e5de 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Mon Jul 24 16:31:00 201713 // Update Count : 1 611 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jul 22 09:51:30 2017 13 // Update Count : 15 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 );62 61 virtual Expression* mutate( UntypedMemberExpr *memberExpr ); 63 62 virtual Expression* mutate( MemberExpr *memberExpr ); -
src/SynTree/SynTree.h
rfcd17b2f r4d4e5de 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Mon Jul 24 16:54:00201713 // Update Count : 1 111 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jul 22 09:51:46 2017 13 // Update Count : 10 14 14 // 15 15 … … 66 66 class LabelAddressExpr; 67 67 class CastExpr; 68 class VirtualCastExpr;69 68 class MemberExpr; 70 69 class UntypedMemberExpr; -
src/SynTree/Visitor.cc
rfcd17b2f r4d4e5de 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Mon Jul 24 16:30:00 201713 // Update Count : 2 712 // Last Modified On : Thu Jun 22 13:41:00 2017 13 // Update Count : 26 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 199 194 void Visitor::visit( UntypedMemberExpr *memberExpr ) { 200 195 maybeAccept( memberExpr->get_result(), *this ); -
src/SynTree/Visitor.h
rfcd17b2f r4d4e5de 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Mon Jul 24 16:28:00201713 // Update Count : 1 311 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jul 22 09:54:04 2017 13 // Update Count : 12 14 14 // 15 15 … … 60 60 virtual void visit( NameExpr *nameExpr ); 61 61 virtual void visit( CastExpr *castExpr ); 62 virtual void visit( VirtualCastExpr *castExpr );63 62 virtual void visit( AddressExpr *addressExpr ); 64 63 virtual void visit( LabelAddressExpr *labAddressExpr ); -
src/libcfa/Makefile.am
rfcd17b2f r4d4e5de 10 10 ## Author : Peter A. Buhr 11 11 ## Created On : Sun May 31 08:54:01 2015 12 ## Last Modified By : Andrew Beach13 ## Last Modified On : Wed Jul 26 14:15:00201714 ## Update Count : 22 112 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Thu Jul 20 23:09:34 2017 14 ## Update Count : 220 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 virtual.c58 assert.c exception.c typeobject.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- virtual.o : virtual.c75 libcfa_a-typeobject.o : typeobject.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- virtual.o : virtual.c84 libcfa_d_a-typeobject.o : typeobject.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
rfcd17b2f r4d4e5de 154 154 concurrency/coroutine.c concurrency/thread.c \ 155 155 concurrency/kernel.c concurrency/monitor.c assert.c \ 156 exception.c virtual.c concurrency/CtxSwitch-@MACHINE_TYPE@.S\157 concurrency/ alarm.c concurrency/invoke.c \158 concurrency/ preemption.c156 exception.c typeobject.c \ 157 concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/alarm.c \ 158 concurrency/invoke.c 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- virtual.$(OBJEXT) $(am__objects_3)180 libcfa_d_a-typeobject.$(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 virtual.c concurrency/CtxSwitch-@MACHINE_TYPE@.S\192 concurrency/ alarm.c concurrency/invoke.c \193 concurrency/ preemption.c191 exception.c typeobject.c \ 192 concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/alarm.c \ 193 concurrency/invoke.c 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- virtual.$(OBJEXT) $(am__objects_7)213 libcfa_a-typeobject.$(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 virtual.c $(am__append_4)425 assert.c exception.c typeobject.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- virtual.Po@am__quote@600 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-typeobject.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- virtual.Po@am__quote@611 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-typeobject.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- virtual.obj: virtual.c923 @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.Po925 @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`922 libcfa_d_a-typeobject.obj: typeobject.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-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.Po 925 @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` 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- virtual.obj: virtual.c1217 @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.Po1219 @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`1216 libcfa_a-typeobject.obj: typeobject.c 1217 @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.Po 1219 @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` 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- virtual.o : virtual.c1515 libcfa_a-typeobject.o : typeobject.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- virtual.o : virtual.c1524 libcfa_d_a-typeobject.o : typeobject.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
rfcd17b2f r4d4e5de 11 11 // Created On : Fri May 15 23:12:02 2015 12 12 // Last Modified By : Andrew Beach 13 // Last Modified On : Wed Jul 26 14:38:00 201714 // Update Count : 44 313 // Last Modified On : Fri Jul 7 11:13:00 2017 14 // Update Count : 442 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 expandCasts61 60 62 61 using namespace std; … … 314 313 } 315 314 316 OPTPRINT( "virtual expandCasts" ) // Must come after translateEHM317 Virtual::expandCasts( translationUnit );318 319 315 OPTPRINT("instantiateGenerics") 320 316 GenPoly::instantiateGeneric( translationUnit ); -
src/prelude/builtins.c
rfcd17b2f r4d4e5de 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 : Andrew Beach12 // Last Modified On : Tus Jul 25 15:33:00 201713 // Update Count : 1 414 // 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jul 22 10:34:20 2017 13 // Update Count : 13 14 // 15 15 16 16 // exception implementation … … 18 18 typedef unsigned long long __cfaabi_exception_type_t; 19 19 20 #include "../libcfa/virtual.h"21 20 #include "../libcfa/exception.h" 22 21 -
src/tests/designations.c
rfcd17b2f r4d4e5de 9 9 // Author : Rob Schluntz 10 10 // Created On : Thu Jun 29 15:26:36 2017 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Thu Ju l 27 11:46:35 201713 // Update Count : 311 // Last Modified By : Rob Schluntz 12 // Last Modified On : Thu Jun 29 15:27:05 2017 13 // Update Count : 2 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 104 91 int main() { 105 92 // simple designation case - starting from beginning of structure, leaves ptr default-initialized (zero) … … 212 199 }; 213 200 #endif 214 // array designation 215 int i[2] = { [1] : 3 }; 201 216 202 // allowed to have 'too many' initialized lists - essentially they are ignored. 217 203 int i1 = { 3 }; … … 254 240 const char * str0 = "hello"; 255 241 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'} };259 242 } 260 243
Note:
See TracChangeset
for help on using the changeset viewer.