protobuf

Check-in [3876586c85]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Corrections of SRFI-4 comprehensions
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | chicken-5
Files: files | file ages | folders
SHA3-256: 3876586c8539c9aafae96d8c4991dcaee432d22c5334c8db232c9aa4b4c6508b
User & Date: murphy 2018-08-27 14:06:04
Context
2018-08-27
20:22
Additional source dependency entries in egg file check-in: 7964a1f7ad user: murphy tags: chicken-5
14:06
Corrections of SRFI-4 comprehensions check-in: 3876586c85 user: murphy tags: chicken-5
2018-08-19
16:00
Code cosmetics check-in: da6d67bd6f user: murphy tags: chicken-5
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to srfi-4-comprehensions.scm.

23
24
25
26
27
28
29

30

31
32
33
34
35
36
37
..
47
48
49
50
51
52
53

54

55
56
57
58
59
60
61
..
71
72
73
74
75
76
77

78

79
80
81
82
83
84
85
..
95
96
97
98
99
100
101

102

103
104
105
106
107
108
109
...
119
120
121
122
123
124
125

126

127
128
129
130
131
132
133
...
143
144
145
146
147
148
149

150

151
152
153
154
155
156
157
...
167
168
169
170
171
172
173

174

175
176
177
178
179
180
181
...
191
192
193
194
195
196
197

198

199
200
201
202
203
204
205
;; CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
;; SOFTWARE.

(define-syntax u8vector-of-length-ec
  (syntax-rules ()
    [(u8vector-ec size args ... expr)
     (let ([v (make-u8vector size)])

       (do-ec (:integers i) args ... (u8vector-set! v i expr)))]))


(define-syntax u8vector-ec
  (syntax-rules ()
    [(u8vector-ec args ...)
     (list->u8vector (list-ec args ...))]))

(define-syntax :u8vector
................................................................................
    [(:u8vector cc var arg)
     (:u8vector cc var (index i) arg)]))

(define-syntax s8vector-of-length-ec
  (syntax-rules ()
    [(s8vector-ec size args ... expr)
     (let ([v (make-s8vector size)])

       (do-ec (:integers i) args ... (s8vector-set! v i expr)))]))


(define-syntax s8vector-ec
  (syntax-rules ()
    [(s8vector-ec args ...)
     (list->s8vector (list-ec args ...))]))

(define-syntax :s8vector
................................................................................
    [(:s8vector cc var arg)
     (:s8vector cc var (index i) arg)]))

(define-syntax u16vector-of-length-ec
  (syntax-rules ()
    [(u16vector-ec size args ... expr)
     (let ([v (make-u16vector size)])

       (do-ec (:integers i) args ... (u16vector-set! v i expr)))]))


(define-syntax u16vector-ec
  (syntax-rules ()
    [(u16vector-ec args ...)
     (list->u16vector (list-ec args ...))]))

(define-syntax :u16vector
................................................................................
    [(:u16vector cc var arg)
     (:u16vector cc var (index i) arg)]))

(define-syntax s16vector-of-length-ec
  (syntax-rules ()
    [(s16vector-ec size args ... expr)
     (let ([v (make-s16vector size)])

       (do-ec (:integers i) args ... (s16vector-set! v i expr)))]))


(define-syntax s16vector-ec
  (syntax-rules ()
    [(s16vector-ec args ...)
     (list->s16vector (list-ec args ...))]))

(define-syntax :s16vector
................................................................................
    [(:s16vector cc var arg)
     (:s16vector cc var (index i) arg)]))

(define-syntax u32vector-of-length-ec
  (syntax-rules ()
    [(u32vector-ec size args ... expr)
     (let ([v (make-u32vector size)])

       (do-ec (:integers i) args ... (u32vector-set! v i expr)))]))


(define-syntax u32vector-ec
  (syntax-rules ()
    [(u32vector-ec args ...)
     (list->u32vector (list-ec args ...))]))

(define-syntax :u32vector
................................................................................
    [(:u32vector cc var arg)
     (:u32vector cc var (index i) arg)]))

(define-syntax s32vector-of-length-ec
  (syntax-rules ()
    [(s32vector-ec size args ... expr)
     (let ([v (make-s32vector size)])

       (do-ec (:integers i) args ... (s32vector-set! v i expr)))]))


(define-syntax s32vector-ec
  (syntax-rules ()
    [(s32vector-ec args ...)
     (list->s32vector (list-ec args ...))]))

(define-syntax :s32vector
................................................................................
    [(:s32vector cc var arg)
     (:s32vector cc var (index i) arg)]))

(define-syntax u64vector-of-length-ec
  (syntax-rules ()
    [(u64vector-ec size args ... expr)
     (let ([v (make-u64vector size)])

       (do-ec (:integers i) args ... (u64vector-set! v i expr)))]))


(define-syntax u64vector-ec
  (syntax-rules ()
    [(u64vector-ec args ...)
     (list->u64vector (list-ec args ...))]))

(define-syntax :u64vector
................................................................................
    [(:u64vector cc var arg)
     (:u64vector cc var (index i) arg)]))

(define-syntax s64vector-of-length-ec
  (syntax-rules ()
    [(s64vector-ec size args ... expr)
     (let ([v (make-s64vector size)])

       (do-ec (:integers i) args ... (s64vector-set! v i expr)))]))


(define-syntax s64vector-ec
  (syntax-rules ()
    [(s64vector-ec args ... expr)
     (blob->s64vector/shared
      (u64vector->blob/shared
       (list->u64vector (list-ec args ... (modulo expr #x10000000000000000)))))]))







>
|
>







 







>
|
>







 







>
|
>







 







>
|
>







 







>
|
>







 







>
|
>







 







>
|
>







 







>
|
>







23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
..
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
...
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
...
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
...
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
...
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
...
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
;; CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
;; SOFTWARE.

(define-syntax u8vector-of-length-ec
  (syntax-rules ()
    [(u8vector-ec size args ... expr)
     (let ([v (make-u8vector size)])
       (do-ec (:parallel (:integers i) args ...)
         (u8vector-set! v i expr))
       v)]))

(define-syntax u8vector-ec
  (syntax-rules ()
    [(u8vector-ec args ...)
     (list->u8vector (list-ec args ...))]))

(define-syntax :u8vector
................................................................................
    [(:u8vector cc var arg)
     (:u8vector cc var (index i) arg)]))

(define-syntax s8vector-of-length-ec
  (syntax-rules ()
    [(s8vector-ec size args ... expr)
     (let ([v (make-s8vector size)])
       (do-ec (:parallel (:integers i) args ...)
         (s8vector-set! v i expr))
       v)]))

(define-syntax s8vector-ec
  (syntax-rules ()
    [(s8vector-ec args ...)
     (list->s8vector (list-ec args ...))]))

(define-syntax :s8vector
................................................................................
    [(:s8vector cc var arg)
     (:s8vector cc var (index i) arg)]))

(define-syntax u16vector-of-length-ec
  (syntax-rules ()
    [(u16vector-ec size args ... expr)
     (let ([v (make-u16vector size)])
       (do-ec (:parallel (:integers i) args ...)
         (u16vector-set! v i expr))
       v)]))

(define-syntax u16vector-ec
  (syntax-rules ()
    [(u16vector-ec args ...)
     (list->u16vector (list-ec args ...))]))

(define-syntax :u16vector
................................................................................
    [(:u16vector cc var arg)
     (:u16vector cc var (index i) arg)]))

(define-syntax s16vector-of-length-ec
  (syntax-rules ()
    [(s16vector-ec size args ... expr)
     (let ([v (make-s16vector size)])
       (do-ec (:parallel (:integers i) args ...)
         (s16vector-set! v i expr))
       v)]))

(define-syntax s16vector-ec
  (syntax-rules ()
    [(s16vector-ec args ...)
     (list->s16vector (list-ec args ...))]))

(define-syntax :s16vector
................................................................................
    [(:s16vector cc var arg)
     (:s16vector cc var (index i) arg)]))

(define-syntax u32vector-of-length-ec
  (syntax-rules ()
    [(u32vector-ec size args ... expr)
     (let ([v (make-u32vector size)])
       (do-ec (:parallel (:integers i) args ...)
         (u32vector-set! v i expr))
       v)]))

(define-syntax u32vector-ec
  (syntax-rules ()
    [(u32vector-ec args ...)
     (list->u32vector (list-ec args ...))]))

(define-syntax :u32vector
................................................................................
    [(:u32vector cc var arg)
     (:u32vector cc var (index i) arg)]))

(define-syntax s32vector-of-length-ec
  (syntax-rules ()
    [(s32vector-ec size args ... expr)
     (let ([v (make-s32vector size)])
       (do-ec (:parallel (:integers i) args ...)
         (s32vector-set! v i expr))
       v)]))

(define-syntax s32vector-ec
  (syntax-rules ()
    [(s32vector-ec args ...)
     (list->s32vector (list-ec args ...))]))

(define-syntax :s32vector
................................................................................
    [(:s32vector cc var arg)
     (:s32vector cc var (index i) arg)]))

(define-syntax u64vector-of-length-ec
  (syntax-rules ()
    [(u64vector-ec size args ... expr)
     (let ([v (make-u64vector size)])
       (do-ec (:parallel (:integers i) args ...)
         (u64vector-set! v i expr))
       v)]))

(define-syntax u64vector-ec
  (syntax-rules ()
    [(u64vector-ec args ...)
     (list->u64vector (list-ec args ...))]))

(define-syntax :u64vector
................................................................................
    [(:u64vector cc var arg)
     (:u64vector cc var (index i) arg)]))

(define-syntax s64vector-of-length-ec
  (syntax-rules ()
    [(s64vector-ec size args ... expr)
     (let ([v (make-s64vector size)])
       (do-ec (:parallel (:integers i) args ...)
         (s64vector-set! v i expr))
       v)]))

(define-syntax s64vector-ec
  (syntax-rules ()
    [(s64vector-ec args ... expr)
     (blob->s64vector/shared
      (u64vector->blob/shared
       (list->u64vector (list-ec args ... (modulo expr #x10000000000000000)))))]))