Ignore:
Timestamp:
Jul 23, 2015, 4:47:59 PM (4 years ago)
Author:
nmedfort
Message:

Temporary check in.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/codegenstate.h

    r4687 r4692  
    8080    }
    8181
     82    inline Call * createCall(Prototype * prototype, const std::vector<PabloAST *> & args) {
     83        if (prototype == nullptr) {
     84            throw std::runtime_error("Call object cannot be created with a Null prototype!");
     85        }
     86        if (args.size() != cast<Prototype>(prototype)->getNumOfParameters()) {
     87            throw std::runtime_error("Invalid number of arguments passed into Call object!");
     88        }
     89        return createCall(static_cast<PabloAST *>(prototype), args);
     90    }
     91
    8292    Assign * createAssign(const std::string && prefix, PabloAST * expr);
    8393
     
    168178
    169179protected:
    170 
    171180
    172181    PabloBlock(SymbolGenerator & symbolGenerator);
     
    187196        return expr;
    188197    }
     198
    189199private:
    190200
    191     Call * createCall(PabloAST * prototype, const std::vector<PabloAST *> & args);
     201    Call * createCall(PabloAST * prototype, const std::vector<PabloAST *> &);
    192202
    193203    Var * createVar(PabloAST * name);
Note: See TracChangeset for help on using the changeset viewer.