hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 8192c49f71d7bbc0f4efdc2ef7b63b4d3740a0f6
parent 28361b77fe3ffcc4b1dc87c44f676fc5ece9e7b8
Author: Sudipto Mallick <smlckz@disroot.org>
Date:   Mon,  4 Oct 2021 10:32:16 +0000

Match/switch syntax change in aarch64 specific files in rt/

Required for building hare on aarch64

Signed-off-by: Sudipto Mallick <smlckz@disroot.org>

Diffstat:
Mrt/+aarch64/backtrace.ha | 6++++--
Mrt/+linux/+aarch64.ha | 14+++++++++-----
2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/rt/+aarch64/backtrace.ha b/rt/+aarch64/backtrace.ha @@ -12,8 +12,10 @@ export fn backtrace() frame = *(getfp(): *frame); // Returns the frame above the current frame, if any. export fn nextframe(fp: *frame) (frame | void) = { return match (fp.fp) { - null => void, - fp: *frame => *fp, + case null => + yield void; + case fp: *frame => + yield *fp; }; }; diff --git a/rt/+linux/+aarch64.ha b/rt/+linux/+aarch64.ha @@ -13,11 +13,15 @@ export fn clone( parent_tid: uintptr: u64, tls, child_tid: uintptr: u64))) { - u: u64 => switch (u) { - 0 => void, - * => u: int, - }, - err: errno => err, + case u: u64 => + switch (u) { + case 0 => + yield void; + case => + yield u: int; + }; + case err: errno => + yield err; }; };