Objects Initial
This commit is contained in:
parent
0f639ba3b1
commit
94057d2a66
76 changed files with 7895 additions and 17 deletions
29
Objects/public/interpreter/interpreter.h
Normal file
29
Objects/public/interpreter/interpreter.h
Normal 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 = {});
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue