Objects Initial
This commit is contained in:
parent
0f639ba3b1
commit
94057d2a66
76 changed files with 7895 additions and 17 deletions
32
Objects/public/interpreter/callstack.h
Normal file
32
Objects/public/interpreter/callstack.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#pragma once
|
||||
|
||||
#include "core/object.h"
|
||||
#include "primitives/classobject.h"
|
||||
|
||||
#include "Map.hpp"
|
||||
|
||||
namespace obj {
|
||||
struct MethodObject;
|
||||
};
|
||||
|
||||
namespace obj {
|
||||
|
||||
struct ByteCode;
|
||||
|
||||
struct CallStack {
|
||||
|
||||
struct CallFrame {
|
||||
enum { CALL_DEPTH = 1024 };
|
||||
obj::Object* mSelf = NULL;
|
||||
obj::MethodObject* mMethod = NULL;
|
||||
tp::ualni mIp = 0;
|
||||
};
|
||||
|
||||
void enter(const CallFrame& frame);
|
||||
void leave();
|
||||
ByteCode* getBytecode();
|
||||
tp::halni len() const;
|
||||
|
||||
tp::ConstSizeBuffer<CallFrame, CallFrame::CALL_DEPTH> mStack;
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue