new object creation interface

This commit is contained in:
IlyaShurupov 2024-03-25 10:25:25 +03:00 committed by Ilya Shurupov
parent ca1ae75b07
commit cf3f8dbc9c
23 changed files with 103 additions and 84 deletions

View file

@ -14,16 +14,29 @@ namespace tp::obj {
bool mIsTypeMethod = false;
const TypeMethod* mTypeMethod = nullptr;
typedef struct { Object* obj; std::string id; } GlobalDef;
typedef struct {
Object* obj;
std::string id;
} GlobalDef;
void exec(MethodObject* method, ClassObject* self = nullptr, DictObject* globals = nullptr, InitialierList<GlobalDef> globals2 = {});
void exec(
MethodObject* method,
ClassObject* self = nullptr,
DictObject* globals = nullptr,
InitialierList<GlobalDef> globals2 = {}
);
void stepBytecode();
void stepBytecodeIn();
void stepBytecodeOut();
bool finished();
bool finished() const;
void execAll(MethodObject* method, ClassObject* self = nullptr, DictObject* globals = nullptr, InitialierList<GlobalDef> globals2 = {});
void execAll(
MethodObject* method,
ClassObject* self = nullptr,
DictObject* globals = nullptr,
InitialierList<GlobalDef> globals2 = {}
);
};
}