diff options
author | Christian <c@ethdev.com> | 2015-02-09 20:40:37 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2015-02-09 20:40:37 +0800 |
commit | 140f003a2ef22b45b4740f7a62c09246d61682b0 (patch) | |
tree | 374e1938b0854cfd5e587c95866649c680629425 /ExpressionCompiler.h | |
parent | 106cda74f8f017d1a463a4bbb8f1309d7647a5d1 (diff) | |
download | dexon-solidity-140f003a2ef22b45b4740f7a62c09246d61682b0.tar.gz dexon-solidity-140f003a2ef22b45b4740f7a62c09246d61682b0.tar.zst dexon-solidity-140f003a2ef22b45b4740f7a62c09246d61682b0.zip |
Some cleanup in "move to memory" functions.
Diffstat (limited to 'ExpressionCompiler.h')
-rw-r--r-- | ExpressionCompiler.h | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/ExpressionCompiler.h b/ExpressionCompiler.h index 006858cb..ad0b3692 100644 --- a/ExpressionCompiler.h +++ b/ExpressionCompiler.h @@ -92,20 +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 copies the given arguments to memory (with optional offset). - /// @returns the number of bytes copied to memory + /// Appends code that evaluates the given arguments and moves the result to memory (with optional offset). + /// @returns the number of bytes moven to memory unsigned appendArgumentsCopyToMemory(std::vector<ASTPointer<Expression const>> const& _arguments, TypePointers const& _types = {}, - unsigned _memoryOffset = 0); - /// Appends code that copies a type to memory. - /// @returns the number of bytes copied to memory - unsigned appendTypeConversionAndMoveToMemory(Type const& _expectedType, Type const& _type, - Location const& _location, unsigned _memoryOffset = 0); - /// Appends code that moves a type to memory - /// @returns the number of bytes copied to memory - unsigned moveTypeToMemory(Type const& _type, Location const& _location, unsigned _memoryOffset, bool _padToWordBoundaries = true); - /// Appends code that evaluates a single expression and copies it to memory (with optional offset). - /// @returns the number of bytes copied to memory + unsigned _memoryOffset = 0, + bool _padToWordBoundaries = true); + /// 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); |