Ignore:
Timestamp:
Jan 7, 2021, 3:27:00 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
2b4daf2, 64aeca0
Parents:
3c64c668 (diff), eef8dfb (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 park_unpark

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/InitTweak.h

    r3c64c668 r58fe85a  
    3838        /// returns the first parameter of a constructor/destructor/assignment function
    3939        ObjectDecl * getParamThis( FunctionType * ftype );
     40        const ast::ObjectDecl * getParamThis(const ast::FunctionDecl * func);
    4041
    4142        /// generate a bitwise assignment operation.
    4243        ApplicationExpr * createBitwiseAssignment( Expression * dst, Expression * src );
     44
     45        ast::Expr * createBitwiseAssignment( const ast::Expr * dst, const ast::Expr * src);
    4346
    4447        /// transform Initializer into an argument list that can be passed to a call expression
     
    4851        /// True if the resolver should try to construct dwt
    4952        bool tryConstruct( DeclarationWithType * dwt );
     53        bool tryConstruct( const ast::DeclWithType * dwt );
    5054
    5155        /// True if the type can have a user-defined constructor
    5256        bool isConstructable( Type * t );
     57        bool isConstructable( const ast::Type * t );
    5358
    5459        /// True if the Initializer contains designations
    5560        bool isDesignated( Initializer * init );
     61        bool isDesignated( const ast::Init * init );
    5662
    5763        /// True if the ObjectDecl's Initializer nesting level is not deeper than the depth of its
    5864        /// type, where the depth of its type is the number of nested ArrayTypes + 1
    5965        bool checkInitDepth( ObjectDecl * objDecl );
     66        bool checkInitDepth( const ast::ObjectDecl * objDecl );
    6067
    6168        /// returns the declaration of the function called by the expr (must be ApplicationExpr or UntypedExpr)
     
    7986        /// get all Ctor/Dtor call expressions from a Statement
    8087        void collectCtorDtorCalls( Statement * stmt, std::list< Expression * > & matches );
    81         std::vector< ast::ptr< ast::Expr > > collectCtorDtorCalls( const ast::Stmt * stmt );
     88        std::vector< const ast::Expr * > collectCtorDtorCalls( const ast::Stmt * stmt );
    8289
    8390        /// get the Ctor/Dtor call expression from a Statement that looks like a generated ctor/dtor call
     
    102109        bool isConstExpr( Expression * expr );
    103110        bool isConstExpr( Initializer * init );
     111
     112        bool isConstExpr( const ast::Expr * expr );
     113        bool isConstExpr( const ast::Init * init );
     114
     115        /// Modifies objDecl to have:
     116        ///    __attribute__((section (".data#")))
     117        /// which makes gcc put the declared variable in the data section,
     118        /// which is helpful for global constants on newer gcc versions,
     119        /// so that CFA's generated initialization won't segfault when writing it via a const cast.
     120        /// The trailing # is an injected assembly comment, to suppress the "a" in
     121        ///    .section .data,"a"
     122        ///    .section .data#,"a"
     123        /// to avoid assembler warning "ignoring changed section attributes for .data"
     124        void addDataSectonAttribute( ObjectDecl * objDecl );
     125
     126        void addDataSectionAttribute( ast::ObjectDecl * objDecl );
    104127
    105128        class InitExpander_old {
Note: See TracChangeset for help on using the changeset viewer.