clean up object module

This commit is contained in:
IlyaShurupov 2024-03-23 12:32:57 +03:00
parent 4c66704830
commit 5d9e270aa9
68 changed files with 1223 additions and 1229 deletions

View file

@ -4,6 +4,7 @@
#include "interpreter/ByteCode.hpp"
#include "primitives/MethodObject.hpp"
using namespace tp;
using namespace obj;
void CallStack::enter(const CallStack::CallFrame& frame) {
@ -14,7 +15,7 @@ void CallStack::enter(const CallStack::CallFrame& frame) {
frame.mMethod->mScript->mBytecode.mArgumentsLoaded = 0;
frame.mMethod->mScript->mBytecode.mInstructionIdx = 0;
obj::NDO->refinc(frame.mMethod);
obj::NDO->increaseReferenceCount(frame.mMethod);
mStack.append(frame);
}
@ -31,4 +32,4 @@ void CallStack::leave() {
ByteCode* CallStack::getBytecode() { return &mStack.last().mMethod->mScript->mBytecode; }
tp::halni CallStack::len() const { return mStack.size(); }
halni CallStack::len() const { return mStack.size(); }