Objects Initial
This commit is contained in:
parent
0f639ba3b1
commit
94057d2a66
76 changed files with 7895 additions and 17 deletions
28
Objects/public/interpreter/bytecode.h
Normal file
28
Objects/public/interpreter/bytecode.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "opcodes.h"
|
||||
|
||||
#include "primitives/intobject.h"
|
||||
#include "primitives/stringobject.h"
|
||||
|
||||
#include "Buffer.hpp"
|
||||
#include "Strings.hpp"
|
||||
|
||||
namespace obj {
|
||||
|
||||
typedef Object* ConstData;
|
||||
|
||||
struct ByteCode {
|
||||
tp::Buffer<ConstData> mConstants;
|
||||
tp::Buffer<OpCode> mInstructions;
|
||||
tp::ualni mInstructionIdx = 0;
|
||||
tp::ualni mArgumentsLoaded = 0;
|
||||
|
||||
~ByteCode() {
|
||||
for (auto const_obj : mConstants) {
|
||||
NDO->destroy(const_obj.data());
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue