3VAL idris_b8CopyForGC(VM *vm, VAL a) {
4 VAL cl = allocate(vm, sizeof(Closure), 1);
6 cl->info.bits8 = a->info.bits8;
10VAL idris_b16CopyForGC(VM *vm, VAL a) {
11 VAL cl = allocate(vm, sizeof(Closure), 1);
13 cl->info.bits16 = a->info.bits16;
17VAL idris_b32CopyForGC(VM *vm, VAL a) {
18 VAL cl = allocate(vm, sizeof(Closure), 1);
20 cl->info.bits32 = a->info.bits32;
24VAL idris_b64CopyForGC(VM *vm, VAL a) {
25 VAL cl = allocate(vm, sizeof(Closure), 1);
27 cl->info.bits64 = a->info.bits64;
31VAL idris_b8(VM *vm, VAL a) {
32 VAL cl = allocate(vm, sizeof(Closure), 0);
34 cl->info.bits8 = (uint8_t) GETINT(a);
38VAL idris_b16(VM *vm, VAL a) {
39 VAL cl = allocate(vm, sizeof(Closure), 0);
41 cl->info.bits16 = (uint16_t) GETINT(a);
45VAL idris_b32(VM *vm, VAL a) {
46 VAL cl = allocate(vm, sizeof(Closure), 0);
48 cl->info.bits32 = (uint32_t) GETINT(a);
52VAL idris_b64(VM *vm, VAL a) {
53 VAL cl = allocate(vm, sizeof(Closure), 0);
55 cl->info.bits64 = (uint64_t) GETINT(a);
59VAL idris_castB32Int(VM *vm, VAL a) {
60 return MKINT((i_int)a->info.bits32);
63VAL idris_b8const(VM *vm, uint8_t a) {
64 VAL cl = allocate(vm, sizeof(Closure), 0);
70VAL idris_b16const(VM *vm, uint16_t a) {
71 VAL cl = allocate(vm, sizeof(Closure), 0);
77VAL idris_b32const(VM *vm, uint32_t a) {
78 VAL cl = allocate(vm, sizeof(Closure), 0);
84VAL idris_b64const(VM *vm, uint64_t a) {
85 VAL cl = allocate(vm, sizeof(Closure), 0);
91VAL idris_b8Plus(VM *vm, VAL a, VAL b) {
92 VAL cl = allocate(vm, sizeof(Closure), 0);
94 cl->info.bits8 = a->info.bits8 + b->info.bits8;
98VAL idris_b8Minus(VM *vm, VAL a, VAL b) {
99 VAL cl = allocate(vm, sizeof(Closure), 0);
101 cl->info.bits8 = a->info.bits8 - b->info.bits8;
105VAL idris_b8Times(VM *vm, VAL a, VAL b) {
106 VAL cl = allocate(vm, sizeof(Closure), 0);
108 cl->info.bits8 = a->info.bits8 * b->info.bits8;
112VAL idris_b8UDiv(VM *vm, VAL a, VAL b) {
113 VAL cl = allocate(vm, sizeof(Closure), 0);
115 cl->info.bits8 = a->info.bits8 / b->info.bits8;
119VAL idris_b8SDiv(VM *vm, VAL a, VAL b) {
120 VAL cl = allocate(vm, sizeof(Closure), 0);
122 cl->info.bits8 = (uint8_t) (((int8_t) a->info.bits8) / ((int8_t) b->info.bits8));
126VAL idris_b8URem(VM *vm, VAL a, VAL b) {
127 VAL cl = allocate(vm, sizeof(Closure), 0);
129 cl->info.bits8 = a->info.bits8 % b->info.bits8;
133VAL idris_b8SRem(VM *vm, VAL a, VAL b) {
134 VAL cl = allocate(vm, sizeof(Closure), 0);
136 cl->info.bits8 = (uint8_t) (((int8_t) a->info.bits8) % ((int8_t) b->info.bits8));
140VAL idris_b8Lt(VM *vm, VAL a, VAL b) {
141 return MKINT((i_int) (a->info.bits8 < b->info.bits8));
144VAL idris_b8Gt(VM *vm, VAL a, VAL b) {
145 return MKINT((i_int) (a->info.bits8 > b->info.bits8));
148VAL idris_b8Eq(VM *vm, VAL a, VAL b) {
149 return MKINT((i_int) (a->info.bits8 == b->info.bits8));
152VAL idris_b8Lte(VM *vm, VAL a, VAL b) {
153 return MKINT((i_int) (a->info.bits8 <= b->info.bits8));
156VAL idris_b8Gte(VM *vm, VAL a, VAL b) {
157 return MKINT((i_int) (a->info.bits8 >= b->info.bits8));
160VAL idris_b8Compl(VM *vm, VAL a) {
161 VAL cl = allocate(vm, sizeof(Closure), 0);
163 cl->info.bits8 = ~ a->info.bits8;
167VAL idris_b8And(VM *vm, VAL a, VAL b) {
168 VAL cl = allocate(vm, sizeof(Closure), 0);
170 cl->info.bits8 = a->info.bits8 & b->info.bits8;
174VAL idris_b8Or(VM *vm, VAL a, VAL b) {
175 VAL cl = allocate(vm, sizeof(Closure), 0);
177 cl->info.bits8 = a->info.bits8 | b->info.bits8;
181VAL idris_b8Xor(VM *vm, VAL a, VAL b) {
182 VAL cl = allocate(vm, sizeof(Closure), 0);
184 cl->info.bits8 = a->info.bits8 ^ b->info.bits8;
188VAL idris_b8Shl(VM *vm, VAL a, VAL b) {
189 VAL cl = allocate(vm, sizeof(Closure), 0);
191 cl->info.bits8 = a->info.bits8 << b->info.bits8;
195VAL idris_b8LShr(VM *vm, VAL a, VAL b) {
196 VAL cl = allocate(vm, sizeof(Closure), 0);
198 cl->info.bits8 = a->info.bits8 >> b->info.bits8;
202VAL idris_b8AShr(VM *vm, VAL a, VAL b) {
203 VAL cl = allocate(vm, sizeof(Closure), 0);
205 cl->info.bits8 = (uint8_t) (((int8_t)a->info.bits8) >> ((int8_t)b->info.bits8));
209VAL idris_b16Plus(VM *vm, VAL a, VAL b) {
210 VAL cl = allocate(vm, sizeof(Closure), 0);
212 cl->info.bits16 = a->info.bits16 + b->info.bits16;
216VAL idris_b16Minus(VM *vm, VAL a, VAL b) {
217 VAL cl = allocate(vm, sizeof(Closure), 0);
219 cl->info.bits16 = a->info.bits16 - b->info.bits16;
223VAL idris_b16Times(VM *vm, VAL a, VAL b) {
224 VAL cl = allocate(vm, sizeof(Closure), 0);
226 cl->info.bits16 = a->info.bits16 * b->info.bits16;
230VAL idris_b16UDiv(VM *vm, VAL a, VAL b) {
231 VAL cl = allocate(vm, sizeof(Closure), 0);
233 cl->info.bits16 = a->info.bits16 / b->info.bits16;
237VAL idris_b16SDiv(VM *vm, VAL a, VAL b) {
238 VAL cl = allocate(vm, sizeof(Closure), 0);
241 (uint16_t) (((int16_t) a->info.bits16) / ((int16_t) b->info.bits16));
245VAL idris_b16URem(VM *vm, VAL a, VAL b) {
246 VAL cl = allocate(vm, sizeof(Closure), 0);
248 cl->info.bits16 = a->info.bits16 % b->info.bits16;
252VAL idris_b16SRem(VM *vm, VAL a, VAL b) {
253 VAL cl = allocate(vm, sizeof(Closure), 0);
256 (uint16_t) (((int16_t) a->info.bits16) % ((int16_t) b->info.bits16));
260VAL idris_b16Lt(VM *vm, VAL a, VAL b) {
261 return MKINT((i_int) (a->info.bits16 < b->info.bits16));
264VAL idris_b16Gt(VM *vm, VAL a, VAL b) {
265 return MKINT((i_int) (a->info.bits16 > b->info.bits16));
268VAL idris_b16Eq(VM *vm, VAL a, VAL b) {
269 return MKINT((i_int) (a->info.bits16 == b->info.bits16));
272VAL idris_b16Lte(VM *vm, VAL a, VAL b) {
273 return MKINT((i_int) (a->info.bits16 <= b->info.bits16));
276VAL idris_b16Gte(VM *vm, VAL a, VAL b) {
277 return MKINT((i_int) (a->info.bits16 >= b->info.bits16));
280VAL idris_b16Compl(VM *vm, VAL a) {
281 VAL cl = allocate(vm, sizeof(Closure), 0);
283 cl->info.bits16 = ~ a->info.bits16;
287VAL idris_b16And(VM *vm, VAL a, VAL b) {
288 VAL cl = allocate(vm, sizeof(Closure), 0);
290 cl->info.bits16 = a->info.bits16 & b->info.bits16;
294VAL idris_b16Or(VM *vm, VAL a, VAL b) {
295 VAL cl = allocate(vm, sizeof(Closure), 0);
297 cl->info.bits16 = a->info.bits16 | b->info.bits16;
301VAL idris_b16Xor(VM *vm, VAL a, VAL b) {
302 VAL cl = allocate(vm, sizeof(Closure), 0);
304 cl->info.bits16 = a->info.bits16 ^ b->info.bits16;
308VAL idris_b16Shl(VM *vm, VAL a, VAL b) {
309 VAL cl = allocate(vm, sizeof(Closure), 0);
311 cl->info.bits16 = a->info.bits16 << b->info.bits16;
315VAL idris_b16LShr(VM *vm, VAL a, VAL b) {
316 VAL cl = allocate(vm, sizeof(Closure), 0);
318 cl->info.bits16 = a->info.bits16 >> b->info.bits16;
322VAL idris_b16AShr(VM *vm, VAL a, VAL b) {
323 VAL cl = allocate(vm, sizeof(Closure), 0);
325 cl->info.bits16 = (uint16_t) (((int16_t)a->info.bits16) >> ((int16_t)b->info.bits16));
329VAL idris_b32Plus(VM *vm, VAL a, VAL b) {
330 VAL cl = allocate(vm, sizeof(Closure), 0);
332 cl->info.bits32 = a->info.bits32 + b->info.bits32;
336VAL idris_b32Minus(VM *vm, VAL a, VAL b) {
337 VAL cl = allocate(vm, sizeof(Closure), 0);
339 cl->info.bits32 = a->info.bits32 - b->info.bits32;
343VAL idris_b32Times(VM *vm, VAL a, VAL b) {
344 VAL cl = allocate(vm, sizeof(Closure), 0);
346 cl->info.bits32 = a->info.bits32 * b->info.bits32;
350VAL idris_b32UDiv(VM *vm, VAL a, VAL b) {
351 VAL cl = allocate(vm, sizeof(Closure), 0);
353 cl->info.bits32 = a->info.bits32 / b->info.bits32;
357VAL idris_b32SDiv(VM *vm, VAL a, VAL b) {
358 VAL cl = allocate(vm, sizeof(Closure), 0);
361 (uint32_t) (((int32_t) a->info.bits32) / ((int32_t) b->info.bits32));
365VAL idris_b32URem(VM *vm, VAL a, VAL b) {
366 VAL cl = allocate(vm, sizeof(Closure), 0);
368 cl->info.bits32 = a->info.bits32 % b->info.bits32;
372VAL idris_b32SRem(VM *vm, VAL a, VAL b) {
373 VAL cl = allocate(vm, sizeof(Closure), 0);
376 (uint32_t) (((int32_t) a->info.bits32) % ((int32_t) b->info.bits32));
380VAL idris_b32Lt(VM *vm, VAL a, VAL b) {
381 return MKINT((i_int) (a->info.bits32 < b->info.bits32));
384VAL idris_b32Gt(VM *vm, VAL a, VAL b) {
385 return MKINT((i_int) (a->info.bits32 > b->info.bits32));
388VAL idris_b32Eq(VM *vm, VAL a, VAL b) {
389 return MKINT((i_int) (a->info.bits32 == b->info.bits32));
392VAL idris_b32Lte(VM *vm, VAL a, VAL b) {
393 return MKINT((i_int) (a->info.bits32 <= b->info.bits32));
396VAL idris_b32Gte(VM *vm, VAL a, VAL b) {
397 return MKINT((i_int) (a->info.bits32 >= b->info.bits32));
400VAL idris_b32Compl(VM *vm, VAL a) {
401 VAL cl = allocate(vm, sizeof(Closure), 0);
403 cl->info.bits32 = ~ a->info.bits32;
407VAL idris_b32And(VM *vm, VAL a, VAL b) {
408 VAL cl = allocate(vm, sizeof(Closure), 0);
410 cl->info.bits32 = a->info.bits32 & b->info.bits32;
414VAL idris_b32Or(VM *vm, VAL a, VAL b) {
415 VAL cl = allocate(vm, sizeof(Closure), 0);
417 cl->info.bits32 = a->info.bits32 | b->info.bits32;
421VAL idris_b32Xor(VM *vm, VAL a, VAL b) {
422 VAL cl = allocate(vm, sizeof(Closure), 0);
424 cl->info.bits32 = a->info.bits32 ^ b->info.bits32;
428VAL idris_b32Shl(VM *vm, VAL a, VAL b) {
429 VAL cl = allocate(vm, sizeof(Closure), 0);
431 cl->info.bits32 = a->info.bits32 << b->info.bits32;
435VAL idris_b32LShr(VM *vm, VAL a, VAL b) {
436 VAL cl = allocate(vm, sizeof(Closure), 0);
438 cl->info.bits32 = a->info.bits32 >> b->info.bits32;
442VAL idris_b32AShr(VM *vm, VAL a, VAL b) {
443 VAL cl = allocate(vm, sizeof(Closure), 0);
445 cl->info.bits32 = (uint32_t) (((int32_t)a->info.bits32) >> ((int32_t)b->info.bits32));
449VAL idris_b64Plus(VM *vm, VAL a, VAL b) {
450 VAL cl = allocate(vm, sizeof(Closure), 0);
452 cl->info.bits64 = a->info.bits64 + b->info.bits64;
456VAL idris_b64Minus(VM *vm, VAL a, VAL b) {
457 VAL cl = allocate(vm, sizeof(Closure), 0);
459 cl->info.bits64 = a->info.bits64 - b->info.bits64;
463VAL idris_b64Times(VM *vm, VAL a, VAL b) {
464 VAL cl = allocate(vm, sizeof(Closure), 0);
466 cl->info.bits64 = a->info.bits64 * b->info.bits64;
470VAL idris_b64UDiv(VM *vm, VAL a, VAL b) {
471 VAL cl = allocate(vm, sizeof(Closure), 0);
473 cl->info.bits64 = a->info.bits64 / b->info.bits64;
477VAL idris_b64SDiv(VM *vm, VAL a, VAL b) {
478 VAL cl = allocate(vm, sizeof(Closure), 0);
481 (uint64_t) (((int64_t) a->info.bits64) / ((int64_t) b->info.bits64));
485VAL idris_b64URem(VM *vm, VAL a, VAL b) {
486 VAL cl = allocate(vm, sizeof(Closure), 0);
488 cl->info.bits64 = a->info.bits64 % b->info.bits64;
492VAL idris_b64SRem(VM *vm, VAL a, VAL b) {
493 VAL cl = allocate(vm, sizeof(Closure), 0);
496 (uint64_t) (((int64_t) a->info.bits64) % ((int64_t) b->info.bits64));
500VAL idris_b64Lt(VM *vm, VAL a, VAL b) {
501 return MKINT((i_int) (a->info.bits64 < b->info.bits64));
504VAL idris_b64Gt(VM *vm, VAL a, VAL b) {
505 return MKINT((i_int) (a->info.bits64 > b->info.bits64));
508VAL idris_b64Eq(VM *vm, VAL a, VAL b) {
509 return MKINT((i_int) (a->info.bits64 == b->info.bits64));
512VAL idris_b64Lte(VM *vm, VAL a, VAL b) {
513 return MKINT((i_int) (a->info.bits64 <= b->info.bits64));
516VAL idris_b64Gte(VM *vm, VAL a, VAL b) {
517 return MKINT((i_int) (a->info.bits64 >= b->info.bits64));
520VAL idris_b64Compl(VM *vm, VAL a) {
521 VAL cl = allocate(vm, sizeof(Closure), 0);
523 cl->info.bits64 = ~ a->info.bits64;
527VAL idris_b64And(VM *vm, VAL a, VAL b) {
528 VAL cl = allocate(vm, sizeof(Closure), 0);
530 cl->info.bits64 = a->info.bits64 & b->info.bits64;
534VAL idris_b64Or(VM *vm, VAL a, VAL b) {
535 VAL cl = allocate(vm, sizeof(Closure), 0);
537 cl->info.bits64 = a->info.bits64 | b->info.bits64;
541VAL idris_b64Xor(VM *vm, VAL a, VAL b) {
542 VAL cl = allocate(vm, sizeof(Closure), 0);
544 cl->info.bits64 = a->info.bits64 ^ b->info.bits64;
548VAL idris_b64Shl(VM *vm, VAL a, VAL b) {
549 VAL cl = allocate(vm, sizeof(Closure), 0);
551 cl->info.bits64 = a->info.bits64 << b->info.bits64;
555VAL idris_b64LShr(VM *vm, VAL a, VAL b) {
556 VAL cl = allocate(vm, sizeof(Closure), 0);
558 cl->info.bits64 = a->info.bits64 >> b->info.bits64;
562VAL idris_b64AShr(VM *vm, VAL a, VAL b) {
563 VAL cl = allocate(vm, sizeof(Closure), 0);
565 cl->info.bits64 = (uint64_t) (((int64_t)a->info.bits64) >> ((int64_t)b->info.bits64));
569VAL idris_b8Z16(VM *vm, VAL a) {
570 VAL cl = allocate(vm, sizeof(Closure), 0);
572 cl->info.bits16 = (uint16_t) a->info.bits8;
576VAL idris_b8Z32(VM *vm, VAL a) {
577 VAL cl = allocate(vm, sizeof(Closure), 0);
579 cl->info.bits32 = (uint32_t) a->info.bits8;
583VAL idris_b8Z64(VM *vm, VAL a) {
584 VAL cl = allocate(vm, sizeof(Closure), 0);
586 cl->info.bits64 = (uint64_t) a->info.bits8;
590VAL idris_b8S16(VM *vm, VAL a) {
591 VAL cl = allocate(vm, sizeof(Closure), 0);
593 cl->info.bits16 = (uint16_t) (int16_t) (int8_t) a->info.bits8;
597VAL idris_b8S32(VM *vm, VAL a) {
598 VAL cl = allocate(vm, sizeof(Closure), 0);
600 cl->info.bits32 = (uint32_t) (int32_t) (int8_t) a->info.bits8;
604VAL idris_b8S64(VM *vm, VAL a) {
605 VAL cl = allocate(vm, sizeof(Closure), 0);
607 cl->info.bits64 = (uint64_t) (int64_t) (int8_t) a->info.bits8;
611VAL idris_b16Z32(VM *vm, VAL a) {
612 VAL cl = allocate(vm, sizeof(Closure), 0);
614 cl->info.bits32 = (uint32_t) a->info.bits16;
618VAL idris_b16Z64(VM *vm, VAL a) {
619 VAL cl = allocate(vm, sizeof(Closure), 0);
621 cl->info.bits64 = (uint64_t) a->info.bits16;
625VAL idris_b16S32(VM *vm, VAL a) {
626 VAL cl = allocate(vm, sizeof(Closure), 0);
628 cl->info.bits32 = (uint32_t) (int32_t) (int16_t) a->info.bits16;
632VAL idris_b16S64(VM *vm, VAL a) {
633 VAL cl = allocate(vm, sizeof(Closure), 0);
635 cl->info.bits64 = (uint64_t) (int64_t) (int16_t) a->info.bits16;
639VAL idris_b16T8(VM *vm, VAL a) {
640 VAL cl = allocate(vm, sizeof(Closure), 0);
642 cl->info.bits8 = (uint8_t) a->info.bits16;
646VAL idris_b32Z64(VM *vm, VAL a) {
647 VAL cl = allocate(vm, sizeof(Closure), 0);
649 cl->info.bits64 = (uint64_t) a->info.bits32;
653VAL idris_b32S64(VM *vm, VAL a) {
654 VAL cl = allocate(vm, sizeof(Closure), 0);
656 cl->info.bits64 = (uint64_t) (int64_t) (int32_t) a->info.bits32;
660VAL idris_b32T8(VM *vm, VAL a) {
661 VAL cl = allocate(vm, sizeof(Closure), 0);
663 cl->info.bits8 = (uint8_t) a->info.bits32;
667VAL idris_b32T16(VM *vm, VAL a) {
668 VAL cl = allocate(vm, sizeof(Closure), 0);
670 cl->info.bits16 = (uint16_t) a->info.bits32;
674VAL idris_b64T8(VM *vm, VAL a) {
675 VAL cl = allocate(vm, sizeof(Closure), 0);
677 cl->info.bits8 = (uint8_t) a->info.bits64;
681VAL idris_b64T16(VM *vm, VAL a) {
682 VAL cl = allocate(vm, sizeof(Closure), 0);
684 cl->info.bits16 = (uint16_t) a->info.bits64;
688VAL idris_b64T32(VM *vm, VAL a) {
689 VAL cl = allocate(vm, sizeof(Closure), 0);
691 cl->info.bits32 = (uint32_t) a->info.bits64;
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list