/*===========================================================================*/
/*   (Llib/bexit.scm)                                                        */
/*   Bigloo (2.6b)                                                           */
/*   Inria -- Sophia Antipolis (c)       Mon Dec 15 12:14:36 CET 2003        */
/*===========================================================================*/
/* COMPILATION: (/users/serrano/prgm/project/bigloo/bin/bigloo -O4 -mklib -cc gcc-2.95 -fsharing -q -s -copt -DBGL_NO_PIC -unsafe -c Llib/bexit.scm -indent -o objs/obj_u/Llib/bexit.c)*/
/* GC selection */
#define THE_GC BOEHM_GC

#include <bigloo.h>
#include <signal.h>

BGL_EXPORTED_DECL obj_t BGl_modulezd2initializa7ationz75zz__bexitz00(long, char *);
extern obj_t BGl_modulezd2initializa7ationz75zz__errorz00(long, char *);
static obj_t BGl__unwindzd2stackzd2valuezf3zf3zz__bexitz00(obj_t, obj_t);
BGL_EXPORTED_DECL obj_t unwind_stack_until(obj_t, obj_t, obj_t, obj_t);
static obj_t BGl_za2protectedzd2valza2zd2zz__bexitz00 = BUNSPEC;
static obj_t BGl_importedzd2moduleszd2initz00zz__bexitz00();
static obj_t BGl__valzd2fromzd2exitzf3zf3zz__bexitz00(obj_t, obj_t);
static obj_t BGl__unwindzd2stackzd2untilz12z12zz__bexitz00(obj_t, obj_t, obj_t, obj_t, obj_t);
static obj_t BGl_requirezd2initializa7ationz75zz__bexitz00 = BUNSPEC;
BGL_EXPORTED_DECL obj_t BGl_unwindzd2untilz12zc0zz__bexitz00(obj_t, obj_t);
BGL_EXPORTED_DECL obj_t BGl_valzd2fromzd2exitzf3zf3zz__bexitz00(obj_t);
BGL_EXPORTED_DECL bool_t unwind_stack_value_p(obj_t);
static obj_t BGl__unwindzd2untilz12zc0zz__bexitz00(obj_t, obj_t, obj_t);
static obj_t BGl_toplevelzd2initzd2zz__bexitz00();
static obj_t *__cnst;


DEFINE_EXPORT_PROCEDURE( BGl_unwindzd2stackzd2untilz12zd2envzc0zz__bexitz00, BgL_bgl__unwindza7d2stackza7d2untilza712za712za7za7__bexitza7001703za7, BGl__unwindzd2stackzd2untilz12z12zz__bexitz00, 0L, 4 );
DEFINE_EXPORT_PROCEDURE( BGl_unwindzd2untilz12zd2envz12zz__bexitz00, BgL_bgl__unwindza7d2untilza712za7c0za7za7__bexitza7001704z00, BGl__unwindzd2untilz12zc0zz__bexitz00, 0L, 2 );
DEFINE_STRING( BGl_string1697z00zz__bexitz00, BgL_bgl_string1697za700za7za7__bexitza7001705z00, "exit out of dynamic scope", 25 );
DEFINE_STRING( BGl_string1696z00zz__bexitz00, BgL_bgl_string1696za700za7za7__bexitza7001706z00, "unwind-until!", 13 );
DEFINE_EXPORT_PROCEDURE( BGl_unwindzd2stackzd2valuezf3zd2envz21zz__bexitz00, BgL_bgl__unwindza7d2stackza7d2valueza7f3za7f3za7za7__bexitza7001707za7, BGl__unwindzd2stackzd2valuezf3zf3zz__bexitz00, 0L, 1 );
DEFINE_EXPORT_PROCEDURE( BGl_valzd2fromzd2exitzf3zd2envz21zz__bexitz00, BgL_bgl__valza7d2fromza7d2exitza7f3za7f3za7za7__bexitza7001708za7, BGl__valzd2fromzd2exitzf3zf3zz__bexitz00, 0L, 1 );



/* module-initialization */
BGL_EXPORTED_DEF obj_t BGl_modulezd2initializa7ationz75zz__bexitz00(long BgL_checksumz00_511, char * BgL_fromz00_512)
{ AN_OBJECT;
{ 
if(
CBOOL(BGl_requirezd2initializa7ationz75zz__bexitz00))
{ 
BGl_requirezd2initializa7ationz75zz__bexitz00 = 
BBOOL(((bool_t)0)); 
BGl_importedzd2moduleszd2initz00zz__bexitz00(); 
BGl_toplevelzd2initzd2zz__bexitz00(); 
return BUNSPEC;}  else 
{ 
return BUNSPEC;} } 
}



/* toplevel-init */
obj_t BGl_toplevelzd2initzd2zz__bexitz00()
{ AN_OBJECT;
{ /* ./Llib/bexit.scm 14 */
return ( 
BGl_za2protectedzd2valza2zd2zz__bexitz00 = 
MAKE_PAIR(BUNSPEC, BUNSPEC), BUNSPEC) ;} 
}



/* val-from-exit? */
BGL_EXPORTED_DEF obj_t BGl_valzd2fromzd2exitzf3zf3zz__bexitz00(obj_t BgL_valz00_1)
{ AN_OBJECT;
{ /* ./Llib/bexit.scm 80 */
{ /* ./Llib/bexit.scm 81 */
bool_t BgL_auxz00_519;
BgL_auxz00_519 = 
(BgL_valz00_1==BGl_za2protectedzd2valza2zd2zz__bexitz00); 
return 
BBOOL(BgL_auxz00_519);} } 
}



/* _val-from-exit? */
obj_t BGl__valzd2fromzd2exitzf3zf3zz__bexitz00(obj_t BgL_envz00_499, obj_t BgL_valz00_500)
{ AN_OBJECT;
{ /* ./Llib/bexit.scm 80 */
return 
BGl_valzd2fromzd2exitzf3zf3zz__bexitz00(BgL_valz00_500);} 
}



/* unwind-stack-value? */
BGL_EXPORTED_DEF bool_t unwind_stack_value_p(obj_t BgL_valz00_2)
{ AN_OBJECT;
{ /* ./Llib/bexit.scm 91 */
return 
(BgL_valz00_2==BGl_za2protectedzd2valza2zd2zz__bexitz00);} 
}



/* _unwind-stack-value? */
obj_t BGl__unwindzd2stackzd2valuezf3zf3zz__bexitz00(obj_t BgL_envz00_501, obj_t BgL_valz00_502)
{ AN_OBJECT;
{ /* ./Llib/bexit.scm 91 */
{ /* ./Llib/bexit.scm 92 */
bool_t BgL_auxz00_524;
BgL_auxz00_524 = 
unwind_stack_value_p(BgL_valz00_502); 
return 
BBOOL(BgL_auxz00_524);} } 
}



/* unwind-until! */
BGL_EXPORTED_DEF obj_t BGl_unwindzd2untilz12zc0zz__bexitz00(obj_t BgL_exitdz00_3, obj_t BgL_valz00_4)
{ AN_OBJECT;
{ /* ./Llib/bexit.scm 101 */
if(
PAIRP(BgL_exitdz00_3))
{ /* ./Llib/bexit.scm 102 */
return 
unwind_stack_until(
CAR(BgL_exitdz00_3), BFALSE, BgL_valz00_4, 
CDR(BgL_exitdz00_3));}  else 
{ /* ./Llib/bexit.scm 102 */
return 
unwind_stack_until(BgL_exitdz00_3, BFALSE, BgL_valz00_4, BFALSE);} } 
}



/* _unwind-until! */
obj_t BGl__unwindzd2untilz12zc0zz__bexitz00(obj_t BgL_envz00_503, obj_t BgL_exitdz00_504, obj_t BgL_valz00_505)
{ AN_OBJECT;
{ /* ./Llib/bexit.scm 101 */
return 
BGl_unwindzd2untilz12zc0zz__bexitz00(BgL_exitdz00_504, BgL_valz00_505);} 
}



/* unwind-stack-until! */
BGL_EXPORTED_DEF obj_t unwind_stack_until(obj_t BgL_exitdz00_5, obj_t BgL_estampz00_6, obj_t BgL_valz00_7, obj_t BgL_procz00_8)
{ AN_OBJECT;
{ /* ./Llib/bexit.scm 114 */
{ 

BgL_loopz00_314:
{ /* ./Llib/bexit.scm 116 */
bool_t BgL_test1026z00_315;
{ /* ./Llib/bexit.scm 116 */
obj_t BgL_arg1053z00_325;
BgL_arg1053z00_325 = 
BGL_EXITD_TOP(); 
BgL_test1026z00_315 = 
(BgL_arg1053z00_325==BFALSE); } 
if(BgL_test1026z00_315)
{ /* ./Llib/bexit.scm 116 */
if(
PROCEDUREP(BgL_procz00_8))
{ /* ./Llib/bexit.scm 117 */
return 
PROCEDURE_ENTRY(BgL_procz00_8)(BgL_procz00_8, BgL_valz00_7, BEOA);}  else 
{ /* ./Llib/bexit.scm 117 */
FAILURE(BGl_string1696z00zz__bexitz00,BGl_string1697z00zz__bexitz00,BUNSPEC);} }  else 
{ /* ./Llib/bexit.scm 122 */
obj_t BgL_exitzd2topzd2_317;
BgL_exitzd2topzd2_317 = 
BGL_EXITD_TOP(); 
POP_EXIT(); 
{ /* ./Llib/bexit.scm 125 */
bool_t BgL_test1032z00_318;
if(
(BgL_exitzd2topzd2_317==BgL_exitdz00_5))
{ /* ./Llib/bexit.scm 126 */
bool_t BgL__ortest_1003z00_322;
if(
INTEGERP(BgL_estampz00_6))
{ /* ./Llib/bexit.scm 126 */
BgL__ortest_1003z00_322 = ((bool_t)0); }  else 
{ /* ./Llib/bexit.scm 126 */
BgL__ortest_1003z00_322 = ((bool_t)1); } 
if(BgL__ortest_1003z00_322)
{ /* ./Llib/bexit.scm 126 */
BgL_test1032z00_318 = BgL__ortest_1003z00_322; }  else 
{ /* ./Llib/bexit.scm 127 */
obj_t BgL_arg1045z00_323;
BgL_arg1045z00_323 = 
EXITD_STAMP(BgL_exitzd2topzd2_317); 
{ /* ./Llib/bexit.scm 127 */
long BgL_auxz00_552;long BgL_auxz00_550;
BgL_auxz00_552 = 
(long)CINT(BgL_estampz00_6); 
BgL_auxz00_550 = 
(long)CINT(BgL_arg1045z00_323); 
BgL_test1032z00_318 = 
(BgL_auxz00_550==BgL_auxz00_552); } } }  else 
{ /* ./Llib/bexit.scm 125 */
BgL_test1032z00_318 = ((bool_t)0); } 
if(BgL_test1032z00_318)
{ /* ./Llib/bexit.scm 125 */
JUMP_EXIT( 
EXITD_TO_EXIT(BgL_exitzd2topzd2_317),BgL_valz00_7); }  else 
{ /* ./Llib/bexit.scm 129 */
bool_t BgL_test1034z00_319;
BgL_test1034z00_319 = 
EXITD_USERP(BgL_exitzd2topzd2_317); 
if(BgL_test1034z00_319)
{ /* ./Llib/bexit.scm 129 */
goto BgL_loopz00_314;}  else 
{ /* ./Llib/bexit.scm 129 */
{ /* ./Llib/bexit.scm 130 */
obj_t BgL_arg1037z00_320;
BgL_arg1037z00_320 = 
MAKE_PAIR(BgL_exitdz00_5, BgL_procz00_8); 
SET_CAR(BGl_za2protectedzd2valza2zd2zz__bexitz00, BgL_arg1037z00_320); } 
SET_CDR(BGl_za2protectedzd2valza2zd2zz__bexitz00, BgL_valz00_7); 
JUMP_EXIT( 
EXITD_TO_EXIT(BgL_exitzd2topzd2_317),BGl_za2protectedzd2valza2zd2zz__bexitz00); } } } } } } } 
}



/* _unwind-stack-until! */
obj_t BGl__unwindzd2stackzd2untilz12z12zz__bexitz00(obj_t BgL_envz00_506, obj_t BgL_exitdz00_507, obj_t BgL_estampz00_508, obj_t BgL_valz00_509, obj_t BgL_procz00_510)
{ AN_OBJECT;
{ /* ./Llib/bexit.scm 114 */
return 
unwind_stack_until(BgL_exitdz00_507, BgL_estampz00_508, BgL_valz00_509, BgL_procz00_510);} 
}



/* imported-modules-init */
obj_t BGl_importedzd2moduleszd2initz00zz__bexitz00()
{ AN_OBJECT;
{ /* ./Llib/bexit.scm 14 */
return 
BGl_modulezd2initializa7ationz75zz__errorz00(((long)11084), "__bexit");} 
}

