refactor: merge io.c file I/O and module resolution functions into vm.c
Remove the separate io.c and io.h source files, inlining their static helper functions (readFile, wrenFilePath, readModule, setRootDirectory) directly into vm.c. This frees io.c as a dedicated built-in module slot and eliminates the cross-file dependency on io.h from main.c, test/api/main.c, and the Xcode/make build systems.
This commit is contained in:
+1
-2
@@ -153,8 +153,7 @@ lib/lib$(WREN).$(SHARED_EXT): $(VM_OBJECTS)
|
||||
|
||||
# Test executable.
|
||||
$(BUILD_DIR)/test/$(WREN): $(TEST_OBJECTS) $(MODULE_OBJECTS) $(VM_OBJECTS) \
|
||||
$(BUILD_DIR)/cli/io.o $(BUILD_DIR)/cli/modules.o $(BUILD_DIR)/cli/vm.o \
|
||||
$(LIBUV)
|
||||
$(BUILD_DIR)/cli/modules.o $(BUILD_DIR)/cli/vm.o $(LIBUV)
|
||||
@ printf "%10s %-30s %s\n" $(CC) $@ "$(C_OPTIONS)"
|
||||
@ mkdir -p $(BUILD_DIR)/test
|
||||
@ $(CC) $(CFLAGS) $^ -o $@ -lm $(LIBUV_LIBS)
|
||||
|
||||
Reference in New Issue
Block a user