Changeset 5f2f2d7 for src/SynTree


Ignore:
Timestamp:
Jun 8, 2015, 8:56:35 PM (10 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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, string, with_gc
Children:
81419b5
Parents:
cd623a4
Message:

fix constant types, remove unnecessary string copying, work on regression testing, fix several memory leaks

Location:
src/SynTree
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/BasicType.cc

    rcd623a4 r5f2f2d7  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jun  6 11:52:43 2015
    13 // Update Count     : 2
     12// Last Modified On : Sun Jun  7 08:44:36 2015
     13// Update Count     : 5
    1414//
    1515
  • src/SynTree/Constant.cc

    rcd623a4 r5f2f2d7  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jun  6 12:17:22 2015
    13 // Update Count     : 2
     12// Last Modified On : Sun Jun  7 08:45:30 2015
     13// Update Count     : 5
    1414//
    1515
     
    2929        os << value;
    3030        if ( type ) {
    31                 os << " (type: ";
     31                os << " ";
    3232                type->print( os );
    33                 os << ")";
    3433        } // if
    3534}
  • src/SynTree/DeclStmt.cc

    rcd623a4 r5f2f2d7  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 18 08:16:03 2015
    13 // Update Count     : 2
     12// Last Modified On : Mon Jun  8 17:24:38 2015
     13// Update Count     : 3
    1414//
    1515
     
    2929
    3030void DeclStmt::print( std::ostream &os, int indent ) {
     31        assert( decl != 0 );
    3132        os << "Declaration of ";
    32         if ( decl ) {
    33                 decl->print( os, indent );
    34         } // if
     33        decl->print( os, indent );
    3534}
    3635
  • src/SynTree/Declaration.h

    rcd623a4 r5f2f2d7  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Mon May 25 14:08:10 2015
    13 // Update Count     : 6
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sun Jun  7 22:03:43 2015
     13// Update Count     : 7
    1414//
    1515
     
    3838        virtual ~Declaration();
    3939
    40         std::string get_name() const { return name; }
     40        const std::string &get_name() const { return name; }
    4141        void set_name( std::string newValue ) { name = newValue; }
    4242        StorageClass get_storageClass() const { return storageClass; }
  • src/SynTree/Expression.cc

    rcd623a4 r5f2f2d7  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jun  6 23:43:22 2015
    13 // Update Count     : 15
     12// Last Modified On : Sun Jun  7 08:40:46 2015
     13// Update Count     : 16
    1414//
    1515
     
    7272
    7373void ConstantExpr::print( std::ostream &os, int indent ) const {
    74         os << "constant expression: " ;
     74        os << "constant expression " ;
    7575        constant.print( os );
    7676        Expression::print( os, indent );
  • src/SynTree/Expression.h

    rcd623a4 r5f2f2d7  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 18 08:46:15 2015
    13 // Update Count     : 3
     12// Last Modified On : Sun Jun  7 22:03:44 2015
     13// Update Count     : 4
    1414//
    1515
     
    125125        virtual ~NameExpr();
    126126
    127         std::string get_name() const { return name; }
     127        const std::string &get_name() const { return name; }
    128128        void set_name( std::string newValue ) { name = newValue; }
    129129
  • src/SynTree/FunctionDecl.cc

    rcd623a4 r5f2f2d7  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu May 21 21:31:16 2015
    13 // Update Count     : 11
     12// Last Modified On : Sun Jun  7 08:36:44 2015
     13// Update Count     : 12
    1414//
    1515
     
    5252       
    5353        if ( get_name() != "" ) {
    54                 os << get_name() << ": a ";
     54                os << get_name() << ": ";
    5555        } // if
    5656        if ( get_linkage() != LinkageSpec::Cforall ) {
     
    9191       
    9292        if ( get_name() != "" ) {
    93                 os << get_name() << ": a ";
     93                os << get_name() << ": ";
    9494        } // if
    9595        if ( isInline ) {
  • src/SynTree/NamedTypeDecl.cc

    rcd623a4 r5f2f2d7  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 18 10:13:19 2015
    13 // Update Count     : 1
     12// Last Modified On : Sun Jun  7 08:36:09 2015
     13// Update Count     : 2
    1414//
    1515
     
    3737       
    3838        if ( get_name() != "" ) {
    39                 os << get_name() << ": a ";
     39                os << get_name() << ": ";
    4040        } // if
    4141        if ( get_storageClass() != NoStorageClass ) {
     
    6161       
    6262        if ( get_name() != "" ) {
    63                 os << get_name() << ": a ";
     63                os << get_name() << ": ";
    6464        } // if
    6565        if ( get_storageClass() != NoStorageClass ) {
  • src/SynTree/ReferenceToType.cc

    rcd623a4 r5f2f2d7  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue May 19 16:52:40 2015
    13 // Update Count     : 3
     12// Last Modified On : Sun Jun  7 08:31:48 2015
     13// Update Count     : 4
    1414//
    1515
     
    101101       
    102102        Type::print( os, indent );
    103         os << "instance of " << typeString() << " " << get_name() << " (" << ( isFtype ? "" : "not" ) << " a function type) ";
     103        os << "instance of " << typeString() << " " << get_name() << " (" << ( isFtype ? "" : "not" ) << " function type) ";
    104104        if ( ! parameters.empty() ) {
    105105                os << endl << std::string( indent, ' ' ) << "with parameters" << endl;
  • src/SynTree/Type.h

    rcd623a4 r5f2f2d7  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jun  6 14:12:14 2015
    13 // Update Count     : 2
     12// Last Modified On : Sun Jun  7 21:50:38 2015
     13// Update Count     : 12
    1414//
    1515
     
    214214        virtual ~ReferenceToType();
    215215
    216         std::string get_name() const { return name; }
     216        const std::string &get_name() const { return name; }
    217217        void set_name( std::string newValue ) { name = newValue; }
    218218        std::list< Expression* >& get_parameters() { return parameters; }
     
    372372        virtual ~AttrType();
    373373
    374         std::string get_name() const { return name; }
     374        const std::string &get_name() const { return name; }
    375375        void set_name( const std::string &newValue ) { name = newValue; }
    376376        Expression *get_expr() const { return expr; }
Note: See TracChangeset for help on using the changeset viewer.