Ignore:
Timestamp:
Jul 21, 2017, 3:57:11 PM (7 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:
9191a8e
Parents:
53a8e68
Message:

Refactor operator predicates into OperatorTable?.cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Autogen.cc

    r53a8e68 rbff227f  
    2121#include "SynTree/TypeSubstitution.h"
    2222#include "Common/utility.h"
     23#include "CodeGen/OperatorTable.h"
    2324#include "AddVisit.h"
    2425#include "MakeLibCfa.h"
     
    223224                        FunctionType * ftype = data.genType( refType );
    224225
    225                         if(concurrent_type && InitTweak::isDestructor( data.fname )) {
     226                        if(concurrent_type && CodeGen::isDestructor( data.fname )) {
    226227                                ftype->get_parameters().front()->get_type()->set_mutex( true );
    227228                        }
     
    407408
    408409                // field ctors are only generated if default constructor and copy constructor are both generated
    409                 unsigned numCtors = std::count_if( newFuncs.begin(), newFuncs.end(), [](FunctionDecl * dcl) { return InitTweak::isConstructor( dcl->get_name() ); } );
     410                unsigned numCtors = std::count_if( newFuncs.begin(), newFuncs.end(), [](FunctionDecl * dcl) { return CodeGen::isConstructor( dcl->get_name() ); } );
    410411
    411412                if ( functionNesting == 0 ) {
     
    422423                        // generate appropriate calls to member ctor, assignment
    423424                        // destructor needs to do everything in reverse, so pass "forward" based on whether the function is a destructor
    424                         if ( ! InitTweak::isDestructor( dcl->get_name() ) ) {
     425                        if ( ! CodeGen::isDestructor( dcl->get_name() ) ) {
    425426                                makeStructFunctionBody( aggregateDecl->get_members().begin(), aggregateDecl->get_members().end(), dcl, isDynamicLayout );
    426427                        } else {
    427428                                makeStructFunctionBody( aggregateDecl->get_members().rbegin(), aggregateDecl->get_members().rend(), dcl, isDynamicLayout, false );
    428429                        }
    429                         if ( InitTweak::isAssignment( dcl->get_name() ) ) {
     430                        if ( CodeGen::isAssignment( dcl->get_name() ) ) {
    430431                                // assignment needs to return a value
    431432                                FunctionType * assignType = dcl->get_functionType();
     
    486487
    487488                makeUnionFieldsAssignment( srcParam, dstParam, back_inserter( funcDecl->get_statements()->get_kids() ) );
    488                 if ( InitTweak::isAssignment( funcDecl->get_name() ) ) {
     489                if ( CodeGen::isAssignment( funcDecl->get_name() ) ) {
    489490                        // also generate return statement in assignment
    490491                        funcDecl->get_statements()->get_kids().push_back( new ReturnStmt( noLabels, new VariableExpr( srcParam ) ) );
Note: See TracChangeset for help on using the changeset viewer.