From 183a92d37ff56fa1879f43140dd83ae987d02429 Mon Sep 17 00:00:00 2001 From: Judah Caruso Date: Tue, 5 Dec 2023 13:27:48 -0700 Subject: [PATCH] fixed issue with memory_equal in builtin not resolving --- core/operations.onyx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/operations.onyx b/core/operations.onyx index d91592a1..9809adfc 100644 --- a/core/operations.onyx +++ b/core/operations.onyx @@ -1,7 +1,5 @@ package builtin -use core { intrinsics } - // // This file contains builtin operator overloads. // It's in a separate file because we need to defer resolution of some definitions @@ -28,9 +26,11 @@ use core { intrinsics } #operator * macro (l: [$N]$T, r: T) => __array_op_scalar(l, r, [a, b](a * b)); #operator / macro (l: [$N]$T, r: T) => __array_op_scalar(l, r, [a, b](a / b)); -#operator == macro (l, r: [$N]$T) => intrinsics.wasm.memory_equal(cast(rawptr)l, cast(rawptr)r, N * sizeof T); +#operator == macro (l, r: [$N]$T) => memory_equal(cast(rawptr)l, cast(rawptr)r, N * sizeof T); #operator != macro (l, r: [$N]$T) => !(l == r); +memory_equal :: (a: rawptr, b: rawptr, count: i32) -> bool #intrinsic --- // So we don't have to include core.intrinsics + __array_op_array :: macro (l, r: [$N]$T, $body: Code) -> [N]T { res: [N]T; for 0..N do res[it] = #unquote body(l[it], r[it]); -- 2.25.1