Skip to content

Commit 5c2b721

Browse files
committed
feat: implement the core virtual machine, instruction interpreter, and runtime for ProXPL.
1 parent d91f79b commit 5c2b721

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/runtime/vm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,14 @@ static void concatenate(VM* pvm) {
121121

122122
// Helper Functions for OOP
123123

124-
static void defineMethod(ObjString* name, VM* vm) {
124+
void defineMethod(ObjString* name, VM* vm) {
125125
Value method = peek(vm, 0);
126126
ObjClass* klass = AS_CLASS(peek(vm, 1));
127127
tableSet(&klass->methods, name, method);
128128
pop(vm);
129129
}
130130

131-
static bool bindMethod(ObjClass* klass, ObjString* name, VM* vm) {
131+
bool bindMethod(ObjClass* klass, ObjString* name, VM* vm) {
132132
Value method;
133133
if (!tableGet(&klass->methods, name, &method)) {
134134
runtimeError(vm, "Undefined property '%s'.", name->chars);
@@ -141,7 +141,7 @@ static bool bindMethod(ObjClass* klass, ObjString* name, VM* vm) {
141141
return true;
142142
}
143143

144-
static bool invokeFromClass(ObjClass* klass, ObjString* name, int argCount, VM* vm) {
144+
bool invokeFromClass(ObjClass* klass, ObjString* name, int argCount, VM* vm) {
145145
Value method;
146146
if (!tableGet(&klass->methods, name, &method)) {
147147
runtimeError(vm, "Undefined property '%s'.", name->chars);
@@ -161,7 +161,7 @@ static bool invokeFromClass(ObjClass* klass, ObjString* name, int argCount, VM*
161161
return true;
162162
}
163163

164-
static bool invoke(ObjString* name, int argCount, VM* vm) {
164+
bool invoke(ObjString* name, int argCount, VM* vm) {
165165
Value receiver = peek(vm, argCount);
166166

167167
if (!IS_INSTANCE(receiver)) {

0 commit comments

Comments
 (0)