@effekt-lang/effekt 0.82.0 → 0.83.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -8
- package/bin/effekt +0 -0
- package/libraries/chez/callcc/seq0.ss +8 -9
- package/libraries/chez/callcc/tail0.ss +35 -19
- package/libraries/chez/common/effekt_primitives.ss +19 -3
- package/libraries/chez/cps/effekt.ss +180 -165
- package/libraries/chez/monadic/effekt.ss +28 -13
- package/libraries/chez/monadic/seq0.ss +8 -9
- package/libraries/common/bench.effekt +1 -0
- package/libraries/common/char.effekt +4 -4
- package/libraries/common/effekt.effekt +44 -44
- package/libraries/common/string.effekt +1 -1
- package/libraries/js/effekt_runtime.js +2 -4
- package/libraries/llvm/forward-declare-c.ll +3 -2
- package/libraries/llvm/panic.c +9 -2
- package/libraries/llvm/rts.ll +2 -4
- package/licenses/eclipse public license, version 2.0 - epl-2.0.html +3 -3
- package/licenses/mit license - mit-license.html +120 -91
- package/licenses/the bsd license - bsd-license.html +120 -91
- package/licenses/the mit license - mit.html +121 -92
- package/package.json +1 -1
|
@@ -240,7 +240,7 @@ extern def infixEq(x: Unit, y: Unit) at {}: Bool =
|
|
|
240
240
|
|
|
241
241
|
extern def infixEq(x: Int, y: Int) at {}: Bool =
|
|
242
242
|
js "${x} === ${y}"
|
|
243
|
-
chez "(
|
|
243
|
+
chez "(fx= ${x} ${y})"
|
|
244
244
|
llvm """
|
|
245
245
|
%z = icmp eq %Int ${x}, ${y}
|
|
246
246
|
%fat_z = zext i1 %z to i64
|
|
@@ -250,7 +250,7 @@ extern def infixEq(x: Int, y: Int) at {}: Bool =
|
|
|
250
250
|
|
|
251
251
|
extern def infixNeq(x: Int, y: Int) at {}: Bool =
|
|
252
252
|
js "${x} !== ${y}"
|
|
253
|
-
chez "(not (
|
|
253
|
+
chez "(not (fx= ${x} ${y}))"
|
|
254
254
|
llvm """
|
|
255
255
|
%z = icmp ne %Int ${x}, ${y}
|
|
256
256
|
%fat_z = zext i1 %z to i64
|
|
@@ -260,7 +260,7 @@ extern def infixNeq(x: Int, y: Int) at {}: Bool =
|
|
|
260
260
|
|
|
261
261
|
extern def infixEq(x: Char, y: Char) at {}: Bool =
|
|
262
262
|
js "${x} === ${y}"
|
|
263
|
-
chez "(
|
|
263
|
+
chez "(fx= ${x} ${y})"
|
|
264
264
|
llvm """
|
|
265
265
|
%z = icmp eq %Int ${x}, ${y}
|
|
266
266
|
%fat_z = zext i1 %z to i64
|
|
@@ -270,7 +270,7 @@ extern def infixEq(x: Char, y: Char) at {}: Bool =
|
|
|
270
270
|
|
|
271
271
|
extern def infixNeq(x: Char, y: Char) at {}: Bool =
|
|
272
272
|
js "${x} !== ${y}"
|
|
273
|
-
chez "(not (
|
|
273
|
+
chez "(not (fx= ${x} ${y}))"
|
|
274
274
|
llvm """
|
|
275
275
|
%z = icmp ne %Int ${x}, ${y}
|
|
276
276
|
%fat_z = zext i1 %z to i64
|
|
@@ -314,7 +314,7 @@ extern def infixNeq(x: Bool, y: Bool) at {}: Bool =
|
|
|
314
314
|
|
|
315
315
|
extern def infixEq(x: Byte, y: Byte) at {}: Bool =
|
|
316
316
|
js "${x} === ${y}"
|
|
317
|
-
chez "(
|
|
317
|
+
chez "(fx= ${x} ${y})"
|
|
318
318
|
llvm """
|
|
319
319
|
%z = icmp eq %Byte ${x}, ${y}
|
|
320
320
|
%fat_z = zext i1 %z to i64
|
|
@@ -324,7 +324,7 @@ extern def infixEq(x: Byte, y: Byte) at {}: Bool =
|
|
|
324
324
|
|
|
325
325
|
extern def infixNeq(x: Byte, y: Byte) at {}: Bool =
|
|
326
326
|
js "${x} !== ${y}"
|
|
327
|
-
chez "(not (
|
|
327
|
+
chez "(not (fx= ${x} ${y}))"
|
|
328
328
|
llvm """
|
|
329
329
|
%z = icmp ne %Byte ${x}, ${y}
|
|
330
330
|
%fat_z = zext i1 %z to i64
|
|
@@ -336,43 +336,43 @@ extern def infixNeq(x: Byte, y: Byte) at {}: Bool =
|
|
|
336
336
|
// ========
|
|
337
337
|
extern def infixPlus(x: Int, y: Int) at {}: Int =
|
|
338
338
|
js "(${x} + ${y})"
|
|
339
|
-
chez "(+ ${x} ${y})"
|
|
339
|
+
chez "(fx+ ${x} ${y})"
|
|
340
340
|
llvm "%z = add %Int ${x}, ${y} ret %Int %z"
|
|
341
341
|
|
|
342
342
|
extern def infixStar(x: Int, y: Int) at {}: Int =
|
|
343
343
|
js "(${x} * ${y})"
|
|
344
|
-
chez "(* ${x} ${y})"
|
|
344
|
+
chez "(fx* ${x} ${y})"
|
|
345
345
|
llvm "%z = mul %Int ${x}, ${y} ret %Int %z"
|
|
346
346
|
|
|
347
347
|
/// Truncating signed integer division (quotient rounded towards zero)
|
|
348
348
|
extern def infixSlash(x: Int, y: Int) at {}: Int =
|
|
349
349
|
js "Math.trunc(${x} / ${y})"
|
|
350
|
-
chez "(quotient ${x} ${y})"
|
|
350
|
+
chez "(int-quotient ${x} ${y})"
|
|
351
351
|
llvm "%z = sdiv %Int ${x}, ${y} ret %Int %z"
|
|
352
352
|
|
|
353
353
|
extern def infixMinus(x: Int, y: Int) at {}: Int =
|
|
354
354
|
js "(${x} - ${y})"
|
|
355
|
-
chez "(- ${x} ${y})"
|
|
355
|
+
chez "(fx- ${x} ${y})"
|
|
356
356
|
llvm "%z = sub %Int ${x}, ${y} ret %Int %z"
|
|
357
357
|
|
|
358
358
|
extern def mod(x: Int, y: Int) at {}: Int =
|
|
359
359
|
js "(${x} % ${y})"
|
|
360
|
-
chez "(
|
|
360
|
+
chez "(fxmodulo ${x} ${y})"
|
|
361
361
|
llvm "%z = srem %Int ${x}, ${y} ret %Int %z"
|
|
362
362
|
|
|
363
363
|
extern def infixPlus(x: Double, y: Double) at {}: Double =
|
|
364
364
|
js "(${x} + ${y})"
|
|
365
|
-
chez "(+ ${x} ${y})"
|
|
365
|
+
chez "(fl+ ${x} ${y})"
|
|
366
366
|
llvm "%z = fadd %Double ${x}, ${y} ret %Double %z"
|
|
367
367
|
|
|
368
368
|
extern def infixStar(x: Double, y: Double) at {}: Double =
|
|
369
369
|
js "(${x} * ${y})"
|
|
370
|
-
chez "(* ${x} ${y})"
|
|
370
|
+
chez "(fl* ${x} ${y})"
|
|
371
371
|
llvm "%z = fmul %Double ${x}, ${y} ret %Double %z"
|
|
372
372
|
|
|
373
373
|
extern def infixMinus(x: Double, y: Double) at {}: Double =
|
|
374
374
|
js "(${x} - ${y})"
|
|
375
|
-
chez "(- ${x} ${y})"
|
|
375
|
+
chez "(fl- ${x} ${y})"
|
|
376
376
|
llvm "%z = fsub %Double ${x}, ${y} ret %Double %z"
|
|
377
377
|
|
|
378
378
|
extern def infixSlash(x: Double, y: Double) at {}: Double =
|
|
@@ -382,27 +382,27 @@ extern def infixSlash(x: Double, y: Double) at {}: Double =
|
|
|
382
382
|
|
|
383
383
|
extern def cos(x: Double) at {}: Double =
|
|
384
384
|
js "Math.cos(${x})"
|
|
385
|
-
chez "(
|
|
385
|
+
chez "(flcos ${x})"
|
|
386
386
|
llvm "%z = call %Double @llvm.cos.f64(double ${x}) ret %Double %z"
|
|
387
387
|
|
|
388
388
|
extern def sin(x: Double) at {}: Double =
|
|
389
389
|
js "Math.sin(${x})"
|
|
390
|
-
chez "(
|
|
390
|
+
chez "(flsin ${x})"
|
|
391
391
|
llvm "%z = call %Double @llvm.sin.f64(double ${x}) ret %Double %z"
|
|
392
392
|
|
|
393
393
|
extern def atan(x: Double) at {}: Double =
|
|
394
394
|
js "Math.atan(${x})"
|
|
395
|
-
chez "(
|
|
395
|
+
chez "(flatan ${x})"
|
|
396
396
|
llvm "%z = call %Double @atan(double ${x}) ret %Double %z"
|
|
397
397
|
|
|
398
398
|
extern def tan(x: Double) at {}: Double =
|
|
399
399
|
js "Math.tan(${x})"
|
|
400
|
-
chez "(
|
|
400
|
+
chez "(fltan ${x})"
|
|
401
401
|
llvm "%z = call %Double @tan(double ${x}) ret %Double %z"
|
|
402
402
|
|
|
403
403
|
extern def sqrt(x: Double) at {}: Double =
|
|
404
404
|
js "Math.sqrt(${x})"
|
|
405
|
-
chez "(
|
|
405
|
+
chez "(flsqrt ${x})"
|
|
406
406
|
llvm "%z = call %Double @llvm.sqrt.f64(double ${x}) ret %Double %z"
|
|
407
407
|
|
|
408
408
|
def square(x: Double): Double = x * x
|
|
@@ -421,17 +421,17 @@ def abs(n: Double): Double =
|
|
|
421
421
|
|
|
422
422
|
extern def log(x: Double) at {}: Double =
|
|
423
423
|
js "Math.log(${x})"
|
|
424
|
-
chez "(
|
|
424
|
+
chez "(fllog ${x})"
|
|
425
425
|
llvm "%z = call %Double @llvm.log.f64(double ${x}) ret %Double %z"
|
|
426
426
|
|
|
427
427
|
extern def log1p(x: Double) at {}: Double =
|
|
428
428
|
js "Math.log1p(${x})"
|
|
429
|
-
chez "(
|
|
429
|
+
chez "(fllog (fl+ ${x} 1.0))"
|
|
430
430
|
llvm "%z = call %Double @log1p(double ${x}) ret %Double %z"
|
|
431
431
|
|
|
432
432
|
extern def exp(x: Double) at {}: Double =
|
|
433
433
|
js "Math.exp(${x})"
|
|
434
|
-
chez "(
|
|
434
|
+
chez "(flexp ${x})"
|
|
435
435
|
llvm "%z = call %Double @llvm.exp.f64(double ${x}) ret %Double %z"
|
|
436
436
|
|
|
437
437
|
def pow(base: Double, exponent: Int): Double = {
|
|
@@ -449,13 +449,13 @@ def pow(base: Double, exponent: Int): Double = {
|
|
|
449
449
|
|
|
450
450
|
extern def pow(base: Double, exponent: Double) at {}: Double =
|
|
451
451
|
js "Math.pow(${base}, ${exponent})"
|
|
452
|
-
chez "(
|
|
452
|
+
chez "(flexpt ${base} ${exponent})"
|
|
453
453
|
llvm "%z = call %Double @llvm.pow.f64(double ${base}, double ${exponent}) ret %Double %z"
|
|
454
454
|
|
|
455
455
|
// since we do not have "extern val", yet
|
|
456
456
|
extern def _pi() at {}: Double =
|
|
457
457
|
js "Math.PI"
|
|
458
|
-
chez "
|
|
458
|
+
chez "3.141592653589793"
|
|
459
459
|
llvm "ret double 3.14159265358979323846264338327950288419716939937510582097494459"
|
|
460
460
|
|
|
461
461
|
val PI: Double = _pi()
|
|
@@ -473,7 +473,7 @@ extern def toDouble(d: Int) at {}: Double =
|
|
|
473
473
|
|
|
474
474
|
extern def round(d: Double) at {}: Int =
|
|
475
475
|
js "Math.round(${d})"
|
|
476
|
-
chez "(flonum->fixnum (
|
|
476
|
+
chez "(flonum->fixnum (flround ${d}))"
|
|
477
477
|
llvm """
|
|
478
478
|
%i = call %Double @llvm.round.f64(double ${d})
|
|
479
479
|
%z = fptosi double %i to %Int ret %Int %z
|
|
@@ -486,7 +486,7 @@ def round(d: Double, digits: Int): Double = {
|
|
|
486
486
|
|
|
487
487
|
extern def floor(d: Double) at {}: Int =
|
|
488
488
|
js "Math.floor(${d})"
|
|
489
|
-
chez "(flonum->fixnum (
|
|
489
|
+
chez "(flonum->fixnum (flfloor ${d}))"
|
|
490
490
|
llvm """
|
|
491
491
|
%i = call %Double @llvm.floor.f64(double ${d})
|
|
492
492
|
%z = fptosi double %i to %Int ret %Int %z
|
|
@@ -494,7 +494,7 @@ extern def floor(d: Double) at {}: Int =
|
|
|
494
494
|
|
|
495
495
|
extern def ceil(d: Double) at {}: Int =
|
|
496
496
|
js "Math.ceil(${d})"
|
|
497
|
-
chez "(flonum->fixnum (
|
|
497
|
+
chez "(flonum->fixnum (flceiling ${d}))"
|
|
498
498
|
llvm """
|
|
499
499
|
%i = call %Double @llvm.ceil.f64(double ${d})
|
|
500
500
|
%z = fptosi double %i to %Int ret %Int %z
|
|
@@ -515,7 +515,7 @@ def abs(n: Int): Int =
|
|
|
515
515
|
|
|
516
516
|
extern def infixLt(x: Int, y: Int) at {}: Bool =
|
|
517
517
|
js "(${x} < ${y})"
|
|
518
|
-
chez "(< ${x} ${y})"
|
|
518
|
+
chez "(fx< ${x} ${y})"
|
|
519
519
|
llvm """
|
|
520
520
|
%z = icmp slt %Int ${x}, ${y}
|
|
521
521
|
%fat_z = zext i1 %z to i64
|
|
@@ -525,7 +525,7 @@ extern def infixLt(x: Int, y: Int) at {}: Bool =
|
|
|
525
525
|
|
|
526
526
|
extern def infixLte(x: Int, y: Int) at {}: Bool =
|
|
527
527
|
js "(${x} <= ${y})"
|
|
528
|
-
chez "(<= ${x} ${y})"
|
|
528
|
+
chez "(fx<= ${x} ${y})"
|
|
529
529
|
llvm """
|
|
530
530
|
%z = icmp sle %Int ${x}, ${y}
|
|
531
531
|
%fat_z = zext i1 %z to i64
|
|
@@ -535,7 +535,7 @@ extern def infixLte(x: Int, y: Int) at {}: Bool =
|
|
|
535
535
|
|
|
536
536
|
extern def infixGt(x: Int, y: Int) at {}: Bool =
|
|
537
537
|
js "(${x} > ${y})"
|
|
538
|
-
chez "(> ${x} ${y})"
|
|
538
|
+
chez "(fx> ${x} ${y})"
|
|
539
539
|
llvm """
|
|
540
540
|
%z = icmp sgt %Int ${x}, ${y}
|
|
541
541
|
%fat_z = zext i1 %z to i64
|
|
@@ -545,7 +545,7 @@ extern def infixGt(x: Int, y: Int) at {}: Bool =
|
|
|
545
545
|
|
|
546
546
|
extern def infixGte(x: Int, y: Int) at {}: Bool =
|
|
547
547
|
js "(${x} >= ${y})"
|
|
548
|
-
chez "(>= ${x} ${y})"
|
|
548
|
+
chez "(fx>= ${x} ${y})"
|
|
549
549
|
llvm """
|
|
550
550
|
%z = icmp sge %Int ${x}, ${y}
|
|
551
551
|
%fat_z = zext i1 %z to i64
|
|
@@ -555,15 +555,15 @@ extern def infixGte(x: Int, y: Int) at {}: Bool =
|
|
|
555
555
|
|
|
556
556
|
extern def infixEq(x: Double, y: Double) at {}: Bool =
|
|
557
557
|
js "${x} === ${y}"
|
|
558
|
-
chez "(= ${x} ${y})"
|
|
558
|
+
chez "(fl= ${x} ${y})"
|
|
559
559
|
|
|
560
560
|
extern def infixNeq(x: Double, y: Double) at {}: Bool =
|
|
561
561
|
js "${x} !== ${y}"
|
|
562
|
-
chez "(not (= ${x} ${y}))"
|
|
562
|
+
chez "(not (fl= ${x} ${y}))"
|
|
563
563
|
|
|
564
564
|
extern def infixLt(x: Double, y: Double) at {}: Bool =
|
|
565
565
|
js "(${x} < ${y})"
|
|
566
|
-
chez "(< ${x} ${y})"
|
|
566
|
+
chez "(fl< ${x} ${y})"
|
|
567
567
|
llvm """
|
|
568
568
|
%z = fcmp olt %Double ${x}, ${y}
|
|
569
569
|
%fat_z = zext i1 %z to i64
|
|
@@ -573,11 +573,11 @@ extern def infixLt(x: Double, y: Double) at {}: Bool =
|
|
|
573
573
|
|
|
574
574
|
extern def infixLte(x: Double, y: Double) at {}: Bool =
|
|
575
575
|
js "(${x} <= ${y})"
|
|
576
|
-
chez "(<= ${x} ${y})"
|
|
576
|
+
chez "(fl<= ${x} ${y})"
|
|
577
577
|
|
|
578
578
|
extern def infixGt(x: Double, y: Double) at {}: Bool =
|
|
579
579
|
js "(${x} > ${y})"
|
|
580
|
-
chez "(> ${x} ${y})"
|
|
580
|
+
chez "(fl> ${x} ${y})"
|
|
581
581
|
llvm """
|
|
582
582
|
%z = fcmp ogt %Double ${x}, ${y}
|
|
583
583
|
%fat_z = zext i1 %z to i64
|
|
@@ -587,7 +587,7 @@ extern def infixGt(x: Double, y: Double) at {}: Bool =
|
|
|
587
587
|
|
|
588
588
|
extern def infixGte(x: Double, y: Double) at {}: Bool =
|
|
589
589
|
js "(${x} >= ${y})"
|
|
590
|
-
chez "(>= ${x} ${y})"
|
|
590
|
+
chez "(fl>= ${x} ${y})"
|
|
591
591
|
|
|
592
592
|
// TODO do we really need those? if yes, move to string.effekt
|
|
593
593
|
extern def infixLt(x: String, y: String) at {}: Bool =
|
|
@@ -632,33 +632,33 @@ def infixAmpAmp { first: => Bool } { second: => Bool }: Bool =
|
|
|
632
632
|
/// Arithmetic left shift
|
|
633
633
|
extern def bitwiseShl(x: Int, y: Int) at {}: Int =
|
|
634
634
|
js "(${x} << ${y})"
|
|
635
|
-
chez "(
|
|
635
|
+
chez "(fxsll ${x} ${y})"
|
|
636
636
|
llvm "%z = shl %Int ${x}, ${y} ret %Int %z"
|
|
637
637
|
|
|
638
638
|
/// Arithmetic right shift
|
|
639
639
|
extern def bitwiseShr(x: Int, y: Int) at {}: Int =
|
|
640
640
|
js "(${x} >> ${y})"
|
|
641
|
-
chez "(
|
|
641
|
+
chez "(fxsra ${x} ${y})"
|
|
642
642
|
llvm "%z = ashr %Int ${x}, ${y} ret %Int %z"
|
|
643
643
|
|
|
644
644
|
extern def bitwiseAnd(x: Int, y: Int) at {}: Int =
|
|
645
645
|
js "(${x} & ${y})"
|
|
646
|
-
chez "(
|
|
646
|
+
chez "(fxand ${x} ${y})"
|
|
647
647
|
llvm "%z = and %Int ${x}, ${y} ret %Int %z"
|
|
648
648
|
|
|
649
649
|
extern def bitwiseOr(x: Int, y: Int) at {}: Int =
|
|
650
650
|
js "(${x} | ${y})"
|
|
651
|
-
chez "(
|
|
651
|
+
chez "(fxior ${x} ${y})"
|
|
652
652
|
llvm "%z = or %Int ${x}, ${y} ret %Int %z"
|
|
653
653
|
|
|
654
654
|
extern def bitwiseXor(x: Int, y: Int) at {}: Int =
|
|
655
655
|
js "(${x} ^ ${y})"
|
|
656
|
-
chez "(
|
|
656
|
+
chez "(fxxor ${x} ${y})"
|
|
657
657
|
llvm "%z = xor %Int ${x}, ${y} ret %Int %z"
|
|
658
658
|
|
|
659
659
|
extern def bitwiseNot(x: Int) at {}: Int =
|
|
660
660
|
js "(~${x})"
|
|
661
|
-
chez "(
|
|
661
|
+
chez "(fxnot ${x})"
|
|
662
662
|
llvm "%z = xor %Int ${x}, -1 ret %Int %z"
|
|
663
663
|
|
|
664
664
|
|
|
@@ -667,7 +667,7 @@ extern def bitwiseNot(x: Int) at {}: Int =
|
|
|
667
667
|
extern def toByte(n: Int) at {}: Byte =
|
|
668
668
|
js "(${n} & 0xFF)"
|
|
669
669
|
llvm "%z = trunc %Int ${n} to %Byte ret %Byte %z"
|
|
670
|
-
chez "(
|
|
670
|
+
chez "(fxand ${n} 255)"
|
|
671
671
|
|
|
672
672
|
extern def toInt(n: Byte) at {}: Int =
|
|
673
673
|
js "${n}"
|
|
@@ -174,7 +174,7 @@ def toInt(str: String, base: Int): Int / fail = {
|
|
|
174
174
|
/// Native versions of toInt (unused right now)
|
|
175
175
|
extern def unsafeToInt(str: String) at {}: Int =
|
|
176
176
|
js "(Number.isNaN(parseInt(${str})) ? undefined : parseInt(${str}))"
|
|
177
|
-
chez "(string->number ${str})"
|
|
177
|
+
chez "(let ([n (string->number ${str})]) (and (fixnum? n) n))"
|
|
178
178
|
|
|
179
179
|
|
|
180
180
|
/// Returns the index of the first occurrence of `sub` in `str`
|
|
@@ -130,13 +130,11 @@ function CAPTURE(body) {
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
const RETURN = (x, ks) => ks.rest.stack(x, ks.rest)
|
|
134
|
-
|
|
135
133
|
// HANDLE(ks, ks, (p, ks, k) => { STMT })
|
|
136
|
-
function RESET(prog, ks, k) {
|
|
134
|
+
function RESET(prog, ret, ks, k) {
|
|
137
135
|
const prompt = Symbol(); // gensym
|
|
138
136
|
const rest = { stack: k, prompt: ks.prompt, arena: ks.arena, rest: ks.rest }
|
|
139
|
-
return prog(prompt, { stack: null, prompt, arena: null, rest },
|
|
137
|
+
return prog(prompt, { stack: null, prompt, arena: null, rest }, ret)
|
|
140
138
|
}
|
|
141
139
|
|
|
142
140
|
function SHIFT(p, body, ks, k) {
|
|
@@ -8,8 +8,9 @@ declare void @c_io_println(%Pos)
|
|
|
8
8
|
declare %Pos @c_io_readln()
|
|
9
9
|
declare %Double @c_io_random()
|
|
10
10
|
|
|
11
|
-
declare void @hole(i8*) cold
|
|
12
|
-
declare void @duplicated_prompt() cold
|
|
11
|
+
declare void @hole(i8*) cold noreturn
|
|
12
|
+
declare void @duplicated_prompt() cold noreturn
|
|
13
|
+
declare void @unmatched_tag() cold noreturn
|
|
13
14
|
|
|
14
15
|
declare %Pos @c_ref_fresh(%Pos)
|
|
15
16
|
declare %Pos @c_ref_get(%Pos)
|
package/libraries/llvm/panic.c
CHANGED
|
@@ -7,16 +7,23 @@
|
|
|
7
7
|
// this should _morally_ be using `stderr`, but we don't tee it in tests
|
|
8
8
|
// see PR #823 & issue #815 for context
|
|
9
9
|
|
|
10
|
-
__attribute__((cold))
|
|
10
|
+
__attribute__((cold, noreturn))
|
|
11
11
|
void hole(const char* message) {
|
|
12
12
|
printf("PANIC: %s not implemented yet\n", message);
|
|
13
13
|
exit(1);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
__attribute__((cold))
|
|
16
|
+
__attribute__((cold, noreturn))
|
|
17
17
|
void duplicated_prompt() {
|
|
18
18
|
printf("PANIC: Continuation invoked itself\n");
|
|
19
19
|
exit(1);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
// Only emitted in debug builds: the backend otherwise assumes this is unreachable
|
|
23
|
+
__attribute__((cold, noreturn))
|
|
24
|
+
void unmatched_tag() {
|
|
25
|
+
printf("PANIC: no case matched the scrutinee's tag (this is a bug in the Effekt compiler)\n");
|
|
26
|
+
exit(1);
|
|
27
|
+
}
|
|
28
|
+
|
|
22
29
|
#endif
|
package/libraries/llvm/rts.ll
CHANGED
|
@@ -694,13 +694,11 @@ define private tailcc void @topLevel(%Pos %val, %Stack %stack) {
|
|
|
694
694
|
}
|
|
695
695
|
|
|
696
696
|
define private void @topLevelSharer(%Environment %environment) {
|
|
697
|
-
;
|
|
698
|
-
ret void
|
|
697
|
+
unreachable ; should never be called
|
|
699
698
|
}
|
|
700
699
|
|
|
701
700
|
define private void @topLevelEraser(%Environment %environment) {
|
|
702
|
-
;
|
|
703
|
-
ret void
|
|
701
|
+
unreachable ; should never be called
|
|
704
702
|
}
|
|
705
703
|
|
|
706
704
|
define private %Stack @withEmptyStack() {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<!doctype html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><title>Eclipse Public License 2.0 (EPL) | The Eclipse Foundation</title>
|
|
2
|
-
<meta property="og:title" content="Eclipse Public License 2.0 (EPL) | The Eclipse Foundation"><meta name=twitter:title content="Eclipse Public License 2.0 (EPL) | The Eclipse Foundation"><meta name=description content="The Eclipse Foundation provides our global community of individuals and organisations with a mature, scalable, and business-friendly environment for open source …"><meta property="og:description" content="The Eclipse Foundation provides our global community of individuals and organisations with a mature, scalable, and business-friendly environment for open source …"><meta name=twitter:description content="The Eclipse Foundation provides our global community of individuals and organisations with a mature, scalable, and business-friendly environment for open source …"><meta name=author content="Wayne Beaton"><link href=/favicon.ico rel=icon type=image/x-icon><meta property="og:image" content="https://www.eclipse.org/images/og-image-template_hu_cdf3b1afdf89db6f.png"><meta name=twitter:image content="https://www.eclipse.org/images/og-image-template_hu_cdf3b1afdf89db6f.png"><meta name=twitter:card content="summary"><meta name=twitter:site content="@eclipsefdn"><meta name=twitter:creator content="@eclipsefdn"><meta property="og:url" content="https://www.eclipse.org/legal/epl-2.0/"><meta property="og:type" content="website"><meta property="og:site_name" content="Eclipse Foundation"><meta name=keywords content="epl,epl-2.0,legal,foundation,eclipse,eclipse public license,license,licenses"><meta name=generator content="Hugo 0.144.2"><link rel=canonical href=https://www.eclipse.org/legal/epl-2.0/><link rel=alternate href=https://www.eclipse.org//legal/epl-2.0/index.xml type=application/rss+xml title><script>(function(e,t,n,s,o){e[s]=e[s]||[],e[s].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var a=t.getElementsByTagName(n)[0],i=t.createElement(n),r=s!="dataLayer"?"&l="+s:"";i.async=!0,i.src="https://www.googletagmanager.com/gtm.js?id="+o+r,a.parentNode.insertBefore(i,a)})(window,document,"script","dataLayer","GTM-5WLCZXC")</script><script>var tableClasses="table"</script><link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel=stylesheet type=text/css> <script type="module" crossorigin src="/public/assets/legal/epl-2.0/index-
|
|
3
|
-
<link rel="modulepreload" crossorigin href="/public/assets/main-
|
|
2
|
+
<meta property="og:title" content="Eclipse Public License 2.0 (EPL) | The Eclipse Foundation"><meta name=twitter:title content="Eclipse Public License 2.0 (EPL) | The Eclipse Foundation"><meta name=description content="The Eclipse Foundation provides our global community of individuals and organisations with a mature, scalable, and business-friendly environment for open source …"><meta property="og:description" content="The Eclipse Foundation provides our global community of individuals and organisations with a mature, scalable, and business-friendly environment for open source …"><meta name=twitter:description content="The Eclipse Foundation provides our global community of individuals and organisations with a mature, scalable, and business-friendly environment for open source …"><meta name=author content="Wayne Beaton"><link href=/favicon.ico rel=icon type=image/x-icon><meta property="og:image" content="https://www.eclipse.org/images/og-image-template_hu_cdf3b1afdf89db6f.png"><meta name=twitter:image content="https://www.eclipse.org/images/og-image-template_hu_cdf3b1afdf89db6f.png"><meta name=twitter:card content="summary"><meta name=twitter:site content="@eclipsefdn"><meta name=twitter:creator content="@eclipsefdn"><meta property="og:url" content="https://www.eclipse.org/legal/epl-2.0/"><meta property="og:type" content="website"><meta property="og:site_name" content="Eclipse Foundation"><meta name=keywords content="epl,epl-2.0,legal,foundation,eclipse,eclipse public license,license,licenses"><meta name=generator content="Hugo 0.144.2"><link rel=canonical href=https://www.eclipse.org/legal/epl-2.0/><link rel=alternate href=https://www.eclipse.org//legal/epl-2.0/index.xml type=application/rss+xml title><script>(function(e,t,n,s,o){e[s]=e[s]||[],e[s].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var a=t.getElementsByTagName(n)[0],i=t.createElement(n),r=s!="dataLayer"?"&l="+s:"";i.async=!0,i.src="https://www.googletagmanager.com/gtm.js?id="+o+r,a.parentNode.insertBefore(i,a)})(window,document,"script","dataLayer","GTM-5WLCZXC")</script><script>var tableClasses="table"</script><link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel=stylesheet type=text/css> <script type="module" crossorigin src="/public/assets/legal/epl-2.0/index-Dg-Qnvg1.js"></script>
|
|
3
|
+
<link rel="modulepreload" crossorigin href="/public/assets/main-CsSX9VmA.js">
|
|
4
4
|
<link rel="modulepreload" crossorigin href="/public/assets/get-body-content-D33PtpOf.js">
|
|
5
5
|
<link rel="modulepreload" crossorigin href="/public/assets/generate-body-content-BZFBJ1cI.js">
|
|
6
|
-
<link rel="stylesheet" crossorigin href="/public/assets/main-
|
|
6
|
+
<link rel="stylesheet" crossorigin href="/public/assets/main-BABG2ceX.css">
|
|
7
7
|
</head><body><noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5WLCZXC" height=0 width=0 style=display:none;visibility:hidden></iframe></noscript><a href=#main class=skip-link>Skip to content</a><div class=eclipsefdn-featured-story-banner data-publish-target=eclipse_org></div><header class="header-wrapper header-wrapper" id=header><div class="navigation-bar dark"><div class=container><div class=navigation-bar-inner><div class=navigation-bar-left><a class="focus-highlight focus-inverse" href=/><img class=navigation-bar-brand src=https://www.eclipse.org/eclipse.org-common/themes/solstice/public/images/logo/eclipse-foundation-white-orange.svg alt="Eclipse Foundation"></a></div><nav class="navigation-bar-nav hidden-xs hidden-sm"><ul><li><button type=button class="btn btn-link" data-target=join-us-menu>Join us</button></li><li><button type=button class="btn btn-link" data-target=what-we-do-menu>What we do</button></li><li><button type=button class="btn btn-link" data-target=resources-menu>Resources</button></li><li><button type=button class="btn btn-link" data-target=about-us-menu>About us</button></li></ul></nav><div class=navigation-bar-right><div class="navigation-bar-controls hidden-xs hidden-sm"><ul><li class=dropdown><a class="dropdown-toggle link-unstyled focus-highlight" tabindex=0 id=search-dropdown-toggle data-toggle=dropdown href=# aria-label=Search><i class="fa-solid fa-magnifying-glass" aria-hidden=true></i></a><form class="search-bar dropdown-menu dropdown-menu-right" aria-labelledby=search-dropdown-toggle action=https://www.eclipse.org/home/search/ method=get><input class=search-bar-input name=q placeholder=Search>
|
|
8
8
|
<button class="btn btn-link" type=submit>
|
|
9
9
|
<i class="fa-solid fa-arrow-right"></i></button></form></li><li class=dropdown><a class="dropdown-toggle focus-highlight" id=user-menu href=# data-toggle=dropdown aria-haspopup=true aria-expanded=false tabindex=0><i class="fa-regular fa-user" aria-hidden=true></i></a><ul class="dropdown-menu dropdown-menu-right" aria-labelledby=user-menu><li><a href=https://accounts.eclipse.org/user><i class="fa-solid fa-user margin-right-10" aria-hidden=true></i>
|