source: icGREP/icgrep-devel/icgrep/pablo/ps_assign.h @ 4568

Last change on this file since 4568 was 4433, checked in by nmedfort, 5 years ago

Possible fix for segfault issue. CC seems to be generating the same charclass multiple times.

File size: 1.2 KB
RevLine 
[3850]1/*
2 *  Copyright (c) 2014 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 */
6
7#ifndef PS_SETMARKER_H
8#define PS_SETMARKER_H
9
[4213]10#include <pablo/pe_string.h>
[3850]11
[4199]12namespace pablo {
13
[4276]14class Assign : public Statement {
[4227]15    friend class PabloBlock;
[4252]16    friend class Next;
[4404]17    friend class Var;
[3850]18public:
[4244]19    static inline bool classof(const PabloAST * e) {
[4200]20        return e->getClassTypeId() == ClassTypeId::Assign;
[4199]21    }
[4200]22    static inline bool classof(const void *) {
23        return false;
24    }
[4199]25    virtual ~Assign() {
26    }
[4244]27    inline PabloAST * getExpr() const {
[4432]28        return getOperand(0);
[4199]29    }
[4268]30    inline bool isOutputAssignment() const {
31        return mOutputIndex >= 0;
[4266]32    }
[4268]33    inline int getOutputIndex() const {
34        return mOutputIndex;
35    }
[4433]36    bool superfluous() const;
[4200]37protected:
[4410]38    explicit Assign(PabloAST * expr, int outputIndex, String * name, PabloBlock * parent)
[4414]39    : Statement(ClassTypeId::Assign, {expr}, name, parent)
[4268]40    , mOutputIndex(outputIndex)
[4200]41    {
[4414]42
[4200]43    }
[3850]44private:
[4410]45    const int           mOutputIndex;
[3850]46};
47
[4199]48}
49
[3850]50#endif // PS_SETMARKER_H
51
Note: See TracBrowser for help on using the repository browser.