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

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

Implemented slab allocator based on the original Parabix StringPool?; intergrated it with RE and Pablo AST nodes.

File size: 793 bytes
Line 
1#ifndef PE_CALL_H
2#define PE_CALL_H
3
4#include <pablo/pabloAST.h>
5#include <pablo/pe_string.h>
6#include <iostream>
7
8namespace pablo {
9
10class Call : public PabloAST {
11    friend class PabloBlock;
12public:
13    static inline bool classof(const PabloAST * e) {
14        return e->getClassTypeId() == ClassTypeId::Call;
15    }
16    static inline bool classof(const void *) {
17        return false;
18    }
19    virtual ~Call() {
20    }
21    inline const String * getCallee() const {
22        return mCallee;
23    }
24protected:
25    void* operator new (std::size_t size) noexcept {
26        return mAllocator.allocate(size);
27    }
28    Call(const PabloAST * callee)
29    : PabloAST(ClassTypeId::Call)
30    , mCallee(cast<String>(callee)) {
31
32    }
33private:
34    const String * const mCallee;
35};
36}
37
38#endif // PE_CALL_H
39
40
Note: See TracBrowser for help on using the repository browser.