Website Summary Files Commits Branches @commit @diff @stats
path: root / spasm / src / frames.hpp
diff options
context:
space:
mode:
Commite7c2a14f3e424f1ef1109d7634ece820a058e862 (patch)
Author
 Dimitar Trendafilov <dimitar@coherent-labs.com>
2018-11-13 23:52:40 +0200
Committer
 Dimitar Trendafilov <dimitar@coherent-labs.com>
2018-11-13 23:52:40 +0200
Files587a120e78e7c0d50c381d8f38bf0665ed8733a7 /spasm/src/frames.hpp
IPL-e7c2a14f3e424f1ef1109d7634ece820a058e862.tar
IPL-e7c2a14f3e424f1ef1109d7634ece820a058e862.tar.gz
IPL-e7c2a14f3e424f1ef1109d7634ece820a058e862.zip
Parentfa077610dfe8b59eb2af069d2f3e92b4790a21d2 (diff)
Implemented call and ret opcodes
1 files changed, 0 insertions, 51 deletions
-rw-r--r--spasm/src/frames.hpp51
diff --git a/spasm/src/frames.hpp b/spasm/src/frames.hpp
deleted file mode 100644
index 14d1d14..0000000
--- a/spasm/src/frames.hpp
+++ /dev/null
@@ -1,51 +0,0 @@
-#ifndef FRAMES_HPP
-#define FRAMES_HPP
-
-#include <stack>
-
-#include "types.hpp"
-
-namespace SpasmImpl
-{
-//! Class representing the stack frame for a function
-/*!
-** The class is implemented as a simple stack of frames while each frame
-** is built up by a number of data_t objects
-*/
-class FrameStack
-{
- public:
- FrameStack();
- FrameStack(const FrameStack&);
- ~FrameStack();
- FrameStack& operator=(const FrameStack&);
-
- const data_t& operator[](size_t) const;
- data_t& operator[](size_t);
- void pop_frame();
- void new_frame(size_t);
- bool empty() const;
-
- private:
- //! pointer to the base of the stack
- data_t* base_ptr;
-
- //! pointer to the beginning of the current frame
- data_t* frame_ptr;
-
- //! size of the whole stack in data_t objects
- size_t g_size;
-
- //! size of the current frame in data_t objects
- size_t c_size;
-
- //! stack of the offsets between frames in the stack.
- std::stack<size_t> fstack;
-
- void copy_fstack(const FrameStack&);
- void delete_fstack();
-};
-
-} // namespace SpasmImpl
-
-#endif // #ifndef FRAMES_HPP