mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
WIP
This commit is contained in:
parent
f92f2ed78a
commit
00def2f4fa
@ -168,10 +168,18 @@ string ProtoConverter::visit(Expression const& _expr)
|
||||
switch (_expr.expr_oneof_case())
|
||||
{
|
||||
case Expression::kV:
|
||||
{
|
||||
solAssert(varAvailable(), "Sol arith fuzzer: Varref unavaileble");
|
||||
return visit(_expr.v());
|
||||
string v = visit(_expr.v());
|
||||
if (!m_exprSignMap.count(&_expr))
|
||||
m_exprSignMap.emplace(&_expr, m_varTypeMap[v].first);
|
||||
}
|
||||
case Expression::kBop:
|
||||
return visit(_expr.bop());
|
||||
{
|
||||
string b = visit(_expr.bop());
|
||||
if (!m_exprSignMap.count(&_expr))
|
||||
m_exprSignMap.emplace(&_expr, m_varTypeMap[v].first);
|
||||
}
|
||||
case Expression::EXPR_ONEOF_NOT_SET:
|
||||
return "v0";
|
||||
}
|
||||
|
@ -108,7 +108,8 @@ private:
|
||||
|
||||
unsigned m_varCounter = 0;
|
||||
std::shared_ptr<SolRandomNumGenerator> m_rand;
|
||||
std::map<std::string, std::string> m_varTypeMap;
|
||||
std::map<std::string, std::pair<Sign, std::string>> m_varTypeMap;
|
||||
std::map<Expression const*, Sign> m_exprSignMap;
|
||||
std::string m_returnType;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user