summaryrefslogtreecommitdiffstats
path: root/continue.c
diff options
context:
space:
mode:
authorThomas Bushnell <tb@debian.org>2006-10-23 23:31:59 -0700
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:35 -0800
commit906cc4f0899080f1b832af98b7ccbcc257b8a64e (patch)
tree14e3ec231debdca4da9c1a3ccc0536033c1c8a4b /continue.c
parent3d573fa54db0fdcae8b2a20356faa46c8e335206 (diff)
parent50eb784bfcf15ee3c6b0b53d747db92673395040 (diff)
downloadscm-906cc4f0899080f1b832af98b7ccbcc257b8a64e.tar.gz
scm-906cc4f0899080f1b832af98b7ccbcc257b8a64e.zip
Import Debian changes 5e3-1debian/5e3-1
scm (5e3-1) unstable; urgency=low * New upstream release. * debian/control (Architecture): Add ia64 to list of supported archs. Now everything but s390 is listed. (Closes: #335980) (Build-Depends): Require at least version 3a4 of slib. * Change to continue.h from version 5e1-2 repeated here. * Change to xgen.scm from version 5e2-4 repeated here. * Change to scm.1 from version 5e2-4 repeated here.
Diffstat (limited to 'continue.c')
-rw-r--r--continue.c44
1 files changed, 24 insertions, 20 deletions
diff --git a/continue.c b/continue.c
index ec0097b..43c5f37 100644
--- a/continue.c
+++ b/continue.c
@@ -84,6 +84,7 @@ long stack_size(start)
to `setjump(new_continuation->jmpbuf)' in order to complete the
capture of this continuation. */
+#ifndef __ia64__
CONTINUATION *make_root_continuation(stack_base)
STACKITEM *stack_base;
{
@@ -111,12 +112,12 @@ CONTINUATION *make_continuation(parent_cont)
CONTINUATION *parent_cont;
{
CONTINUATION *cont;
-#ifdef CHEAP_CONTINUATIONS
+# ifdef CHEAP_CONTINUATIONS
cont = (CONTINUATION *)malloc(sizeof(CONTINUATION));
if (!cont) return 0;
cont->length = 0;
cont->stkbse = parent_cont->stkbse;
-#else
+# else
long j;
register STACKITEM *src, *dst;
FLUSH_REGISTER_WINDOWS;
@@ -126,17 +127,18 @@ CONTINUATION *make_continuation(parent_cont)
cont->length = j;
cont->stkbse = parent_cont->stkbse;
src = cont->stkbse;
-# ifdef STACK_GROWS_UP
+# ifdef STACK_GROWS_UP
src += parent_cont->length;
-# else
+# else
src -= parent_cont->length + cont->length;
-# endif/* ndef STACK_GROWS_UP */
+# endif/* ndef STACK_GROWS_UP */
dst = (STACKITEM *)(cont + 1);
for (j = cont->length; 0 <= --j; ) *dst++ = *src++;
-#endif /* ndef CHEAP_CONTINUATIONS */
+# endif /* ndef CHEAP_CONTINUATIONS */
cont->parent = parent_cont;
return cont;
}
+#endif
/* free_continuation() is trivial, but who knows what the future
holds. */
@@ -177,40 +179,41 @@ void free_continuation(cont)
/* SCM_GROWTH is how many `long's to grow the stack by when we need room. */
#define SCM_GROWTH 100
+#ifndef __ia64__
void dynthrow(a)
long *a;
{
register CONTINUATION *cont = (CONTINUATION *)(a[0]);
long val = a[1];
-#ifndef CHEAP_CONTINUATIONS
+# ifndef CHEAP_CONTINUATIONS
register long j;
register STACKITEM *src, *dst = cont->stkbse;
-# ifdef STACK_GROWS_UP
-# ifndef hpux
+# ifdef STACK_GROWS_UP
+# ifndef hpux
if (a[2] && (a - ((long *)a[3]) < SCM_GROWTH))
puts("grow_throw: check if long growth[]; being optimized out");
-# endif
+# endif
/* if (a[2]) fprintf(stderr, " ct = %ld, dist = %ld\n", a[2], (((long *)a[3]) - a)); */
if (PTR_GE(dst + (cont->length), (STACKITEM *)&a)) grow_throw(a);
-# else
-# ifndef hpux
+# else
+# ifndef hpux
if (a[2] && (((long *)a[3]) - a < SCM_GROWTH))
puts("grow_throw: check if long growth[]; being optimized out");
-# endif
+# endif
/* if (a[2]) fprintf(stderr, " ct = %ld, dist = %ld\n", a[2], (((long *)a[3]) - a)); */
dst -= cont->length;
if (PTR_LE(dst, (STACKITEM *)&a)) grow_throw(a);
-# endif/* def STACK_GROWS_UP */
+# endif/* def STACK_GROWS_UP */
FLUSH_REGISTER_WINDOWS;
src = (STACKITEM *)(cont + 1);
for (j = cont->length;0 <= --j;) *dst++ = *src++;
-#endif /* ndef CHEAP_CONTINUATIONS */
-#ifdef SHORT_INT
+# endif /* ndef CHEAP_CONTINUATIONS */
+# ifdef SHORT_INT
thrown_value = val;
longjump(cont->jmpbuf, 1);
-#else
+# else
longjump(cont->jmpbuf, val);
-#endif
+# endif
}
/* grow_throw() grows the stack by SCM_GROWTH long words. If the
@@ -221,7 +224,7 @@ void dynthrow(a)
so the compiler won't be able to guess that the growth array isn't
all used. */
-#ifndef CHEAP_CONTINUATIONS
+# ifndef CHEAP_CONTINUATIONS
void grow_throw(a) /* Grow the stack so that there is room */
long *a; /* to copy in the continuation. Then */
{ /* retry the throw. */
@@ -233,7 +236,8 @@ void grow_throw(a) /* Grow the stack so that there is room */
growth[SCM_GROWTH-1] = sizeof growth;
dynthrow(growth);
}
-#endif /* ndef CHEAP_CONTINUATIONS */
+# endif /* ndef CHEAP_CONTINUATIONS */
+#endif
/* throw_to_continuation() restores the stack in effect when
@var{cont} was made and resumes @var{cont}'s processor state. If