Changeset 9d264e1 for src


Ignore:
Timestamp:
Nov 12, 2020, 1:29:43 PM (15 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
b5344a3
Parents:
d6ad99e (diff), 8ca26d5 (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' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Convert.cpp

    rd6ad99e r9d264e1  
    99// Author           : Thierry Delisle
    1010// Created On       : Thu May 09 15::37::05 2019
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Dec 11 21:39:32 2019
    13 // Update Count     : 33
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Thr Nov 12 10:07:00 2020
     13// Update Count     : 34
    1414//
    1515
     
    187187                auto init = get<Initializer>().accept1( node->init );
    188188                decl->init = init;
    189                
     189
    190190                this->node = decl;
    191191                return nullptr;
     
    28122812        }
    28132813        deleteAll(translationUnit);
     2814
     2815        // Load the local static varables into the global store.
     2816        unit.global.sizeType = ast::sizeType;
     2817        unit.global.dereference = ast::dereferenceOperator;
     2818        unit.global.dtorStruct = ast::dtorStruct;
     2819        unit.global.dtorDestroy = ast::dtorStructDestroy;
     2820
    28142821        return unit;
    28152822}
  • src/AST/Pass.impl.hpp

    rd6ad99e r9d264e1  
    423423                }
    424424                catch( SemanticErrorException &e ) {
    425                         if (__pass::onError (visitor.core, *i, 0))
     425                        if (__pass::on_error (visitor.core, *i, 0))
    426426                                errors.append( e );
    427427                }
  • src/AST/Pass.proto.hpp

    rd6ad99e r9d264e1  
    270270
    271271        template< typename core_t >
    272         static bool onError (core_t &, ptr<Decl> &, long) { return true; }
    273 
    274         template< typename core_t >
    275         static auto onError (core_t & core, ptr<Decl> & decl, int) -> decltype(core.onError(decl)) {
    276                 return core.onError(decl);
     272        static bool on_error (core_t &, ptr<Decl> &, long) { return true; }
     273
     274        template< typename core_t >
     275        static auto on_error (core_t & core, ptr<Decl> & decl, int) -> decltype(core.on_error(decl)) {
     276                return core.on_error(decl);
    277277        }
    278278
  • src/InitTweak/GenInit.cc

    rd6ad99e r9d264e1  
    202202                        }
    203203                        // don't need to hoist dimension if it's definitely pure - only need to if there's potential for side effects.
    204                         // xxx - hoisting has no side effects anyways, so don't skip since we delay resolve     
    205                         // only skip in the most trivial case, which does not require resolve
    206                         if (dynamic_cast<ConstantExpr *>(arrayType->dimension)) return;
    207                         // if ( ! Tuples::maybeImpure( arrayType->dimension ) ) return;
     204                        // xxx - hoisting has no side effects anyways, so don't skip since we delay resolve
     205                        // still try to detect constant expressions
     206                        if ( ! Tuples::maybeImpure( arrayType->dimension ) ) return;
    208207
    209208                        ObjectDecl * arrayDimension = new ObjectDecl( dimensionName.newName(), storageClasses, LinkageSpec::C, 0, Validate::SizeType->clone(), new SingleInit( arrayType->get_dimension() ) );
  • src/ResolvExpr/Resolver.cc

    rd6ad99e r9d264e1  
    12891289                void beginScope() { managedTypes.beginScope(); }
    12901290                void endScope() { managedTypes.endScope(); }
    1291                 bool onError(ast::ptr<ast::Decl> & decl);
     1291                bool on_error(ast::ptr<ast::Decl> & decl);
    12921292        };
    12931293        // size_t Resolver_new::traceId = Stats::Heap::new_stacktrace_id("Resolver");
     
    20682068
    20692069        // suppress error on autogen functions and mark invalid autogen as deleted.
    2070         bool Resolver_new::onError(ast::ptr<ast::Decl> & decl) {
     2070        bool Resolver_new::on_error(ast::ptr<ast::Decl> & decl) {
    20712071                if (auto functionDecl = decl.as<ast::FunctionDecl>()) {
    20722072                        // xxx - can intrinsic gen ever fail?
  • src/main.cc

    rd6ad99e r9d264e1  
    341341
    342342                if( useNewAST) {
     343                        if (Stats::Counters::enabled) {
     344                                ast::pass_visitor_stats.avg = Stats::Counters::build<Stats::Counters::AverageCounter<double>>("Average Depth - New");
     345                                ast::pass_visitor_stats.max = Stats::Counters::build<Stats::Counters::MaxCounter<double>>("Max depth - New");
     346                        }
    343347                        auto transUnit = convert( move( translationUnit ) );
    344348                        PASS( "Resolve", ResolvExpr::resolve( transUnit ) );
Note: See TracChangeset for help on using the changeset viewer.