mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Propagate exceptions in clone calls.
This commit is contained in:
parent
289b814670
commit
4128b04253
@ -720,6 +720,9 @@ eth::Assembly Compiler::getCloneRuntime()
|
|||||||
a << u256("0xcafecafecafecafecafecafecafecafecafecafe");
|
a << u256("0xcafecafecafecafecafecafecafecafecafecafe");
|
||||||
a << u256(eth::c_callGas + eth::c_callValueTransferGas + 10) << eth::Instruction::GAS << eth::Instruction::SUB;
|
a << u256(eth::c_callGas + eth::c_callValueTransferGas + 10) << eth::Instruction::GAS << eth::Instruction::SUB;
|
||||||
a << eth::Instruction::CALLCODE;
|
a << eth::Instruction::CALLCODE;
|
||||||
|
//Propagate error condition (if CALLCODE pushes 0 on stack).
|
||||||
|
a << eth::Instruction::ISZERO;
|
||||||
|
a.appendJumpI(a.errorTag());
|
||||||
//@todo adjust for larger return values, make this dynamic.
|
//@todo adjust for larger return values, make this dynamic.
|
||||||
a << u256(0x20) << u256(0) << eth::Instruction::RETURN;
|
a << u256(0x20) << u256(0) << eth::Instruction::RETURN;
|
||||||
return a;
|
return a;
|
||||||
|
Loading…
Reference in New Issue
Block a user