Method object refactor
This commit is contained in:
parent
add66e6cac
commit
7332e72bb2
25 changed files with 420 additions and 529 deletions
23
Objects/public/primitives/BytecodeObject.hpp
Normal file
23
Objects/public/primitives/BytecodeObject.hpp
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#pragma once
|
||||
|
||||
#include "primitives/StringObject.hpp"
|
||||
#include "interpreter/ByteCode.hpp"
|
||||
|
||||
namespace tp::obj {
|
||||
|
||||
struct BytecodeObject : Object {
|
||||
|
||||
static ObjectType TypeData;
|
||||
|
||||
StringObject* mReadable;
|
||||
ByteCode mBytecode;
|
||||
|
||||
static void constructor(BytecodeObject* self);
|
||||
static void copy(BytecodeObject* self, BytecodeObject* in);
|
||||
static void destructor(BytecodeObject* self);
|
||||
|
||||
static alni save_size(BytecodeObject* self);
|
||||
static void save(BytecodeObject* self, ArchiverOut& file_self);
|
||||
static void load(ArchiverIn& file_self, BytecodeObject* self);
|
||||
};
|
||||
}
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "primitives/StringObject.hpp"
|
||||
#include "interpreter/Script.hpp"
|
||||
#include "primitives/BytecodeObject.hpp"
|
||||
|
||||
namespace tp::obj {
|
||||
|
||||
|
|
@ -9,7 +8,7 @@ namespace tp::obj {
|
|||
|
||||
static ObjectType TypeData;
|
||||
|
||||
Script* mScript;
|
||||
BytecodeObject* mBytecodeLink;
|
||||
|
||||
static void constructor(MethodObject* self);
|
||||
static void copy(MethodObject* self, MethodObject* in);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,4 @@ namespace tp::obj {
|
|||
static ObjectType TypeData;
|
||||
};
|
||||
|
||||
#define NDO_NULL objects_api::getNull()
|
||||
#define NDO_NULL_REF objects_api::getNullReferenced()
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue