diff options
| Commit | 9a7a8a31e75d1b85274ef46ca29714270062809e (patch) | |
|---|---|---|
| Author | 2018-11-14 19:47:37 +0200 | |
| Committer | 2018-11-14 19:47:37 +0200 | |
| Files | 587a120e78e7c0d50c381d8f38bf0665ed8733a7 /spasm/src/dstack.hpp | |
| IPL-9a7a8a31e75d1b85274ef46ca29714270062809e.tar IPL-9a7a8a31e75d1b85274ef46ca29714270062809e.tar.gz IPL-9a7a8a31e75d1b85274ef46ca29714270062809e.zip | ||
| Parent | 990a8f5e2c2d6e246acfd8b7a99ac1cbf4fb1675 (diff) | |
| Parent | e7c2a14f3e424f1ef1109d7634ece820a058e862 (diff) | |
Merge pull request #45 from SofiaCPP/feature/spasm_improvements
Feature/spasm improvements
1 files changed, 0 insertions, 46 deletions
| -rw-r--r-- | spasm/src/dstack.hpp | 46 |
diff --git a/spasm/src/dstack.hpp b/spasm/src/dstack.hpp deleted file mode 100644 index 850b66b..0000000 --- a/spasm/src/dstack.hpp +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef DSTACK_HPP -#define DSTACK_HPP - -#include "types.hpp" - -namespace SpasmImpl -{ -//! class representing the data stack - -/*! The class is quite simple stack. It is byte-orientatied - every push -** and pop is done in bytes with no taking care of any byte order! -*/ -class Dstack -{ - public: - Dstack(); - Dstack(const Dstack&); - Dstack& operator=(const Dstack&); - ~Dstack(); - void push(data_t); - void push(byte*, size_t); - void pop(void*, size_t); - data_t pop(); - data_t top() const; - - void reserve(size_t); - void strip_memory(); - size_t size() const; - size_t reserved() const; - bool empty() const; - - private: - void copy_dstack(const Dstack&); - - //! pointer to the bottom of the stack - byte* bottom; - - //! pointer to the top of the stack - byte* tos; - - //! size of the stack in bytes - size_t s_size; -}; -} // namespace SpasmImpl - -#endif // #ifndef DSTACK_HPP |
