Remove FwdAnalysis::reads: It is not finished
This commit is contained in:
parent
f5a94ed300
commit
452318dfa4
|
@ -1178,11 +1178,3 @@ const Token *FwdAnalysis::reassign(const Token *expr, const Token *startToken, c
|
||||||
Result result = check(expr, startToken, endToken);
|
Result result = check(expr, startToken, endToken);
|
||||||
return result.type == FwdAnalysis::Result::Type::WRITE ? result.token : nullptr;
|
return result.type == FwdAnalysis::Result::Type::WRITE ? result.token : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<const Token *> FwdAnalysis::reads(const Token *expr, const Token *startToken, const Token *endToken)
|
|
||||||
{
|
|
||||||
mReassign = false;
|
|
||||||
mReads.clear();
|
|
||||||
check(expr, startToken, endToken);
|
|
||||||
return mReads;
|
|
||||||
}
|
|
||||||
|
|
|
@ -175,20 +175,11 @@ public:
|
||||||
*/
|
*/
|
||||||
const Token *reassign(const Token *expr, const Token *startToken, const Token *endToken);
|
const Token *reassign(const Token *expr, const Token *startToken, const Token *endToken);
|
||||||
|
|
||||||
/**
|
|
||||||
* Get tokens where "expr" is read. The "expr" can be a tree (x.y[12]).
|
|
||||||
* @param expr Symbolic expression to perform forward analysis for
|
|
||||||
* @param startToken First token in forward analysis
|
|
||||||
* @param endToken Last token in forward analysis
|
|
||||||
* @return vector of read tokens
|
|
||||||
*/
|
|
||||||
std::vector<const Token *> reads(const Token *expr, const Token *startToken, const Token *endToken);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/** Result of forward analysis */
|
/** Result of forward analysis */
|
||||||
struct Result {
|
struct Result {
|
||||||
enum class Type { NONE, READ, WRITE, BREAK, RETURN, BAILOUT } type;
|
enum class Type { NONE, READ, WRITE, BREAK, RETURN, BAILOUT } type;
|
||||||
Result(Type type) : type(type), token(nullptr) {}
|
explicit Result(Type type) : type(type), token(nullptr) {}
|
||||||
Result(Type type, const Token *token) : type(type), token(token) {}
|
Result(Type type, const Token *token) : type(type), token(token) {}
|
||||||
const Token *token;
|
const Token *token;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue