Running version.

This commit is contained in:
C. Guy Yarvin 2014-10-11 23:40:31 -07:00
parent ecba1956ec
commit 7747a69d35
6 changed files with 33 additions and 11 deletions

View File

@ -59,7 +59,7 @@ INCLUDE=include
MDEFINES=-DU2_OS_$(OS) -DU2_OS_ENDIAN_$(ENDIAN) -D U2_LIB=\"$(LIB)\"
# NOTFORCHECKIN - restore -O2
CFLAGS= $(COSFLAGS) -g -O2 -msse3 -ffast-math \
CFLAGS= $(COSFLAGS) -O2 -msse3 -ffast-math \
-funsigned-char \
-I/usr/local/include \
-I/opt/local/include \

19
g/e.c
View File

@ -698,13 +698,28 @@ u3_ce_init(c3_o chk_o)
}
}
/* u3_ce_grab(): take out the trash.
/* u3_ce_grab(): garbage-collect the world, plus extra roots, then
*/
void
u3_ce_grab(c3_c* cap_c)
u3_ce_grab(c3_c* cap_c, u3_noun som, ...) // terminate with u3_none
{
u3_cv_mark();
u3_cm_mark();
{
va_list vap;
u3_noun tur;
va_start(vap, som);
if ( som != u3_none ) {
u3_ca_mark_noun(som);
while ( u3_none != (tur = va_arg(vap, u3_noun)) ) {
u3_ca_mark_noun(tur);
}
}
va_end(vap);
}
u3_ca_sweep(cap_c);
}

12
g/m.c
View File

@ -695,8 +695,16 @@ u3_cm_soft_top(c3_w sec_w, // timer seconds
/* Trap for ordinary nock exceptions.
*/
if ( 0 == (why = u3_cm_trap()) ) {
pro = fun_f(arg);
#if 0
{
u3_ce_grab("before", u3_none);
pro = fun_f(arg);
u3_ce_grab("after", pro, u3_none);
}
#else
pro = fun_f(arg);
#endif
/* Revert to external signal regime.
*/
_cm_signal_done();

View File

@ -24,8 +24,7 @@
void
u3_ce_init(c3_o chk_o);
/* u3_ce_grab(): garbage-collect memory.
/* u3_ce_grab(): garbage-collect the world, plus extra roots.
*/
void
u3_ce_grab(c3_c* cap_c);
u3_ce_grab(c3_c* cap_c, u3_noun som, ...); // terminate with u3_none

View File

@ -355,7 +355,7 @@ _lo_time(void)
void
u3_lo_open(void)
{
// u3_ce_grab("lo_open");
u3_ce_grab("lo_open", u3_none);
_lo_time();
}
@ -365,7 +365,7 @@ u3_lo_open(void)
void
u3_lo_shut(u3_bean inn)
{
// u3_ce_grab("lo_shut a");
// u3_ce_grab("lo_shut a", u3_none);
// process actions
//

View File

@ -334,7 +334,7 @@ main(c3_i argc,
#endif
}
u3_ce_grab("main");
u3_ce_grab("main", u3_none);
u3_lo_loop();
return 0;