Changeset 37651 in project
- Timestamp:
- 06/06/19 10:02:55 (6 months ago)
- Location:
- release/5/record-variants
- Files:
-
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
release/5/record-variants/tags/1.1/record-variants.scm
r35591 r37651 101 101 ,(string->symbol (string-append "make-" prefix)) 102 102 (,%lambda ,slots 103 (##sys#make-structure ',original-name ,@slots)))103 (##sys#make-structure ,original-name ,@slots))) 104 104 `(,%begin)) 105 105 (,%define 106 106 ,(string->symbol (string-append prefix "?")) 107 (,%lambda (x) (##sys#structure? x ',original-name)))107 (,%lambda (x) (##sys#structure? x ,original-name))) 108 108 (,%define 109 109 ,(string->symbol (string-append "check-" prefix)) 110 110 (,%lambda (x) 111 (##core#check (##sys#check-structure x ',original-name))111 (##core#check (##sys#check-structure x ,original-name)) 112 112 x)) 113 113 ,@(let loop ((slots slots) (i 1)) … … 127 127 `(,%begin) 128 128 `(##core#check (##sys#check-structure 129 x ',original-name)))129 x ,original-name))) 130 130 ,(if unsafe? 131 131 `(##sys#setslot x ,i val) … … 139 139 `(,%begin) 140 140 `(##core#check (##sys#check-structure 141 x ',original-name)))141 x ,original-name))) 142 142 ,(if unsafe? 143 143 `(##sys#slot x ,i) … … 148 148 `(,%begin) 149 149 `(##core#check (##sys#check-structure 150 x ',original-name)))150 x ,original-name))) 151 151 ,(if unsafe? 152 152 `(##sys#slot x ,i) … … 193 193 `(,%define ,conser 194 194 (##sys#make-structure 195 ',t195 ,t 196 196 ,@(map (lambda (sname) 197 197 (if (memq sname vars) … … 200 200 slotnames))) 201 201 `(,%begin)) 202 (,%define (,pred ,x) (##sys#structure? ,x ',t))202 (,%define (,pred ,x) (##sys#structure? ,x ,t)) 203 203 ,(if checker 204 204 `(,%define (,checker ,x) 205 (##core#check (##sys#check-structure ,x ',t)))205 (##core#check (##sys#check-structure ,x ,t))) 206 206 `(,%begin)) 207 207 ,@(let loop ([slots slots] [i 1]) … … 215 215 `(,%begin) 216 216 `(##core#check 217 (##sys#check-structure ,x ',t)))217 (##sys#check-structure ,x ,t))) 218 218 ,(if unsafe? 219 219 `(##sys#slot ,x ,i) … … 224 224 `(,%begin) 225 225 `(##core#check 226 (##sys#check-structure ,x ',t)))226 (##sys#check-structure ,x ,t))) 227 227 ,(if unsafe? 228 228 `(##sys#setslot ,x ,i ,y) -
release/5/record-variants/trunk/record-variants.scm
r35591 r37651 101 101 ,(string->symbol (string-append "make-" prefix)) 102 102 (,%lambda ,slots 103 (##sys#make-structure ',original-name ,@slots)))103 (##sys#make-structure ,original-name ,@slots))) 104 104 `(,%begin)) 105 105 (,%define 106 106 ,(string->symbol (string-append prefix "?")) 107 (,%lambda (x) (##sys#structure? x ',original-name)))107 (,%lambda (x) (##sys#structure? x ,original-name))) 108 108 (,%define 109 109 ,(string->symbol (string-append "check-" prefix)) 110 110 (,%lambda (x) 111 (##core#check (##sys#check-structure x ',original-name))111 (##core#check (##sys#check-structure x ,original-name)) 112 112 x)) 113 113 ,@(let loop ((slots slots) (i 1)) … … 127 127 `(,%begin) 128 128 `(##core#check (##sys#check-structure 129 x ',original-name)))129 x ,original-name))) 130 130 ,(if unsafe? 131 131 `(##sys#setslot x ,i val) … … 139 139 `(,%begin) 140 140 `(##core#check (##sys#check-structure 141 x ',original-name)))141 x ,original-name))) 142 142 ,(if unsafe? 143 143 `(##sys#slot x ,i) … … 148 148 `(,%begin) 149 149 `(##core#check (##sys#check-structure 150 x ',original-name)))150 x ,original-name))) 151 151 ,(if unsafe? 152 152 `(##sys#slot x ,i) … … 193 193 `(,%define ,conser 194 194 (##sys#make-structure 195 ',t195 ,t 196 196 ,@(map (lambda (sname) 197 197 (if (memq sname vars) … … 200 200 slotnames))) 201 201 `(,%begin)) 202 (,%define (,pred ,x) (##sys#structure? ,x ',t))202 (,%define (,pred ,x) (##sys#structure? ,x ,t)) 203 203 ,(if checker 204 204 `(,%define (,checker ,x) 205 (##core#check (##sys#check-structure ,x ',t)))205 (##core#check (##sys#check-structure ,x ,t))) 206 206 `(,%begin)) 207 207 ,@(let loop ([slots slots] [i 1]) … … 215 215 `(,%begin) 216 216 `(##core#check 217 (##sys#check-structure ,x ',t)))217 (##sys#check-structure ,x ,t))) 218 218 ,(if unsafe? 219 219 `(##sys#slot ,x ,i) … … 224 224 `(,%begin) 225 225 `(##core#check 226 (##sys#check-structure ,x ',t)))226 (##sys#check-structure ,x ,t))) 227 227 ,(if unsafe? 228 228 `(##sys#setslot ,x ,i ,y)
Note: See TracChangeset
for help on using the changeset viewer.