From f1367b64efe978b0a146f783189dde2206de9efd Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Sun, 26 Oct 2025 12:29:06 -0700 Subject: [PATCH] no valueFunctions --- bin/repl | 6 +++--- bin/shrimp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/repl b/bin/repl index 8855e2d..d2f2e5e 100755 --- a/bin/repl +++ b/bin/repl @@ -1,7 +1,7 @@ #!/usr/bin/env bun import { Compiler } from '../src/compiler/compiler' -import { colors, formatValue, nativeFunctions, valueFunctions } from '../src/prelude' +import { colors, formatValue, nativeFunctions } from '../src/prelude' import { VM, Scope, bytecodeToString } from 'reefvm' import * as readline from 'readline' import { readFileSync, writeFileSync } from 'fs' @@ -48,7 +48,7 @@ async function repl() { return } - vm ||= new VM({ instructions: [], constants: [] }, nativeFunctions, valueFunctions) + vm ||= new VM({ instructions: [], constants: [] }, nativeFunctions) if (['/exit', 'exit', '/quit', 'quit'].includes(trimmed)) { console.log(`\n${colors.yellow}Goodbye!${colors.reset}`) @@ -211,7 +211,7 @@ async function loadFile(filePath: string): Promise<{ vm: VM; codeHistory: string console.log(`${colors.dim}Loading ${basename(filePath)}...${colors.reset}`) - const vm = new VM({ instructions: [], constants: [] }, nativeFunctions, valueFunctions) + const vm = new VM({ instructions: [], constants: [] }, nativeFunctions) await vm.run() const codeHistory: string[] = [] diff --git a/bin/shrimp b/bin/shrimp index 0622700..0f33de4 100755 --- a/bin/shrimp +++ b/bin/shrimp @@ -1,7 +1,7 @@ #!/usr/bin/env bun import { Compiler } from '../src/compiler/compiler' -import { colors, nativeFunctions, valueFunctions } from '../src/prelude' +import { colors, nativeFunctions } from '../src/prelude' import { VM, fromValue, bytecodeToString } from 'reefvm' import { readFileSync, writeFileSync, mkdirSync } from 'fs' import { randomUUID } from "crypto" @@ -12,7 +12,7 @@ async function runFile(filePath: string) { try { const code = readFileSync(filePath, 'utf-8') const compiler = new Compiler(code) - const vm = new VM(compiler.bytecode, nativeFunctions, valueFunctions) + const vm = new VM(compiler.bytecode, nativeFunctions) await vm.run() return vm.stack.length ? fromValue(vm.stack[vm.stack.length - 1]) : null } catch (error: any) {