diff options
author | Christian <c@ethdev.com> | 2015-02-11 00:53:43 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2015-02-12 18:33:10 +0800 |
commit | adb434569c7f54a12dfbdc674b50a4a4baca59e4 (patch) | |
tree | 5ac29b6c5a670de2458004c03337f6334b63ef2c /ExpressionCompiler.h | |
parent | 79aec95228f5c766daaa9d04a3800be99ded8015 (diff) | |
download | dexon-solidity-adb434569c7f54a12dfbdc674b50a4a4baca59e4.tar.gz dexon-solidity-adb434569c7f54a12dfbdc674b50a4a4baca59e4.tar.zst dexon-solidity-adb434569c7f54a12dfbdc674b50a4a4baca59e4.zip |
Dynamic copy to memory.
Diffstat (limited to 'ExpressionCompiler.h')
-rw-r--r-- | ExpressionCompiler.h | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/ExpressionCompiler.h b/ExpressionCompiler.h index bd45e067..dd26881f 100644 --- a/ExpressionCompiler.h +++ b/ExpressionCompiler.h @@ -92,21 +92,18 @@ private: /// 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, bool bare = false); - /// Appends code that evaluates the given arguments and moves the result to memory (with optional offset). - /// @returns the number of bytes moved to memory - unsigned appendArgumentsCopyToMemory(std::vector<ASTPointer<Expression const>> const& _arguments, - TypePointers const& _types = {}, - unsigned _memoryOffset = 0, - bool _padToWordBoundaries = true, - bool _padExceptionIfFourBytes = false); - /// Appends code that moves a stack element of the given type to memory - /// @returns the number of bytes moved to memory - unsigned appendTypeMoveToMemory(Type const& _type, Location const& _location, unsigned _memoryOffset, - bool _padToWordBoundaries = true); - /// Appends code that evaluates a single expression and moves the result to memory (with optional offset). - /// @returns the number of bytes moved to memory - unsigned appendExpressionCopyToMemory(Type const& _expectedType, Expression const& _expression, - unsigned _memoryOffset = 0); + /// Appends code that evaluates the given arguments and moves the result to memory. The memory offset is + /// expected to be on the stack and is updated by this call. + void appendArgumentsCopyToMemory(std::vector<ASTPointer<Expression const>> const& _arguments, + TypePointers const& _types = {}, + bool _padToWordBoundaries = true, + bool _padExceptionIfFourBytes = false); + /// Appends code that moves a stack element of the given type to memory. The memory offset is + /// expected below the stack element and is updated by this call. + void appendTypeMoveToMemory(Type const& _type, bool _padToWordBoundaries = true); + /// Appends code that evaluates a single expression and moves the result to memory. The memory offset is + /// expected to be on the stack and is updated by this call. + void appendExpressionCopyToMemory(Type const& _expectedType, Expression const& _expression); /// Appends code for a State Variable accessor function void appendStateVariableAccessor(VariableDeclaration const& _varDecl); |