Skip to content

Commit 42752e3

Browse files
committed
VirtualMachine: Drop support for instruction arguments in functions
1 parent 0043ac4 commit 42752e3

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/engine/virtualmachine.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,6 @@ do_list_get_item : {
411411
DISPATCH();
412412

413413
do_exec:
414-
m_globalPos = pos;
415-
int ret = m_functions[*++pos](this);
416-
FREE_REGS(ret);
417-
pos += ret;
414+
FREE_REGS(m_functions[*++pos](this));
418415
DISPATCH();
419416
}

src/engine/virtualmachine.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ class LIBSCRATCHCPP_EXPORT VirtualMachine
8282
Engine *engine() const { return m_engine; };
8383

8484
const Value *getInput(unsigned int index, unsigned int argCount) const { return m_regs[m_regCount - argCount + index]; };
85-
unsigned int getFieldIndex(unsigned int index) const { return m_globalPos[index]; };
8685

8786
void addReturnValue(const Value &v) { *m_regs[m_regCount++] = v; };
8887
void replaceReturnValue(const Value &v, unsigned int offset) { *m_regs[m_regCount - offset] = v; };
@@ -102,7 +101,6 @@ class LIBSCRATCHCPP_EXPORT VirtualMachine
102101

103102
Target *m_target = nullptr;
104103
Engine *m_engine = nullptr;
105-
unsigned int *m_globalPos = nullptr;
106104
bool m_atEnd = false;
107105

108106
BlockFunc *m_functions;

0 commit comments

Comments
 (0)