Changeset a5a71d0 for src/ResolvExpr


Ignore:
Timestamp:
Apr 6, 2016, 5:11:32 PM (9 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
eab39cd
Parents:
39786813 (diff), 3aba311 (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.
Message:

Merge branch 'fix-memory-error' into ctor

Conflicts:

src/CodeGen/CodeGenerator.cc
src/Makefile.in
src/Parser/DeclarationNode.cc
src/Parser/ParseNode.h
src/Parser/TypeData.cc
src/Parser/parser.cc
src/Parser/parser.yy
src/ResolvExpr/Resolver.cc
src/SymTab/Validate.cc
src/SynTree/Declaration.h
src/SynTree/Mutator.cc
src/SynTree/Mutator.h
src/SynTree/SynTree.h
src/SynTree/Visitor.cc
src/SynTree/Visitor.h
src/libcfa/prelude.cf

Location:
src/ResolvExpr
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/AdjustExprType.cc

    r39786813 ra5a71d0  
    1010// Created On       : Sat May 16 23:41:42 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat May 16 23:54:02 2015
    13 // Update Count     : 3
     12// Last Modified On : Wed Mar  2 17:34:53 2016
     13// Update Count     : 4
    1414//
    1515
     
    3333                virtual Type* mutate( UnionInstType *aggregateUseType );
    3434                virtual Type* mutate( EnumInstType *aggregateUseType );
    35                 virtual Type* mutate( ContextInstType *aggregateUseType );
     35                virtual Type* mutate( TraitInstType *aggregateUseType );
    3636                virtual Type* mutate( TypeInstType *aggregateUseType );
    3737                virtual Type* mutate( TupleType *tupleType );
     
    8787        }
    8888
    89         Type *AdjustExprType::mutate( ContextInstType *aggregateUseType ) {
     89        Type *AdjustExprType::mutate( TraitInstType *aggregateUseType ) {
    9090                return aggregateUseType;
    9191        }
  • src/ResolvExpr/CommonType.cc

    r39786813 ra5a71d0  
    1010// Created On       : Sun May 17 06:59:27 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun May 17 07:04:50 2015
    13 // Update Count     : 2
     12// Last Modified On : Wed Mar  2 17:35:34 2016
     13// Update Count     : 3
    1414//
    1515
     
    3535                virtual void visit( UnionInstType *aggregateUseType );
    3636                virtual void visit( EnumInstType *aggregateUseType );
    37                 virtual void visit( ContextInstType *aggregateUseType );
     37                virtual void visit( TraitInstType *aggregateUseType );
    3838                virtual void visit( TypeInstType *aggregateUseType );
    3939                virtual void visit( TupleType *tupleType );
     
    186186        }
    187187
    188         void CommonType::visit( ContextInstType *aggregateUseType ) {
     188        void CommonType::visit( TraitInstType *aggregateUseType ) {
    189189        }
    190190
  • src/ResolvExpr/ConversionCost.cc

    r39786813 ra5a71d0  
    1010// Created On       : Sun May 17 07:06:19 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun May 17 07:22:19 2015
    13 // Update Count     : 4
     12// Last Modified On : Wed Mar  2 17:35:46 2016
     13// Update Count     : 6
    1414//
    1515
     
    206206        }
    207207
    208         void ConversionCost::visit(ContextInstType *inst) {
     208        void ConversionCost::visit(TraitInstType *inst) {
    209209        }
    210210
     
    249249
    250250        void ConversionCost::visit(VarArgsType *varArgsType) {
    251                 if ( VarArgsType *destAsVarArgs = dynamic_cast< VarArgsType* >( dest ) ) {
     251                if ( dynamic_cast< VarArgsType* >( dest ) ) {
    252252                        cost = Cost::zero;
    253253                }
  • src/ResolvExpr/ConversionCost.h

    r39786813 ra5a71d0  
    1010// Created On       : Sun May 17 09:37:28 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun May 17 09:39:23 2015
    13 // Update Count     : 2
     12// Last Modified On : Wed Mar  2 17:35:56 2016
     13// Update Count     : 3
    1414//
    1515
     
    3737                virtual void visit(UnionInstType *aggregateUseType);
    3838                virtual void visit(EnumInstType *aggregateUseType);
    39                 virtual void visit(ContextInstType *aggregateUseType);
     39                virtual void visit(TraitInstType *aggregateUseType);
    4040                virtual void visit(TypeInstType *aggregateUseType);
    4141                virtual void visit(TupleType *tupleType);
  • src/ResolvExpr/PtrsAssignable.cc

    r39786813 ra5a71d0  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 11:44:11 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Mon Sep 21 14:34:58 2015
    13 // Update Count     : 7
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Wed Mar  2 17:36:05 2016
     13// Update Count     : 8
    1414//
    1515
     
    3535                virtual void visit( UnionInstType *inst );
    3636                virtual void visit( EnumInstType *inst );
    37                 virtual void visit( ContextInstType *inst );
     37                virtual void visit( TraitInstType *inst );
    3838                virtual void visit( TypeInstType *inst );
    3939                virtual void visit( TupleType *tupleType );
     
    101101        }
    102102
    103         void PtrsAssignable::visit( ContextInstType *inst ) {
     103        void PtrsAssignable::visit( TraitInstType *inst ) {
    104104                // I definitely don't think we should be doing anything here
    105105        }
  • src/ResolvExpr/PtrsCastable.cc

    r39786813 ra5a71d0  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 11:48:00 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Mon Oct 05 14:49:12 2015
    13 // Update Count     : 7
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Wed Mar  2 17:36:18 2016
     13// Update Count     : 8
    1414//
    1515
     
    3636                virtual void visit(UnionInstType *inst);
    3737                virtual void visit(EnumInstType *inst);
    38                 virtual void visit(ContextInstType *inst);
     38                virtual void visit(TraitInstType *inst);
    3939                virtual void visit(TypeInstType *inst);
    4040                virtual void visit(TupleType *tupleType);
     
    116116
    117117        void PtrsCastable::visit(EnumInstType *inst) {
    118                 if ( dynamic_cast< EnumInstType* >( inst ) ) {
     118                if ( dynamic_cast< EnumInstType* >( dest ) ) {
    119119                        result = 1;
    120                 } else if ( BasicType *bt = dynamic_cast< BasicType* >( inst ) ) {
     120                } else if ( BasicType *bt = dynamic_cast< BasicType* >( dest ) ) {
    121121                        if ( bt->get_kind() == BasicType::SignedInt ) {
    122122                                result = 0;
     
    129129        }
    130130
    131         void PtrsCastable::visit(ContextInstType *inst) {
     131        void PtrsCastable::visit(TraitInstType *inst) {
    132132                // I definitely don't think we should be doing anything here
    133133        }
  • src/ResolvExpr/RenameVars.cc

    r39786813 ra5a71d0  
    1010// Created On       : Sun May 17 12:05:18 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Jun  8 14:51:35 2015
    13 // Update Count     : 4
     12// Last Modified On : Wed Mar  2 17:36:32 2016
     13// Update Count     : 5
    1414//
    1515
     
    8686        }
    8787
    88         void RenameVars::visit( ContextInstType *aggregateUseType ) {
     88        void RenameVars::visit( TraitInstType *aggregateUseType ) {
    8989                typeBefore( aggregateUseType );
    9090                acceptAll( aggregateUseType->get_parameters(), *this );
  • src/ResolvExpr/RenameVars.h

    r39786813 ra5a71d0  
    1010// Created On       : Sun May 17 12:10:28 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun May 17 12:11:53 2015
    13 // Update Count     : 2
     12// Last Modified On : Wed Mar  2 17:36:39 2016
     13// Update Count     : 3
    1414//
    1515
     
    4040                virtual void visit( UnionInstType *aggregateUseType );
    4141                virtual void visit( EnumInstType *aggregateUseType );
    42                 virtual void visit( ContextInstType *aggregateUseType );
     42                virtual void visit( TraitInstType *aggregateUseType );
    4343                virtual void visit( TypeInstType *aggregateUseType );
    4444                virtual void visit( TupleType *tupleType );
  • src/ResolvExpr/Resolver.cc

    r39786813 ra5a71d0  
    1010// Created On       : Sun May 17 12:17:01 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Mar 30 15:47:19 2016
     12// Last Modified On : Mon Apr 04 17:11:54 2016
    1313// Update Count     : 203
    1414//
     
    167167                Type *new_type = resolveTypeof( objectDecl->get_type(), *this );
    168168                objectDecl->set_type( new_type );
     169                // To handle initialization of routine pointers, e.g., int (*fp)(int) = foo(), means that class-variable
     170                // initContext is changed multiple time because the LHS is analysed twice. The second analysis changes
     171                // initContext because of a function type can contain object declarations in the return and parameter types. So
     172                // each value of initContext is retained, so the type on the first analysis is preserved and used for selecting
     173                // the RHS.
     174                Type *temp = initContext;
    169175                initContext = new_type;
    170176                SymTab::Indexer::visit( objectDecl );
     177                initContext = temp;
    171178        }
    172179
  • src/ResolvExpr/Unify.cc

    r39786813 ra5a71d0  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 12:27:10 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Sep 02 14:43:22 2015
    13 // Update Count     : 36
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Wed Mar  2 17:37:05 2016
     13// Update Count     : 37
    1414//
    1515
     
    5656                virtual void visit(UnionInstType *aggregateUseType);
    5757                virtual void visit(EnumInstType *aggregateUseType);
    58                 virtual void visit(ContextInstType *aggregateUseType);
     58                virtual void visit(TraitInstType *aggregateUseType);
    5959                virtual void visit(TypeInstType *aggregateUseType);
    6060                virtual void visit(TupleType *tupleType);
     
    541541        }
    542542
    543         void Unify::visit(ContextInstType *contextInst) {
     543        void Unify::visit(TraitInstType *contextInst) {
    544544                handleRefType( contextInst, type2 );
    545545        }
Note: See TracChangeset for help on using the changeset viewer.