Ignore:
Timestamp:
Sep 13, 2017, 3:03:32 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
ed235b6
Parents:
b2e2e34 (diff), 982832e (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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/AlternativeFinder.cc

    rb2e2e34 rc935c3a  
    1515
    1616#include <algorithm>               // for copy
    17 #include <cassert>                 // for safe_dynamic_cast, assert, assertf
     17#include <cassert>                 // for strict_dynamic_cast, assert, assertf
    1818#include <iostream>                // for operator<<, cerr, ostream, endl
    1919#include <iterator>                // for back_insert_iterator, back_inserter
     
    336336
    337337        Cost computeApplicationConversionCost( Alternative &alt, const SymTab::Indexer &indexer ) {
    338                 ApplicationExpr *appExpr = safe_dynamic_cast< ApplicationExpr* >( alt.expr );
    339                 PointerType *pointer = safe_dynamic_cast< PointerType* >( appExpr->get_function()->get_result() );
    340                 FunctionType *function = safe_dynamic_cast< FunctionType* >( pointer->get_base() );
     338                ApplicationExpr *appExpr = strict_dynamic_cast< ApplicationExpr* >( alt.expr );
     339                PointerType *pointer = strict_dynamic_cast< PointerType* >( appExpr->get_function()->get_result() );
     340                FunctionType *function = strict_dynamic_cast< FunctionType* >( pointer->get_base() );
    341341
    342342                Cost convCost = Cost::zero;
     
    494494                        Cost cost = Cost::zero;
    495495                        std::list< Expression * > newExprs;
    496                         ObjectDecl * obj = safe_dynamic_cast< ObjectDecl * >( formal );
     496                        ObjectDecl * obj = strict_dynamic_cast< ObjectDecl * >( formal );
    497497                        if ( ! instantiateArgument( obj->get_type(), obj->get_init(), actualExpr, actualEnd, openVars, resultEnv, resultNeed, resultHave, indexer, cost, back_inserter( newExprs ) ) ) {
    498498                                deleteAll( newExprs );
     
    787787
    788788                        PRINT(
    789                                 ApplicationExpr *appExpr = safe_dynamic_cast< ApplicationExpr* >( withFunc->expr );
    790                                 PointerType *pointer = safe_dynamic_cast< PointerType* >( appExpr->get_function()->get_result() );
    791                                 FunctionType *function = safe_dynamic_cast< FunctionType* >( pointer->get_base() );
     789                                ApplicationExpr *appExpr = strict_dynamic_cast< ApplicationExpr* >( withFunc->expr );
     790                                PointerType *pointer = strict_dynamic_cast< PointerType* >( appExpr->get_function()->get_result() );
     791                                FunctionType *function = strict_dynamic_cast< FunctionType* >( pointer->get_base() );
    792792                                std::cerr << "Case +++++++++++++ " << appExpr->get_function() << std::endl;
    793793                                std::cerr << "formals are:" << std::endl;
Note: See TracChangeset for help on using the changeset viewer.