diff options
author | chriseth <chris@ethereum.org> | 2017-02-24 22:50:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-24 22:50:45 +0800 |
commit | d2c79bf8e9400f783bf0feed34065882eae02a68 (patch) | |
tree | c6d2aeab5587ccf89a44d998839670d181b0e3fd /libsolidity/codegen/ExpressionCompiler.cpp | |
parent | 673268a6f8345e9276764f13e105869f5be92adc (diff) | |
parent | 92bf5154fdcf0dfee40bfb5795729a4a9fa71dd6 (diff) | |
download | dexon-solidity-d2c79bf8e9400f783bf0feed34065882eae02a68.tar dexon-solidity-d2c79bf8e9400f783bf0feed34065882eae02a68.tar.gz dexon-solidity-d2c79bf8e9400f783bf0feed34065882eae02a68.tar.bz2 dexon-solidity-d2c79bf8e9400f783bf0feed34065882eae02a68.tar.lz dexon-solidity-d2c79bf8e9400f783bf0feed34065882eae02a68.tar.xz dexon-solidity-d2c79bf8e9400f783bf0feed34065882eae02a68.tar.zst dexon-solidity-d2c79bf8e9400f783bf0feed34065882eae02a68.zip |
Merge pull request #1700 from ethereum/fixNoMobile
Some checks for the existence of mobile type.
Diffstat (limited to 'libsolidity/codegen/ExpressionCompiler.cpp')
-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 fd4d87a5..aac4c0c6 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) @@ -815,6 +817,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()); |