mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Added assertions.
This commit is contained in:
parent
d8ddbeed2b
commit
5d2c36603f
@ -36,6 +36,7 @@ StructuralGasEstimator::ASTGasConsumptionSelfAccumulated StructuralGasEstimator:
|
|||||||
vector<ASTNode const*> const& _ast
|
vector<ASTNode const*> const& _ast
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
solAssert(std::count(_ast.begin(), _ast.end(), nullptr) == 0, "");
|
||||||
map<SourceLocation, GasMeter::GasConsumption> particularCosts;
|
map<SourceLocation, GasMeter::GasConsumption> particularCosts;
|
||||||
GasMeter meter;
|
GasMeter meter;
|
||||||
|
|
||||||
@ -64,6 +65,7 @@ map<ASTNode const*, GasMeter::GasConsumption> StructuralGasEstimator::breakToSta
|
|||||||
vector<ASTNode const*> const& _roots
|
vector<ASTNode const*> const& _roots
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
solAssert(std::count(_roots.begin(), _roots.end(), nullptr) == 0, "");
|
||||||
// first pass: statementDepth[node] is the distance from the deepend statement to node
|
// first pass: statementDepth[node] is the distance from the deepend statement to node
|
||||||
// in direction of the tree root (or undefined if not possible)
|
// in direction of the tree root (or undefined if not possible)
|
||||||
map<ASTNode const*, int> statementDepth;
|
map<ASTNode const*, int> statementDepth;
|
||||||
|
Loading…
Reference in New Issue
Block a user