Ignore:
Timestamp:
Jul 16, 2015, 3:46:58 PM (4 years ago)
Author:
nmedfort
Message:

First attempt to add arguments to Call objects. Currently non-functioning in Pablo_Compiler.

File:
1 edited

Legend:

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

    r4680 r4681  
    7272}
    7373
    74 Call * PabloBlock::createCall(PabloAST * prototype) {
     74Call * PabloBlock::createCall(PabloAST * prototype, const std::vector<PabloAST *> & args) {
    7575    assert (prototype);
     76    if (prototype == nullptr) {
     77        throw std::runtime_error("Call object cannot be created with a Null prototype!");
     78    }
     79    if (args.size() != cast<Prototype>(prototype)->getNumOfParameters()) {
     80        throw std::runtime_error("Invalid number of arguments passed into Call object!");
     81    }
    7682    return insertAtInsertionPoint(new Call(prototype));
    7783}
Note: See TracChangeset for help on using the changeset viewer.