Changeset 66f8528 for src/SynTree


Ignore:
Timestamp:
Dec 15, 2016, 5:16:42 PM (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:
43385ca, f7ff3fb
Parents:
5802a4f (diff), 596f987b (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 'master' into tuples

Conflicts:

src/ResolvExpr/CommonType.cc
src/tests/.expect/32/extension.txt
src/tests/.expect/32/gccExtensions.txt
src/tests/.expect/64/declarationSpecifier.txt
src/tests/.expect/64/extension.txt
src/tests/.expect/64/gccExtensions.txt
src/tests/.expect/castError.txt
src/tests/Makefile.am

Location:
src/SynTree
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Declaration.h

    r5802a4f r66f8528  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Aug 18 23:50:24 2016
    13 // Update Count     : 40
     12// Last Modified On : Tue Dec 13 13:37:33 2016
     13// Update Count     : 49
    1414//
    1515
     
    6969
    7070        std::string get_mangleName() const { return mangleName; }
    71         void set_mangleName( std::string newValue ) { mangleName = newValue; }
     71        DeclarationWithType * set_mangleName( std::string newValue ) { mangleName = newValue; return this; }
    7272
    7373        std::string get_scopedMangleName() const { return mangleName + "_" + std::to_string(scopeLevel); }
    7474
    7575        int get_scopeLevel() const { return scopeLevel; }
    76         void set_scopeLevel( int newValue ) { scopeLevel = newValue; }
     76        DeclarationWithType * set_scopeLevel( int newValue ) { scopeLevel = newValue; return this; }
     77
     78        ConstantExpr *get_asmName() const { return asmName; }
     79        DeclarationWithType * set_asmName( ConstantExpr *newValue ) { asmName = newValue; return this; }
    7780
    7881        std::list< Attribute * >& get_attributes() { return attributes; }
     
    8790        // this represents the type with all types and typedefs expanded it is generated by SymTab::Validate::Pass2
    8891        std::string mangleName;
    89         // need to remember the scope level at which the variable was declared, so that
    90         // shadowed identifiers can be accessed
     92        // need to remember the scope level at which the variable was declared, so that shadowed identifiers can be accessed
    9193        int scopeLevel = 0;
    9294
     95        ConstantExpr *asmName;
    9396        std::list< Attribute * > attributes;
    9497};
     
    106109        Initializer *get_init() const { return init; }
    107110        void set_init( Initializer *newValue ) { init = newValue; }
     111
    108112        Expression *get_bitfieldWidth() const { return bitfieldWidth; }
    109113        void set_bitfieldWidth( Expression *newValue ) { bitfieldWidth = newValue; }
  • src/SynTree/DeclarationWithType.cc

    r5802a4f r66f8528  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Aug 18 23:50:41 2016
    13 // Update Count     : 4
     12// Last Modified On : Tue Dec 13 14:49:43 2016
     13// Update Count     : 7
    1414//
    1515
     
    2020
    2121DeclarationWithType::DeclarationWithType( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage, const std::list< Attribute * > & attributes )
    22                 : Declaration( name, sc, linkage ), attributes( attributes ) {
     22        : Declaration( name, sc, linkage ), asmName( nullptr ), attributes( attributes ) {
    2323}
    2424
     
    2626                : Declaration( other ), mangleName( other.mangleName ), scopeLevel( other.scopeLevel ) {
    2727        cloneAll( other.attributes, attributes );
     28        asmName = maybeClone( other.asmName );
    2829}
    2930
    3031DeclarationWithType::~DeclarationWithType() {
    3132        deleteAll( attributes );
     33        delete asmName;
    3234}
    3335
  • src/SynTree/Expression.cc

    r5802a4f r66f8528  
    438438}
    439439
    440 NameExpr::NameExpr( std::string _name, Expression *_aname ) : Expression( _aname ), name(_name) {}
     440NameExpr::NameExpr( std::string _name, Expression *_aname ) : Expression( _aname ), name(_name) {
     441        assertf(_name != "0", "Zero is not a valid name\n");
     442        assertf(_name != "1", "One is not a valid name\n");
     443}
    441444
    442445NameExpr::NameExpr( const NameExpr &other ) : Expression( other ), name( other.name ) {
  • src/SynTree/Type.h

    r5802a4f r66f8528  
    8282        ForallList forall;
    8383};
     84
     85extern Type::Qualifiers emptyQualifiers;                                // no qualifiers on constants
    8486
    8587class VoidType : public Type {
Note: See TracChangeset for help on using the changeset viewer.