diff options
| author | Cody <cody@codyq.dev> | 2023-06-07 03:28:40 -0500 |
|---|---|---|
| committer | Cody <cody@codyq.dev> | 2023-06-07 03:28:40 -0500 |
| commit | 6f6613419f1511c5637c9f69b3caa5ae838270b9 (patch) | |
| tree | e203d6cdc0eb2140ae6f0a430e76f2992de66bec /crates/sloth_vm/src/native.rs | |
| parent | 25c5ccb29a6f2387a04bfb5d50874e00084c15d6 (diff) | |
| download | sloth-6f6613419f1511c5637c9f69b3caa5ae838270b9.tar.gz | |
Moving over from a VM interpreter to natively compiled w/ LLVM
Diffstat (limited to 'crates/sloth_vm/src/native.rs')
| -rw-r--r-- | crates/sloth_vm/src/native.rs | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/crates/sloth_vm/src/native.rs b/crates/sloth_vm/src/native.rs deleted file mode 100644 index fbd2626..0000000 --- a/crates/sloth_vm/src/native.rs +++ /dev/null @@ -1,19 +0,0 @@ -use crate::value::Primitive; -use crate::VM; - -pub type NativeFunctionResult = Result<Primitive, Error>; -pub type NativeFunctionInput = fn(&mut VM, &[Primitive]) -> NativeFunctionResult; - -pub enum Error { - InvalidArgument, - Unknown(String), -} - -#[allow(clippy::type_complexity)] -pub struct NativeFunction { - pub name: &'static str, - pub function: NativeFunctionInput, - pub arity: u8, - pub returns_value: bool, - pub doc: Option<&'static str>, -} |
