mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #2350 from benjaminion/patch-1
Change LLL opcode generated by "panic" to INVALID
This commit is contained in:
commit
d3f4c97c53
@ -573,10 +573,6 @@ void CodeFragment::constructOperation(sp::utree const& _t, CompilerState& _s)
|
|||||||
m_asm.append(i.m_asm);
|
m_asm.append(i.m_asm);
|
||||||
m_asm.popTo(1);
|
m_asm.popTo(1);
|
||||||
}
|
}
|
||||||
else if (us == "PANIC")
|
|
||||||
{
|
|
||||||
m_asm.appendJump(m_asm.errorTag());
|
|
||||||
}
|
|
||||||
else if (us == "BYTECODESIZE")
|
else if (us == "BYTECODESIZE")
|
||||||
{
|
{
|
||||||
m_asm.appendProgramSize();
|
m_asm.appendProgramSize();
|
||||||
|
@ -45,6 +45,7 @@ CodeFragment const& CompilerState::getDef(std::string const& _s)
|
|||||||
void CompilerState::populateStandard()
|
void CompilerState::populateStandard()
|
||||||
{
|
{
|
||||||
static const string s = "{"
|
static const string s = "{"
|
||||||
|
"(def 'panic () (asm INVALID))"
|
||||||
"(def 'allgas (- (gas) 21))"
|
"(def 'allgas (- (gas) 21))"
|
||||||
"(def 'send (to value) (call allgas to value 0 0 0 0))"
|
"(def 'send (to value) (call allgas to value 0 0 0 0))"
|
||||||
"(def 'send (gaslimit to value) (call gaslimit to value 0 0 0 0))"
|
"(def 'send (gaslimit to value) (call gaslimit to value 0 0 0 0))"
|
||||||
|
Loading…
Reference in New Issue
Block a user