3
3
** REBOL [R3] Language Interpreter and Run-time Environment
4
4
**
5
5
** Copyright 2012 REBOL Technologies
6
+ ** Copyright 2012-2024 Rebol Open Source Developers
6
7
** REBOL is a trademark of REBOL Technologies
7
8
**
8
9
** Licensed under the Apache License, Version 2.0 (the "License");
@@ -504,168 +505,183 @@ static REBOL_STATE Top_State; // Boot var: holds error state during boot
504
505
505
506
/***********************************************************************
506
507
**
507
- */ void Trap0 (REBCNT num )
508
+ */ REB_NORETURN void Trap0 (REBCNT num )
508
509
/*
509
510
***********************************************************************/
510
511
{
511
512
Throw_Error (Make_Error (num , 0 , 0 , 0 ));
513
+ DEAD_END ;
512
514
}
513
515
514
516
515
517
/***********************************************************************
516
518
**
517
- */ void Trap1 (REBCNT num , REBVAL * arg1 )
519
+ */ REB_NORETURN void Trap1 (REBCNT num , REBVAL * arg1 )
518
520
/*
519
521
***********************************************************************/
520
522
{
521
523
Throw_Error (Make_Error (num , arg1 , 0 , 0 ));
524
+ DEAD_END ;
522
525
}
523
526
524
527
525
528
/***********************************************************************
526
529
**
527
- */ void Trap2 (REBCNT num , REBVAL * arg1 , REBVAL * arg2 )
530
+ */ REB_NORETURN void Trap2 (REBCNT num , REBVAL * arg1 , REBVAL * arg2 )
528
531
/*
529
532
***********************************************************************/
530
533
{
531
534
Throw_Error (Make_Error (num , arg1 , arg2 , 0 ));
535
+ DEAD_END ;
532
536
}
533
537
534
538
535
539
/***********************************************************************
536
540
**
537
- */ void Trap3 (REBCNT num , REBVAL * arg1 , REBVAL * arg2 , REBVAL * arg3 )
541
+ */ REB_NORETURN void Trap3 (REBCNT num , REBVAL * arg1 , REBVAL * arg2 , REBVAL * arg3 )
538
542
/*
539
543
***********************************************************************/
540
544
{
541
545
Throw_Error (Make_Error (num , arg1 , arg2 , arg3 ));
546
+ DEAD_END ;
542
547
}
543
548
544
549
545
550
/***********************************************************************
546
551
**
547
- */ void Trap_Arg (REBVAL * arg )
552
+ */ REB_NORETURN void Trap_Arg (REBVAL * arg )
548
553
/*
549
554
***********************************************************************/
550
555
{
551
556
Trap1 (RE_INVALID_ARG , arg );
557
+ DEAD_END ;
552
558
}
553
559
554
560
555
561
/***********************************************************************
556
562
**
557
- */ void Trap_Type (REBVAL * arg )
563
+ */ REB_NORETURN void Trap_Type (REBVAL * arg )
558
564
/*
559
565
** <type> type is not allowed here
560
566
**
561
567
***********************************************************************/
562
568
{
563
569
Trap1 (RE_INVALID_TYPE , Of_Type (arg ));
570
+ DEAD_END ;
564
571
}
565
572
566
573
567
574
/***********************************************************************
568
575
**
569
- */ void Trap_Range (REBVAL * arg )
576
+ */ REB_NORETURN void Trap_Range (REBVAL * arg )
570
577
/*
571
578
** value out of range: <value>
572
579
**
573
580
***********************************************************************/
574
581
{
575
582
Trap1 (RE_OUT_OF_RANGE , arg );
583
+ DEAD_END ;
576
584
}
577
585
578
586
579
587
/***********************************************************************
580
588
**
581
- */ void Trap_Word (REBCNT num , REBCNT sym , REBVAL * arg )
589
+ */ REB_NORETURN void Trap_Word (REBCNT num , REBCNT sym , REBVAL * arg )
582
590
/*
583
591
***********************************************************************/
584
592
{
585
593
Init_Word (DS_TOP , sym );
586
594
if (arg ) Trap2 (num , DS_TOP , arg );
587
595
else Trap1 (num , DS_TOP );
596
+ DEAD_END ;
588
597
}
589
598
590
599
591
600
/***********************************************************************
592
601
**
593
- */ void Trap_Action (REBCNT type , REBCNT action )
602
+ */ REB_NORETURN void Trap_Action (REBCNT type , REBCNT action )
594
603
/*
595
604
***********************************************************************/
596
605
{
597
606
Trap2 (RE_CANNOT_USE , Get_Action_Word (action ), Get_Type (type ));
607
+ DEAD_END ;
598
608
}
599
609
600
610
601
611
/***********************************************************************
602
612
**
603
- */ void Trap_Math_Args (REBCNT type , REBCNT action )
613
+ */ REB_NORETURN void Trap_Math_Args (REBCNT type , REBCNT action )
604
614
/*
605
615
***********************************************************************/
606
616
{
607
617
Trap2 (RE_NOT_RELATED , Get_Action_Word (action ), Get_Type (type ));
618
+ DEAD_END ;
608
619
}
609
620
610
621
611
622
/***********************************************************************
612
623
**
613
- */ void Trap_Types (REBCNT errnum , REBCNT type1 , REBCNT type2 )
624
+ */ REB_NORETURN void Trap_Types (REBCNT errnum , REBCNT type1 , REBCNT type2 )
614
625
/*
615
626
***********************************************************************/
616
627
{
617
628
if (type2 != 0 ) Trap2 (errnum , Get_Type (type1 ), Get_Type (type2 ));
618
629
Trap1 (errnum , Get_Type (type1 ));
630
+ DEAD_END ;
619
631
}
620
632
621
633
622
634
/***********************************************************************
623
635
**
624
- */ void Trap_Expect (REBVAL * object , REBCNT index , REBCNT type )
636
+ */ REB_NORETURN void Trap_Expect (REBVAL * object , REBCNT index , REBCNT type )
625
637
/*
626
638
** Object field is not of expected type.
627
639
** PORT expected SCHEME of OBJECT type
628
640
**
629
641
***********************************************************************/
630
642
{
631
643
Trap3 (RE_EXPECT_TYPE , Of_Type (object ), Obj_Word (object , index ), Get_Type (type ));
644
+ DEAD_END ;
632
645
}
633
646
634
647
635
648
/***********************************************************************
636
649
**
637
- */ void Trap_Make (REBCNT type , REBVAL * spec )
650
+ */ REB_NORETURN void Trap_Make (REBCNT type , REBVAL * spec )
638
651
/*
639
652
***********************************************************************/
640
653
{
641
654
Trap2 (RE_BAD_MAKE_ARG , Get_Type (type ), spec );
655
+ DEAD_END ;
642
656
}
643
657
644
658
645
659
/***********************************************************************
646
660
**
647
- */ void Trap_Num (REBCNT err , REBCNT num )
661
+ */ REB_NORETURN void Trap_Num (REBCNT err , REBCNT num )
648
662
/*
649
663
***********************************************************************/
650
664
{
651
665
DS_PUSH_INTEGER (num );
652
666
Trap1 (err , DS_TOP );
667
+ DEAD_END ;
653
668
}
654
669
655
670
656
671
/***********************************************************************
657
672
**
658
- */ void Trap_Reflect (REBCNT type , REBVAL * arg )
673
+ */ REB_NORETURN void Trap_Reflect (REBCNT type , REBVAL * arg )
659
674
/*
660
675
***********************************************************************/
661
676
{
662
677
Trap2 (RE_CANNOT_USE , arg , Get_Type (type ));
678
+ DEAD_END ;
663
679
}
664
680
665
681
666
682
/***********************************************************************
667
683
**
668
- */ void Trap_Port (REBCNT errnum , REBSER * port , REBINT err_code )
684
+ */ REB_NORETURN void Trap_Port (REBCNT errnum , REBSER * port , REBINT err_code )
669
685
/*
670
686
***********************************************************************/
671
687
{
@@ -679,6 +695,7 @@ static REBOL_STATE Top_State; // Boot var: holds error state during boot
679
695
680
696
DS_PUSH_INTEGER (- err_code );
681
697
Trap2 (errnum , val , DS_TOP );
698
+ DEAD_END ;
682
699
}
683
700
684
701
0 commit comments