2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2014 - Scilab Enterprises - Calixte DENIZET
5 * This file must be used under the terms of the CeCILL.
6 * This source file is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at
9 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
20 #include "gvn/GVN.hxx"
21 #include "gvn/SymbolicRange.hxx"
22 #include "ConstantValue.hxx"
36 INFO_TRUE, INFO_FALSE, INFO_UNKNOWN
49 ConstantValue constant;
51 SymbolicDimension maxIndex;
53 Info(Data * _data = nullptr) : R(false), W(false), O(false), isint(false), local(Local::INFO_TRUE), cleared(false), exists(true), data(_data), exp(nullptr) { }
54 Info(const Info & i) : R(i.R), W(i.W), O(i.O), isint(i.isint), local(i.local), cleared(i.cleared), exists(i.exists), constant(i.constant), range(i.range), maxIndex(i.maxIndex), type(i.type), data(i.data ? new Data(*i.data) : nullptr), exp(i.exp) { }
56 void merge(const Info & info, bool & isSameData);
57 void addData(const bool known, const symbol::Symbol & sym);
58 void addData(Data * _data, const symbol::Symbol & sym);
59 SymbolicRange & getRange();
60 const SymbolicRange & getRange() const;
61 SymbolicDimension & getMaxIndex();
62 const SymbolicDimension & getMaxIndex() const;
63 SymbolicRange & setRange(SymbolicRange & _range);
64 ConstantValue & getConstant();
65 const ConstantValue & getConstant() const;
66 ConstantValue & setConstant(ConstantValue & val);
68 static const symbol::Symbol & getRightSym(ast::Exp * exp);
69 const TIType & getType() const;
70 friend std::wostream & operator<<(std::wostream & out, const Info & info);
73 } // namespace analysis
75 #endif // __INFO_HXX__