Objects Initial

This commit is contained in:
IlushaShurupov 2023-07-24 21:55:19 +03:00 committed by Ilya Shurupov
parent 0f639ba3b1
commit 94057d2a66
76 changed files with 7895 additions and 17 deletions

View 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;
};
};