diff options
author | chriseth <c@ethdev.com> | 2017-02-16 18:45:06 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2017-02-16 18:46:27 +0800 |
commit | dcc16c81e26f31141ae766096873b5fd7741cdf5 (patch) | |
tree | 288bd63c517c42375d94d6de2f8afdf161d7bc0d /libsolidity/codegen | |
parent | ad751bd3e6f22fadc01d43610ec2e2e008c32f11 (diff) | |
download | dexon-solidity-dcc16c81e26f31141ae766096873b5fd7741cdf5.tar.gz dexon-solidity-dcc16c81e26f31141ae766096873b5fd7741cdf5.tar.zst dexon-solidity-dcc16c81e26f31141ae766096873b5fd7741cdf5.zip |
Some checks for the existence of mobile type.
Diffstat (limited to 'libsolidity/codegen')
-rw-r--r-- | libsolidity/codegen/ExpressionCompiler.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp index 2ed19a83..1c2883cd 100644 --- a/libsolidity/codegen/ExpressionCompiler.cpp +++ b/libsolidity/codegen/ExpressionCompiler.cpp @@ -220,6 +220,7 @@ bool ExpressionCompiler::visit(Assignment const& _assignment) rightIntermediateType = _assignment.rightHandSide().annotation().type->closestTemporaryType( _assignment.leftHandSide().annotation().type ); + solAssert(rightIntermediateType, ""); utils().convertType(*_assignment.rightHandSide().annotation().type, *rightIntermediateType, cleanupNeeded); _assignment.leftHandSide().accept(*this); @@ -395,6 +396,7 @@ bool ExpressionCompiler::visit(BinaryOperation const& _binaryOperation) TypePointer leftTargetType = commonType; TypePointer rightTargetType = Token::isShiftOp(c_op) ? rightExpression.annotation().type->mobileType() : commonType; + solAssert(rightTargetType, ""); // for commutative operators, push the literal as late as possible to allow improved optimization auto isLiteral = [](Expression const& _e) @@ -808,6 +810,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall) arguments[0]->accept(*this); // stack: newLength storageSlot slotOffset argValue TypePointer type = arguments[0]->annotation().type->closestTemporaryType(arrayType->baseType()); + solAssert(type, ""); utils().convertType(*arguments[0]->annotation().type, *type); utils().moveToStackTop(1 + type->sizeOnStack()); utils().moveToStackTop(1 + type->sizeOnStack()); |