Method object refactor

This commit is contained in:
IlyaShurupov 2024-03-25 13:57:31 +03:00
parent add66e6cac
commit 7332e72bb2
25 changed files with 420 additions and 529 deletions

View file

@ -19,6 +19,12 @@ namespace tp::obj {
ualni mInstructionIdx = 0;
ualni mArgumentsLoaded = 0;
void updateRefCount() {
for (auto const_obj : mConstants) {
objects_api::setReferenceCount(const_obj.data(), 1);
}
}
~ByteCode() {
for (auto const_obj : mConstants) {
objects_api::destroy(const_obj.data());