mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #1156 from ethereum/inline-assembly-address
Support address in inline assembly
This commit is contained in:
commit
8572664ac2
@ -8,6 +8,7 @@ Features:
|
||||
|
||||
Bugfixes:
|
||||
* Disallow unknown options in `solc`
|
||||
* Inline assembly: support the `address` opcode
|
||||
|
||||
### 0.4.2 (2016-09-17)
|
||||
|
||||
|
@ -156,12 +156,15 @@ assembly::Statement Parser::parseElementaryOperation(bool _onlySinglePusher)
|
||||
case Token::Identifier:
|
||||
case Token::Return:
|
||||
case Token::Byte:
|
||||
case Token::Address:
|
||||
{
|
||||
string literal;
|
||||
if (m_scanner->currentToken() == Token::Return)
|
||||
literal = "return";
|
||||
else if (m_scanner->currentToken() == Token::Byte)
|
||||
literal = "byte";
|
||||
else if (m_scanner->currentToken() == Token::Address)
|
||||
literal = "address";
|
||||
else
|
||||
literal = m_scanner->currentLiteral();
|
||||
// first search the set of instructions.
|
||||
|
@ -94,7 +94,7 @@ BOOST_AUTO_TEST_CASE(suicide_selfdestruct)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(keywords)
|
||||
{
|
||||
BOOST_CHECK(successParse("{ byte return }"));
|
||||
BOOST_CHECK(successParse("{ byte return address }"));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(constants)
|
||||
|
Loading…
Reference in New Issue
Block a user