Skip to content

Commit

Permalink
Remove vector operations (#262)
Browse files Browse the repository at this point in the history
This removes all of the vector operations since they are not used, and
have subtle bugs.
  • Loading branch information
DavePearce authored Oct 3, 2024
1 parent fcd3035 commit defc29a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
32 changes: 16 additions & 16 deletions src/compiler/tables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/stdlib.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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!)

Expand Down

0 comments on commit defc29a

Please sign in to comment.