Changeset b6838214 for src/Common


Ignore:
Timestamp:
Jan 23, 2018, 5:46:43 PM (8 years ago)
Author:
Alan Kennedy <afakenne@…>
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:
258e6ad5
Parents:
b158d8f (diff), 15d248e (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:

add context switch for ARM

Location:
src/Common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/Common/PassVisitor.h

    rb158d8f rb6838214  
    1919#include "SynTree/Expression.h"
    2020#include "SynTree/Constant.h"
    21 #include "SynTree/TypeSubstitution.h"
     21
     22class TypeSubstitution;
    2223
    2324#include "PassVisitor.proto.h"
     
    118119        virtual void visit( StmtExpr *  stmtExpr ) override final;
    119120        virtual void visit( UniqueExpr *  uniqueExpr ) override final;
     121        virtual void visit( UntypedInitExpr *  initExpr ) override final;
     122        virtual void visit( InitExpr *  initExpr ) override final;
    120123
    121124        virtual void visit( VoidType * basicType ) override final;
     
    210213        virtual Expression * mutate( StmtExpr *  stmtExpr ) override final;
    211214        virtual Expression * mutate( UniqueExpr *  uniqueExpr ) override final;
     215        virtual Expression * mutate( UntypedInitExpr *  initExpr ) override final;
     216        virtual Expression * mutate( InitExpr *  initExpr ) override final;
    212217
    213218        virtual Type * mutate( VoidType * basicType ) override final;
     
    403408};
    404409
     410#include "SynTree/TypeSubstitution.h"
    405411#include "PassVisitor.impl.h"
  • src/Common/PassVisitor.impl.h

    rb158d8f rb6838214  
    6262
    6363template< typename pass_type >
    64 static inline void acceptAll( std::list< Declaration* > &decls, PassVisitor< pass_type >& visitor ) {
     64inline void acceptAll( std::list< Declaration* > &decls, PassVisitor< pass_type >& visitor ) {
    6565        DeclList_t* beforeDecls = visitor.get_beforeDecls();
    6666        DeclList_t* afterDecls  = visitor.get_afterDecls();
     
    9090
    9191template< typename pass_type >
    92 static inline void mutateAll( std::list< Declaration* > &decls, PassVisitor< pass_type >& mutator ) {
     92inline void mutateAll( std::list< Declaration* > &decls, PassVisitor< pass_type >& mutator ) {
    9393        DeclList_t* beforeDecls = mutator.get_beforeDecls();
    9494        DeclList_t* afterDecls  = mutator.get_afterDecls();
     
    18531853}
    18541854
     1855//--------------------------------------------------------------------------
     1856// UntypedInitExpr
     1857template< typename pass_type >
     1858void PassVisitor< pass_type >::visit( UntypedInitExpr * node ) {
     1859        VISIT_START( node );
     1860
     1861        indexerScopedAccept( node->result, *this );
     1862        maybeAccept_impl   ( node->expr  , *this );
     1863        // not currently visiting initAlts, but this doesn't matter since this node is only used in the resolver.
     1864
     1865        VISIT_END( node );
     1866}
     1867
     1868template< typename pass_type >
     1869Expression * PassVisitor< pass_type >::mutate( UntypedInitExpr * node ) {
     1870        MUTATE_START( node );
     1871
     1872        indexerScopedMutate( node->env   , *this );
     1873        indexerScopedMutate( node->result, *this );
     1874        maybeMutate_impl   ( node->expr  , *this );
     1875        // not currently visiting initAlts, but this doesn't matter since this node is only used in the resolver.
     1876
     1877        MUTATE_END( Expression, node );
     1878}
     1879
     1880//--------------------------------------------------------------------------
     1881// InitExpr
     1882template< typename pass_type >
     1883void PassVisitor< pass_type >::visit( InitExpr * node ) {
     1884        VISIT_START( node );
     1885
     1886        indexerScopedAccept( node->result, *this );
     1887        maybeAccept_impl   ( node->expr  , *this );
     1888        maybeAccept_impl   ( node->designation, *this );
     1889
     1890        VISIT_END( node );
     1891}
     1892
     1893template< typename pass_type >
     1894Expression * PassVisitor< pass_type >::mutate( InitExpr * node ) {
     1895        MUTATE_START( node );
     1896
     1897        indexerScopedMutate( node->env   , *this );
     1898        indexerScopedMutate( node->result, *this );
     1899        maybeMutate_impl   ( node->expr  , *this );
     1900        maybeMutate_impl   ( node->designation, *this );
     1901
     1902        MUTATE_END( Expression, node );
     1903}
     1904
    18551905template< typename pass_type >
    18561906void PassVisitor< pass_type >::visit( VoidType * node ) {
Note: See TracChangeset for help on using the changeset viewer.