Modules/Objects/public/interpreter/ByteCode.hpp
2024-11-24 22:41:14 +03:00

28 lines
No EOL
501 B
C++

#pragma once
#include "OperatoinCodes.hpp"
#include "primitives/IntObject.hpp"
#include "primitives/StringObject.hpp"
#include "Buffer.hpp"
#include <string>
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());
}
}
};
};