protobuf

Check-in [416afe4af3]
Login

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

Overview
Comment:Support for nested generators in SRFI-4 comprehensions
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | chicken-5
Files: files | file ages | folders
SHA3-256: 416afe4af396ebf4eb84c94858580d0dd8eb9c645eb0b85f031e7ab7b4056436
User & Date: murphy 2018-08-27 22:59:53
Context
2019-05-05
11:21
CHICKEN 5.0.2 compatibility patch (thanks to Peter Bex for spotting this) check-in: 934690e320 user: murphy tags: v1.2.1, chicken-5
2018-08-27
22:59
Support for nested generators in SRFI-4 comprehensions check-in: 416afe4af3 user: murphy tags: chicken-5
20:55
New release information file check-in: d4403984d4 user: murphy tags: chicken-5
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to srfi-4-comprehensions.scm.

22
23
24
25
26
27
28
29
30

31

32
33
34
35
36
37
38
..
48
49
50
51
52
53
54
55
56

57

58
59
60
61
62
63
64
..
74
75
76
77
78
79
80
81
82

83

84
85
86
87
88
89
90
...
100
101
102
103
104
105
106
107
108

109

110
111
112
113
114
115
116
...
126
127
128
129
130
131
132
133
134

135

136
137
138
139
140
141
142
...
152
153
154
155
156
157
158
159
160

161

162
163
164
165
166
167
168
...
178
179
180
181
182
183
184
185
186

187

188
189
190
191
192
193
194
...
204
205
206
207
208
209
210
211
212

213

214
215
216
217
218
219
220
;; ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
;; 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 ...))]))

................................................................................
       ((fx+ i 1)))]
    [(: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 ...))]))

................................................................................
       ((fx+ i 1)))]
    [(: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 ...))]))

................................................................................
       ((fx+ i 1)))]
    [(: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 ...))]))

................................................................................
       ((fx+ i 1)))]
    [(: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 ...))]))

................................................................................
       ((fx+ i 1)))]
    [(: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 ...))]))

................................................................................
       ((fx+ i 1)))]
    [(: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 ...))]))

................................................................................
       ((fx+ i 1)))]
    [(: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







|
|
>
|
>







 







|
|
>
|
>







 







|
|
>
|
>







 







|
|
>
|
>







 







|
|
>
|
>







 







|
|
>
|
>







 







|
|
>
|
>







 







|
|
>
|
>







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
..
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
..
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
...
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
...
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
...
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
...
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
...
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
;; ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
;; 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)] [i 0])
       (do-ec args ...
         (begin
           (u8vector-set! v i expr)
           (set! i (+ i 1))))
       v)]))

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

................................................................................
       ((fx+ i 1)))]
    [(: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)] [i 0])
       (do-ec args ...
         (begin
           (s8vector-set! v i expr)
           (set! i (+ i 1))))
       v)]))

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

................................................................................
       ((fx+ i 1)))]
    [(: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)] [i 0])
       (do-ec args ...
         (begin
           (u16vector-set! v i expr)
           (set! i (+ i 1))))
       v)]))

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

................................................................................
       ((fx+ i 1)))]
    [(: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)] [i 0])
       (do-ec args ...
         (begin
           (s16vector-set! v i expr)
           (set! i (+ i 1))))
       v)]))

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

................................................................................
       ((fx+ i 1)))]
    [(: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)] [i 0])
       (do-ec args ...
         (begin
           (u32vector-set! v i expr)
           (set! i (+ i 1))))
       v)]))

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

................................................................................
       ((fx+ i 1)))]
    [(: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)] [i 0])
       (do-ec args ...
         (begin
           (s32vector-set! v i expr)
           (set! i (+ i 1))))
       v)]))

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

................................................................................
       ((fx+ i 1)))]
    [(: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)] [i 0])
       (do-ec args ...
         (begin
           (u64vector-set! v i expr)
           (set! i (+ i 1))))
       v)]))

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

................................................................................
       ((fx+ i 1)))]
    [(: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)] [i 0])
       (do-ec args ...
         (begin
           (s64vector-set! v i expr)
           (set! i (+ i 1))))
       v)]))

(define-syntax s64vector-ec
  (syntax-rules ()
    [(s64vector-ec args ... expr)
     (blob->s64vector/shared
      (u64vector->blob/shared