Changeset 8f7cea1
- Timestamp:
- Sep 11, 2016, 9:58:25 AM (8 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:
- 6eb8948
- Parents:
- 908cc83
- git-author:
- Rob Schluntz <rschlunt@…> (09/11/16 09:56:02)
- git-committer:
- Rob Schluntz <rschlunt@…> (09/11/16 09:58:25)
- Location:
- src
- Files:
-
- 2 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Makefile.in
r908cc83 r8f7cea1 188 188 SynTree/driver_cfa_cpp-TypeSubstitution.$(OBJEXT) \ 189 189 SynTree/driver_cfa_cpp-Attribute.$(OBJEXT) \ 190 Tuples/driver_cfa_cpp-TupleAssignment.$(OBJEXT) \ 191 Tuples/driver_cfa_cpp-NameMatcher.$(OBJEXT) 190 Tuples/driver_cfa_cpp-TupleAssignment.$(OBJEXT) 192 191 am_driver_cfa_cpp_OBJECTS = $(am__objects_1) 193 192 driver_cfa_cpp_OBJECTS = $(am_driver_cfa_cpp_OBJECTS) … … 401 400 SynTree/Initializer.cc SynTree/Visitor.cc SynTree/Mutator.cc \ 402 401 SynTree/AddStmtVisitor.cc SynTree/TypeSubstitution.cc \ 403 SynTree/Attribute.cc Tuples/TupleAssignment.cc \ 404 Tuples/NameMatcher.cc 402 SynTree/Attribute.cc Tuples/TupleAssignment.cc 405 403 MAINTAINERCLEANFILES = Parser/parser.output ${libdir}/${notdir \ 406 404 ${cfa_cpplib_PROGRAMS}} … … 769 767 Tuples/driver_cfa_cpp-TupleAssignment.$(OBJEXT): \ 770 768 Tuples/$(am__dirstamp) Tuples/$(DEPDIR)/$(am__dirstamp) 771 Tuples/driver_cfa_cpp-NameMatcher.$(OBJEXT): Tuples/$(am__dirstamp) \772 Tuples/$(DEPDIR)/$(am__dirstamp)773 769 driver/$(am__dirstamp): 774 770 @$(MKDIR_P) driver … … 877 873 -rm -f SynTree/driver_cfa_cpp-Visitor.$(OBJEXT) 878 874 -rm -f SynTree/driver_cfa_cpp-VoidType.$(OBJEXT) 879 -rm -f Tuples/driver_cfa_cpp-NameMatcher.$(OBJEXT)880 875 -rm -f Tuples/driver_cfa_cpp-TupleAssignment.$(OBJEXT) 881 876 … … 982 977 @AMDEP_TRUE@@am__include@ @am__quote@SynTree/$(DEPDIR)/driver_cfa_cpp-Visitor.Po@am__quote@ 983 978 @AMDEP_TRUE@@am__include@ @am__quote@SynTree/$(DEPDIR)/driver_cfa_cpp-VoidType.Po@am__quote@ 984 @AMDEP_TRUE@@am__include@ @am__quote@Tuples/$(DEPDIR)/driver_cfa_cpp-NameMatcher.Po@am__quote@985 979 @AMDEP_TRUE@@am__include@ @am__quote@Tuples/$(DEPDIR)/driver_cfa_cpp-TupleAssignment.Po@am__quote@ 986 980 … … 2400 2394 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 2401 2395 @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-TupleAssignment.obj `if test -f 'Tuples/TupleAssignment.cc'; then $(CYGPATH_W) 'Tuples/TupleAssignment.cc'; else $(CYGPATH_W) '$(srcdir)/Tuples/TupleAssignment.cc'; fi` 2402 2403 Tuples/driver_cfa_cpp-NameMatcher.o: Tuples/NameMatcher.cc2404 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Tuples/driver_cfa_cpp-NameMatcher.o -MD -MP -MF Tuples/$(DEPDIR)/driver_cfa_cpp-NameMatcher.Tpo -c -o Tuples/driver_cfa_cpp-NameMatcher.o `test -f 'Tuples/NameMatcher.cc' || echo '$(srcdir)/'`Tuples/NameMatcher.cc2405 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Tuples/$(DEPDIR)/driver_cfa_cpp-NameMatcher.Tpo Tuples/$(DEPDIR)/driver_cfa_cpp-NameMatcher.Po2406 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Tuples/NameMatcher.cc' object='Tuples/driver_cfa_cpp-NameMatcher.o' libtool=no @AMDEPBACKSLASH@2407 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@2408 @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-NameMatcher.o `test -f 'Tuples/NameMatcher.cc' || echo '$(srcdir)/'`Tuples/NameMatcher.cc2409 2410 Tuples/driver_cfa_cpp-NameMatcher.obj: Tuples/NameMatcher.cc2411 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Tuples/driver_cfa_cpp-NameMatcher.obj -MD -MP -MF Tuples/$(DEPDIR)/driver_cfa_cpp-NameMatcher.Tpo -c -o Tuples/driver_cfa_cpp-NameMatcher.obj `if test -f 'Tuples/NameMatcher.cc'; then $(CYGPATH_W) 'Tuples/NameMatcher.cc'; else $(CYGPATH_W) '$(srcdir)/Tuples/NameMatcher.cc'; fi`2412 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Tuples/$(DEPDIR)/driver_cfa_cpp-NameMatcher.Tpo Tuples/$(DEPDIR)/driver_cfa_cpp-NameMatcher.Po2413 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Tuples/NameMatcher.cc' object='Tuples/driver_cfa_cpp-NameMatcher.obj' libtool=no @AMDEPBACKSLASH@2414 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@2415 @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-NameMatcher.obj `if test -f 'Tuples/NameMatcher.cc'; then $(CYGPATH_W) 'Tuples/NameMatcher.cc'; else $(CYGPATH_W) '$(srcdir)/Tuples/NameMatcher.cc'; fi`2416 2396 2417 2397 .ll.cc: -
src/ResolvExpr/AlternativeFinder.cc
r908cc83 r8f7cea1 39 39 #include "SymTab/Validate.h" 40 40 #include "Tuples/TupleAssignment.h" 41 #include "Tuples/NameMatcher.h"42 41 #include "Common/utility.h" 43 42 #include "InitTweak/InitTweak.h" … … 265 264 266 265 Cost computeConversionCost( Alternative &alt, const SymTab::Indexer &indexer ) { 267 ApplicationExpr *appExpr = dynamic_cast< ApplicationExpr* >( alt.expr ); 268 assert( appExpr ); 269 PointerType *pointer = dynamic_cast< PointerType* >( appExpr->get_function()->get_results().front() ); 270 assert( pointer ); 271 FunctionType *function = dynamic_cast< FunctionType* >( pointer->get_base() ); 272 assert( function ); 266 ApplicationExpr *appExpr = safe_dynamic_cast< ApplicationExpr* >( alt.expr ); 267 PointerType *pointer = safe_dynamic_cast< PointerType* >( appExpr->get_function()->get_results().front() ); 268 FunctionType *function = safe_dynamic_cast< FunctionType* >( pointer->get_base() ); 273 269 274 270 Cost convCost( 0, 0, 0 ); … … 397 393 resultEnv.extractOpenVars( openVars ); 398 394 399 /*400 Tuples::NameMatcher matcher( formals );401 try {402 matcher.match( actuals );403 } catch ( Tuples::NoMatch &e ) {404 std::cerr << "Alternative doesn't match: " << e.message << std::endl;405 }406 */407 395 std::list< DeclarationWithType* >::iterator formal = formals.begin(); 408 396 … … 707 695 708 696 PRINT( 709 ApplicationExpr *appExpr = dynamic_cast< ApplicationExpr* >( withFunc->expr ); 710 assert( appExpr ); 711 PointerType *pointer = dynamic_cast< PointerType* >( appExpr->get_function()->get_results().front() ); 712 assert( pointer ); 713 FunctionType *function = dynamic_cast< FunctionType* >( pointer->get_base() ); 714 assert( function ); 697 ApplicationExpr *appExpr = safe_dynamic_cast< ApplicationExpr* >( withFunc->expr ); 698 PointerType *pointer = safe_dynamic_cast< PointerType* >( appExpr->get_function()->get_results().front() ); 699 FunctionType *function = safe_dynamic_cast< FunctionType* >( pointer->get_base() ); 715 700 std::cerr << "Case +++++++++++++" << std::endl; 716 701 std::cerr << "formals are:" << std::endl; … … 1068 1053 } 1069 1054 } 1055 1056 void AlternativeFinder::visit( TupleIndexExpr *tupleExpr ) { 1057 alternatives.push_back( Alternative( tupleExpr->clone(), env, Cost::zero ) ); 1058 } 1070 1059 } // namespace ResolvExpr 1071 1060 -
src/ResolvExpr/AlternativeFinder.h
r908cc83 r8f7cea1 67 67 virtual void visit( ImplicitCopyCtorExpr * impCpCtorExpr ); 68 68 virtual void visit( ConstructorExpr * ctorExpr ); 69 virtual void visit( TupleIndexExpr *tupleExpr ); 69 70 /// Runs a new alternative finder on each element in [begin, end) 70 71 /// and writes each alternative finder to out. -
src/Tuples/module.mk
r908cc83 r8f7cea1 6 6 ## file "LICENCE" distributed with Cforall. 7 7 ## 8 ## module.mk -- 8 ## module.mk -- 9 9 ## 10 10 ## Author : Richard C. Bilson … … 15 15 ############################################################################### 16 16 17 SRC += Tuples/TupleAssignment.cc \ 18 Tuples/NameMatcher.cc 17 SRC += Tuples/TupleAssignment.cc
Note: See TracChangeset
for help on using the changeset viewer.