Change translation of implicit throws (issue #1589).

This adds a new invalid instruction that is used for encoding
implicit throws that are emitted by the compiler. This makes it
possible to distinguish such runtime errors from user-provided,
explicit throws.
This commit is contained in:
Valentin Wüstholz
2017-01-26 16:39:07 +01:00
committed by chriseth
parent 102fd7ee5d
commit 9bcbd93ac5
10 changed files with 49 additions and 17 deletions
+1 -1
View File
@@ -901,7 +901,7 @@ void ArrayUtils::accessIndex(ArrayType const& _arrayType, bool _doBoundsCheck) c
// check out-of-bounds access
m_context << Instruction::DUP2 << Instruction::LT << Instruction::ISZERO;
// out-of-bounds access throws exception
m_context.appendConditionalJumpTo(m_context.errorTag());
m_context.appendConditionalInvalid();
}
if (location == DataLocation::CallData && _arrayType.isDynamicallySized())
// remove length if present