From f3c613d8f1723a33af33e7a559cbd61cb11f1dd0 Mon Sep 17 00:00:00 2001 From: vyzo Date: Sun, 14 Apr 2024 16:46:32 +0300 Subject: [PATCH] improve match code generation no need for the ## predicates, plus the compiler understands the regular ones. --- src/gerbil/core/match.ss | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gerbil/core/match.ss b/src/gerbil/core/match.ss index 8ab5f5b48b..70e86d83eb 100644 --- a/src/gerbil/core/match.ss +++ b/src/gerbil/core/match.ss @@ -294,7 +294,7 @@ package: gerbil/core ((cons: hd tl) (with-syntax (($hd (genident 'hd)) ($tl (genident 'tl))) - ['if #'(##pair? target) + ['if #'(pair? target) (let ((hd-pat (stx-e #'hd)) (tl-pat (stx-e #'tl))) (cond @@ -315,12 +315,12 @@ package: gerbil/core E)]))) E])) ((null:) - ['if #'(##null? target) K E]) + ['if #'(null? target) K E]) ((splice: hd rest) (generate-splice tgt #'hd #'rest K E)) ((box: pat) (with-syntax (($tgt (genident 'e))) - ['if #'(##box? target) + ['if #'(box? target) ['let #'(($tgt (##unbox target))) (generate1 #'$tgt #'pat K E)] E])) @@ -337,13 +337,13 @@ package: gerbil/core (syntax-case #'body () ((simple: body) (with-syntax ((len (stx-length #'body))) - ['if #'(##vector? target) + ['if #'(vector? target) ['if #'(##fx= (##vector-length target) len) (generate-simple-vector tgt #'body 0 K E) E] E])) ((list: body) - ['if #'(##vector? target) + ['if #'(vector? target) (generate-list-vector tgt #'body 'vector->list K E) E]))) ((struct: info body)