Changeset 8f7cea1


Ignore:
Timestamp:
Sep 11, 2016, 9:58:25 AM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
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)
Message:

remove NameMatcher? code

Location:
src
Files:
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • src/Makefile.in

    r908cc83 r8f7cea1  
    188188        SynTree/driver_cfa_cpp-TypeSubstitution.$(OBJEXT) \
    189189        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)
    192191am_driver_cfa_cpp_OBJECTS = $(am__objects_1)
    193192driver_cfa_cpp_OBJECTS = $(am_driver_cfa_cpp_OBJECTS)
     
    401400        SynTree/Initializer.cc SynTree/Visitor.cc SynTree/Mutator.cc \
    402401        SynTree/AddStmtVisitor.cc SynTree/TypeSubstitution.cc \
    403         SynTree/Attribute.cc Tuples/TupleAssignment.cc \
    404         Tuples/NameMatcher.cc
     402        SynTree/Attribute.cc Tuples/TupleAssignment.cc
    405403MAINTAINERCLEANFILES = Parser/parser.output ${libdir}/${notdir \
    406404        ${cfa_cpplib_PROGRAMS}}
     
    769767Tuples/driver_cfa_cpp-TupleAssignment.$(OBJEXT):  \
    770768        Tuples/$(am__dirstamp) Tuples/$(DEPDIR)/$(am__dirstamp)
    771 Tuples/driver_cfa_cpp-NameMatcher.$(OBJEXT): Tuples/$(am__dirstamp) \
    772         Tuples/$(DEPDIR)/$(am__dirstamp)
    773769driver/$(am__dirstamp):
    774770        @$(MKDIR_P) driver
     
    877873        -rm -f SynTree/driver_cfa_cpp-Visitor.$(OBJEXT)
    878874        -rm -f SynTree/driver_cfa_cpp-VoidType.$(OBJEXT)
    879         -rm -f Tuples/driver_cfa_cpp-NameMatcher.$(OBJEXT)
    880875        -rm -f Tuples/driver_cfa_cpp-TupleAssignment.$(OBJEXT)
    881876
     
    982977@AMDEP_TRUE@@am__include@ @am__quote@SynTree/$(DEPDIR)/driver_cfa_cpp-Visitor.Po@am__quote@
    983978@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@
    985979@AMDEP_TRUE@@am__include@ @am__quote@Tuples/$(DEPDIR)/driver_cfa_cpp-TupleAssignment.Po@am__quote@
    986980
     
    24002394@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    24012395@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.cc
    2404 @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.cc
    2405 @am__fastdepCXX_TRUE@   $(AM_V_at)$(am__mv) Tuples/$(DEPDIR)/driver_cfa_cpp-NameMatcher.Tpo Tuples/$(DEPDIR)/driver_cfa_cpp-NameMatcher.Po
    2406 @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.cc
    2409 
    2410 Tuples/driver_cfa_cpp-NameMatcher.obj: Tuples/NameMatcher.cc
    2411 @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.Po
    2413 @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`
    24162396
    24172397.ll.cc:
  • src/ResolvExpr/AlternativeFinder.cc

    r908cc83 r8f7cea1  
    3939#include "SymTab/Validate.h"
    4040#include "Tuples/TupleAssignment.h"
    41 #include "Tuples/NameMatcher.h"
    4241#include "Common/utility.h"
    4342#include "InitTweak/InitTweak.h"
     
    265264
    266265        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() );
    273269
    274270                Cost convCost( 0, 0, 0 );
     
    397393                resultEnv.extractOpenVars( openVars );
    398394
    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                 */
    407395                std::list< DeclarationWithType* >::iterator formal = formals.begin();
    408396
     
    707695
    708696                        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() );
    715700                                std::cerr << "Case +++++++++++++" << std::endl;
    716701                                std::cerr << "formals are:" << std::endl;
     
    10681053                }
    10691054        }
     1055
     1056        void AlternativeFinder::visit( TupleIndexExpr *tupleExpr ) {
     1057                alternatives.push_back( Alternative( tupleExpr->clone(), env, Cost::zero ) );
     1058        }
    10701059} // namespace ResolvExpr
    10711060
  • src/ResolvExpr/AlternativeFinder.h

    r908cc83 r8f7cea1  
    6767                virtual void visit( ImplicitCopyCtorExpr * impCpCtorExpr );
    6868                virtual void visit( ConstructorExpr * ctorExpr );
     69                virtual void visit( TupleIndexExpr *tupleExpr );
    6970                /// Runs a new alternative finder on each element in [begin, end)
    7071                /// and writes each alternative finder to out.
  • src/Tuples/module.mk

    r908cc83 r8f7cea1  
    66## file "LICENCE" distributed with Cforall.
    77##
    8 ## module.mk -- 
     8## module.mk --
    99##
    1010## Author           : Richard C. Bilson
     
    1515###############################################################################
    1616
    17 SRC +=  Tuples/TupleAssignment.cc \
    18         Tuples/NameMatcher.cc
     17SRC +=  Tuples/TupleAssignment.cc
Note: See TracChangeset for help on using the changeset viewer.