diff options
author | chriseth <c@ethdev.com> | 2015-06-05 23:32:13 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-06-09 06:27:56 +0800 |
commit | 35ec81971acc31f16253bd1702fb81adbee85f48 (patch) | |
tree | 3e8e3b1079a01ab03ed1b2d86d203f3bfe56f435 /CompilerUtils.h | |
parent | c2a9419e495e931a825e8146aec49ffc34e44954 (diff) | |
download | dexon-solidity-35ec81971acc31f16253bd1702fb81adbee85f48.tar.gz dexon-solidity-35ec81971acc31f16253bd1702fb81adbee85f48.tar.zst dexon-solidity-35ec81971acc31f16253bd1702fb81adbee85f48.zip |
Dynamic memory.
Diffstat (limited to 'CompilerUtils.h')
-rw-r--r-- | CompilerUtils.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/CompilerUtils.h b/CompilerUtils.h index 45f53e12..30ea5cc6 100644 --- a/CompilerUtils.h +++ b/CompilerUtils.h @@ -35,6 +35,13 @@ class CompilerUtils public: CompilerUtils(CompilerContext& _context): m_context(_context) {} + /// Stores the initial value of the free-memory-pointer at its position; + void initialiseFreeMemoryPointer(); + /// Copies the free memory pointer to the stack. + void fetchFreeMemoryPointer(); + /// Stores the free memory pointer from the stack. + void storeFreeMemoryPointer(); + /// Loads data from memory to the stack. /// @param _offset offset in memory (or calldata) /// @param _type data type to load @@ -95,7 +102,10 @@ public: /// Bytes we need to the start of call data. /// - The size in bytes of the function (hash) identifier. - static const unsigned int dataStartOffset; + static const unsigned dataStartOffset; + + /// Position of the free-memory-pointer in memory; + static const size_t freeMemoryPointer; private: /// Prepares the given type for storing in memory by shifting it if necessary. |