Changeset 722c4831 for src


Ignore:
Timestamp:
May 22, 2019, 5:32:46 PM (5 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
489bacf, f23de79d
Parents:
893e106
Message:

Temporary patch around Pass issues

Location:
src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Expr.cpp

    r893e106 r722c4831  
    159159        assert( aggregate->result );
    160160
    161 <<<<<<< HEAD
    162         // #warning Needs GenericSubsitution.cpp building to work correctly
    163         // result.set_and_mutate( mem->get_type() )->qualifiers |= aggregate->result->qualifiers | CV::Lvalue;  // FIXME temporary patch
    164 
    165         // take ownership of member type
    166         result = mem->get_type();
    167         // substitute aggregate generic parameters into member type
    168         genericSubsitution( aggregate->result ).apply( result );
    169         // ensure lvalue and appropriate restrictions from aggregate type
    170         result.get_and_mutate()->qualifiers |= aggregate->result->qualifiers | CV::Lvalue;
    171 =======
    172 //      assert(!"unimplemented; need TypeSubstitution, genericSubstitution");
    173 >>>>>>> ef5ef56042ce2b547da955746d9986e26cf628ca
     161        #warning Needs GenericSubsitution.cpp building to work correctly
     162        result.set_and_mutate( mem->get_type() )->qualifiers |= aggregate->result->qualifiers | CV::Lvalue;  // FIXME temporary patch
     163
     164        // // take ownership of member type
     165        // result = mem->get_type();
     166        // // substitute aggregate generic parameters into member type
     167        // genericSubsitution( aggregate->result ).apply( result );
     168        // // ensure lvalue and appropriate restrictions from aggregate type
     169        // result.get_and_mutate()->qualifiers |= aggregate->result->qualifiers | CV::Lvalue;
    174170}
    175171
  • src/AST/GenericSubstitution.cpp

    r893e106 r722c4831  
    3131                TypeSubstitution sub;
    3232
    33                 const Type * previsit( const Type * ty ) {
     33                void previsit( const Type * ty ) {
    3434                        assertf( false, "Attempted generic substitution for non-aggregate type: %s",
    3535                                toString( ty ).c_str() );
    36                         return ty;
    3736                }
    3837
    39                 const ReferenceType * previsit( const ReferenceType * ty ) {
     38                void previsit( const ReferenceType * ty ) {
    4039                        // do nothing; allows substitution from base type
    41                         return ty;
    4240                }
    4341
    44                 const ReferenceToType * previsit( const ReferenceToType * ty ) {
     42                void previsit( const ReferenceToType * ty ) {
    4543                        visit_children = false;
    4644                        // build substitution from base parameters
    4745                        const AggregateDecl * aggr = ty->aggr();
    4846                        sub = TypeSubstitution{ aggr->params.begin(), aggr->params.end(), ty->params.begin() };
    49                         return ty;
    5047                }
    5148        };
  • src/AST/module.mk

    r893e106 r722c4831  
    2121        AST/DeclReplacer.cpp \
    2222        AST/Expr.cpp \
    23         AST/GenericSubstitution.cpp \
    2423        AST/Init.cpp \
    2524        AST/LinkageSpec.cpp \
  • src/Makefile.in

    r893e106 r722c4831  
    167167am__objects_1 = AST/Attribute.$(OBJEXT) AST/Convert.$(OBJEXT) \
    168168        AST/Decl.$(OBJEXT) AST/DeclReplacer.$(OBJEXT) \
    169         AST/Expr.$(OBJEXT) AST/GenericSubstitution.$(OBJEXT) \
    170         AST/Init.$(OBJEXT) AST/LinkageSpec.$(OBJEXT) \
    171         AST/Node.$(OBJEXT) AST/Pass.$(OBJEXT) AST/Print.$(OBJEXT) \
    172         AST/Stmt.$(OBJEXT) AST/Type.$(OBJEXT) \
    173         AST/TypeSubstitution.$(OBJEXT)
     169        AST/Expr.$(OBJEXT) AST/Init.$(OBJEXT) \
     170        AST/LinkageSpec.$(OBJEXT) AST/Node.$(OBJEXT) \
     171        AST/Pass.$(OBJEXT) AST/Print.$(OBJEXT) AST/Stmt.$(OBJEXT) \
     172        AST/Type.$(OBJEXT) AST/TypeSubstitution.$(OBJEXT)
    174173am__objects_2 = CodeGen/CodeGenerator.$(OBJEXT) \
    175174        CodeGen/FixMain.$(OBJEXT) CodeGen/GenType.$(OBJEXT) \
     
    575574        AST/DeclReplacer.cpp \
    576575        AST/Expr.cpp \
    577         AST/GenericSubstitution.cpp \
    578576        AST/Init.cpp \
    579577        AST/LinkageSpec.cpp \
     
    741739        AST/$(DEPDIR)/$(am__dirstamp)
    742740AST/Expr.$(OBJEXT): AST/$(am__dirstamp) AST/$(DEPDIR)/$(am__dirstamp)
    743 AST/GenericSubstitution.$(OBJEXT): AST/$(am__dirstamp) \
    744         AST/$(DEPDIR)/$(am__dirstamp)
    745741AST/Init.$(OBJEXT): AST/$(am__dirstamp) AST/$(DEPDIR)/$(am__dirstamp)
    746742AST/LinkageSpec.$(OBJEXT): AST/$(am__dirstamp) \
     
    11771173@AMDEP_TRUE@@am__include@ @am__quote@AST/$(DEPDIR)/DeclReplacer.Po@am__quote@
    11781174@AMDEP_TRUE@@am__include@ @am__quote@AST/$(DEPDIR)/Expr.Po@am__quote@
    1179 @AMDEP_TRUE@@am__include@ @am__quote@AST/$(DEPDIR)/GenericSubstitution.Po@am__quote@
    11801175@AMDEP_TRUE@@am__include@ @am__quote@AST/$(DEPDIR)/Init.Po@am__quote@
    11811176@AMDEP_TRUE@@am__include@ @am__quote@AST/$(DEPDIR)/LinkageSpec.Po@am__quote@
Note: See TracChangeset for help on using the changeset viewer.