Ignore:
Timestamp:
Jul 16, 2015, 1:51:51 PM (4 years ago)
Author:
nmedfort
Message:

Added pablo Prototype to compiler. All Calls must be given one instead of a Name.

File:
1 edited

Legend:

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

    r4650 r4680  
    33
    44#include <pablo/pabloAST.h>
    5 #include <pablo/pe_string.h>
     5#include <pablo/function.h>
    66
    77namespace pablo {
     
    1616        return false;
    1717    }
    18     virtual ~Call() {
     18    virtual ~Call() { }
     19    inline const String * getCallee() const {
     20        return cast<Prototype>(getOperand(0))->getName();
    1921    }
    20     inline const String * getCallee() const {
    21         return cast<String>(getOperand(0));
     22    inline void setLocalCarryIndex(const unsigned idx) {
     23        mLocalCarryIndex = idx;
     24    }
     25    inline unsigned getLocalCarryIndex() const {
     26        return mLocalCarryIndex;
    2227    }
    2328protected:
    24     Call(PabloAST * callee)
    25     : Statement(ClassTypeId::Call, {callee}, cast<String>(callee)) {
     29    Call(PabloAST * prototype)
     30    : Statement(ClassTypeId::Call, {prototype}, cast<Prototype>(prototype)->getName())
     31    , mLocalCarryIndex(0) {
    2632
    2733    }
     34private:
     35    unsigned mLocalCarryIndex;
    2836};
    2937}
Note: See TracChangeset for help on using the changeset viewer.