From ec022783c4ba2a319ce60dc818e4f0e0e8872093 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 12 Jan 2015 12:47:37 +0100 Subject: Modify gas and value for external function call. --- ExpressionCompiler.h | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'ExpressionCompiler.h') diff --git a/ExpressionCompiler.h b/ExpressionCompiler.h index 98f58c85..024c4644 100644 --- a/ExpressionCompiler.h +++ b/ExpressionCompiler.h @@ -87,21 +87,9 @@ 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 obtainAddress; - /// Invoked to copy the ethe value to the stack (if not specified, value is 0). - std::function 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> const& _arguments, - FunctionCallOptions const& _options = FunctionCallOptions()); + bool bare = false); /** * Helper class to store and retrieve lvalues to and from various locations. -- cgit v1.2.3 From b440d7e321793e0b053d3b467934a45f880863e0 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 13 Jan 2015 18:12:19 +0100 Subject: Specify value for contract creation. --- ExpressionCompiler.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ExpressionCompiler.h') diff --git a/ExpressionCompiler.h b/ExpressionCompiler.h index 024c4644..4a696c39 100644 --- a/ExpressionCompiler.h +++ b/ExpressionCompiler.h @@ -90,6 +90,10 @@ private: /// Appends code to call a function of the given type with the given arguments. void appendExternalFunctionCall(FunctionType const& _functionType, std::vector> const& _arguments, 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> const& _arguments, + unsigned _memoryOffset = 0); /** * Helper class to store and retrieve lvalues to and from various locations. -- cgit v1.2.3