Update of /cvsroot/wisp/wisp/modules
In directory usw-pr-cvs1:/tmp/cvs-serv1563/modules
Modified Files:
universal.wrti wisptyp.wrti
Log Message:
Implemented |<u8vector>|.
Index: universal.wrti
===================================================================
RCS file: /cvsroot/wisp/wisp/modules/universal.wrti,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- universal.wrti 18 Sep 2002 21:12:24 -0000 1.21
+++ universal.wrti 18 Sep 2002 21:15:12 -0000 1.22
@@ -519,6 +519,7 @@
,(bsr ,0 ,0))
;; Comparison
+
(macro within
-rot over <= -rot > and)
@@ -528,6 +529,9 @@
(macro max
2dup < if swap then drop swap)
+ (macro unless
+ 0 = if)
+
;; Memory calculations
(macro wydes
@@ -606,13 +610,15 @@
(macro --cell@ --tetra@)
(macro cell! tetra!)
- (macro fill
+ (macro bytefill
(conform %edi %ecx %eax)
,(cld)
,(rep)
,(stos %al)
(believe))
+ (macro fill bytefill) ; FIXME: drop this
+
(macro tetrafill
(conform %edi %ecx %eax)
,(cld)
@@ -622,12 +628,14 @@
(macro cellfill tetrafill)
- (macro move
+ (macro bytemove
(conform %esi %edi %ecx)
,(cld)
,(rep)
,(movs \byte)
(believe))
+
+ (macro move bytemove) ; FIXME: drop this
(macro tetramove
(conform %esi %edi %ecx)
Index: wisptyp.wrti
===================================================================
RCS file: /cvsroot/wisp/wisp/modules/wisptyp.wrti,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- wisptyp.wrti 18 Sep 2002 21:12:24 -0000 1.17
+++ wisptyp.wrti 18 Sep 2002 21:15:13 -0000 1.18
@@ -34,9 +34,15 @@
(macro cons?
2 xor 7 and 0 =)
+ (macro require-cons
+ dup cons? unless 'WB_cons_huh swap go-raise then)
+
(macro utdecons ; (cons) -> (car cdr)
dup utcar@ swap utcdr@)
+ (macro decons
+ require-cons untag-cons utdecons)
+
;; Node manipulation
(macro untag-node
@@ -45,11 +51,14 @@
(macro require-vector
dup get-type 'RT_vector <> if 'WB_vector_huh swap go-raise then)
- (macro vector-length
- cell+ cell@)
+ (macro require-u8vector
+ dup get-type 'RT_u8vector <> if 'WB_u8vector_huh swap go-raise then)
- (macro vector-data
- 2 cells +)
+ (macro vector-length cell+ cell@)
+ (macro vector-data 2 cells +)
+
+ (macro u8vector-length cell+ cell@)
+ (macro u8vector-data 2 cells +)
(macro require-c8string
dup get-type NC_C8STRING <> if 'WB_c8string_huh swap go-raise then)
|