diff options
author | chriseth <c@ethdev.com> | 2015-01-15 01:22:16 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-01-15 01:22:16 +0800 |
commit | 1a4280de35d118493e11bc8272d2d7127adaa50c (patch) | |
tree | 6abcbc41d1ded067d5ffd8453656241366512217 /ExpressionCompiler.h | |
parent | 6e16107870494878635da347146b076a7d75dea0 (diff) | |
parent | abe6055ab73d643ae904202850e4502596112e20 (diff) | |
download | dexon-solidity-1a4280de35d118493e11bc8272d2d7127adaa50c.tar dexon-solidity-1a4280de35d118493e11bc8272d2d7127adaa50c.tar.gz dexon-solidity-1a4280de35d118493e11bc8272d2d7127adaa50c.tar.bz2 dexon-solidity-1a4280de35d118493e11bc8272d2d7127adaa50c.tar.lz dexon-solidity-1a4280de35d118493e11bc8272d2d7127adaa50c.tar.xz dexon-solidity-1a4280de35d118493e11bc8272d2d7127adaa50c.tar.zst dexon-solidity-1a4280de35d118493e11bc8272d2d7127adaa50c.zip |
Merge pull request #799 from chriseth/sol_gasAndValue
Specify gas and value for function calls and contract creation calls.
Diffstat (limited to 'ExpressionCompiler.h')
-rw-r--r-- | ExpressionCompiler.h | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/ExpressionCompiler.h b/ExpressionCompiler.h index 98f58c85..4a696c39 100644 --- a/ExpressionCompiler.h +++ b/ExpressionCompiler.h @@ -87,21 +87,13 @@ private: //// Appends code that cleans higher-order bits for integer types. void appendHighBitsCleanup(IntegerType const& _typeOnStack); - /// Additional options used in appendExternalFunctionCall. - struct FunctionCallOptions - { - FunctionCallOptions() {} - /// Invoked to copy the address to the stack - std::function<void()> obtainAddress; - /// Invoked to copy the ethe value to the stack (if not specified, value is 0). - std::function<void()> obtainValue; - /// If true, do not prepend function index to call data - bool bare = false; - }; - /// Appends code to call a function of the given type with the given arguments. void appendExternalFunctionCall(FunctionType const& _functionType, std::vector<ASTPointer<Expression const>> const& _arguments, - FunctionCallOptions const& _options = FunctionCallOptions()); + bool bare = false); + /// Appends code that copies the given arguments to memory (with optional offset). + /// @returns the number of bytes copied to memory + unsigned appendArgumentCopyToMemory(TypePointers const& _functionType, std::vector<ASTPointer<Expression const>> const& _arguments, + unsigned _memoryOffset = 0); /** * Helper class to store and retrieve lvalues to and from various locations. |