From 3fe818eb4b820dbb7133904a126da8301e44ab3e Mon Sep 17 00:00:00 2001 From: DavePearce Date: Thu, 3 Oct 2024 12:15:23 +0100 Subject: [PATCH] fix: remove vector operations This removes all of the vector operations since they are not used, and have some subtle issues. --- src/compiler/tables.rs | 32 ++++++++++++++++---------------- src/stdlib.lisp | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/compiler/tables.rs b/src/compiler/tables.rs index c23b78b..6382e87 100644 --- a/src/compiler/tables.rs +++ b/src/compiler/tables.rs @@ -54,10 +54,10 @@ lazy_static::lazy_static! { handle: Handle::new(super::MAIN_MODULE, "shift"), class: FunctionClass::Builtin(Builtin::Shift), }, - "~>>" => Function{ - handle: Handle::new(super::MAIN_MODULE, "~>>"), - class: FunctionClass::Builtin(Builtin::NormFlat), - }, + // "~>>" => Function{ + // handle: Handle::new(super::MAIN_MODULE, "~>>"), + // class: FunctionClass::Builtin(Builtin::NormFlat), + // }, "if" => Function { handle: Handle::new(super::MAIN_MODULE, "if"), class: FunctionClass::Builtin(Builtin::If) @@ -76,18 +76,18 @@ lazy_static::lazy_static! { handle: Handle::new(super::MAIN_MODULE, "-"), class: FunctionClass::Intrinsic(Intrinsic::Sub) }, - "+." => Function { - handle: Handle::new(super::MAIN_MODULE, "+"), - class: FunctionClass::Intrinsic(Intrinsic::VectorAdd) - }, - "*." => Function { - handle: Handle::new(super::MAIN_MODULE, "*"), - class: FunctionClass::Intrinsic(Intrinsic::VectorMul) - }, - "-." => Function { - handle: Handle::new(super::MAIN_MODULE, "-"), - class: FunctionClass::Intrinsic(Intrinsic::VectorSub) - }, + // "+." => Function { + // handle: Handle::new(super::MAIN_MODULE, "+"), + // class: FunctionClass::Intrinsic(Intrinsic::VectorAdd) + // }, + // "*." => Function { + // handle: Handle::new(super::MAIN_MODULE, "*"), + // class: FunctionClass::Intrinsic(Intrinsic::VectorMul) + // }, + // "-." => Function { + // handle: Handle::new(super::MAIN_MODULE, "-"), + // class: FunctionClass::Intrinsic(Intrinsic::VectorSub) + // }, "~" => Function { handle: Handle::new(super::MAIN_MODULE, "~"), class: FunctionClass::Intrinsic(Intrinsic::Normalize) diff --git a/src/stdlib.lisp b/src/stdlib.lisp index 51f38fa..ae09f75 100644 --- a/src/stdlib.lisp +++ b/src/stdlib.lisp @@ -34,7 +34,7 @@ (defpurefun ((not :binary@bool :force) (x :binary)) (- 1 x)) -(defpurefun ((eq! :@loob :force) x y) (~>> (-. x y))) +(defpurefun ((eq! :@loob :force) x y) (~ (- x y))) (defpurefun ((neq! :binary@loob :force) x y) (not (~ (eq! x y)))) (defunalias = eq!)