source: icGREP/icgrep-devel/icgrep/pablo/pe_call.h @ 4713

Last change on this file since 4713 was 4681, checked in by nmedfort, 4 years ago

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

File size: 1012 bytes
Line 
1#ifndef PE_CALL_H
2#define PE_CALL_H
3
4#include <pablo/pabloAST.h>
5#include <pablo/function.h>
6
7namespace pablo {
8
9class Call : public Statement {
10    friend class PabloBlock;
11public:
12    static inline bool classof(const PabloAST * e) {
13        return e->getClassTypeId() == ClassTypeId::Call;
14    }
15    static inline bool classof(const void *) {
16        return false;
17    }
18    virtual ~Call() { }
19
20    inline const Prototype * getPrototype() const {
21        return cast<Prototype>(getOperand(0));
22    }
23    inline const String * getCallee() const {
24        return getPrototype()->getName();
25    }
26    inline void setLocalCarryIndex(const unsigned idx) {
27        mLocalCarryIndex = idx;
28    }
29    inline unsigned getLocalCarryIndex() const {
30        return mLocalCarryIndex;
31    }
32protected:
33    Call(PabloAST * prototype)
34    : Statement(ClassTypeId::Call, {prototype}, cast<Prototype>(prototype)->getName())
35    , mLocalCarryIndex(0) {
36
37    }
38private:
39    unsigned mLocalCarryIndex;
40};
41}
42
43#endif // PE_CALL_H
44
45
Note: See TracBrowser for help on using the repository browser.