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,29 @@
#pragma once
#include "operandsstack.h"
#include "scopestack.h"
#include "callstack.h"
namespace obj {
struct Interpreter {
OperandStack mOperandsStack;
ScopeStack mScopeStack;
CallStack mCallStack;
obj::Object* mLastParent = NULL;
bool mIsTypeMethod = false;
const TypeMethod* mTypeMethod = NULL;
typedef struct { obj::Object* obj; tp::String id; } GlobalDef;
void exec(obj::MethodObject* method, obj::ClassObject* self = NULL, obj::DictObject* globals = NULL, tp::init_list<GlobalDef> globals2 = {});
void stepBytecode();
void stepBytecodeIn();
void stepBytecodeOut();
bool finished();
void execAll(obj::MethodObject* method, obj::ClassObject* self = NULL, obj::DictObject* globals = NULL, tp::init_list<GlobalDef> globals2 = {});
};
};