Use same call frame struct on x86 and ppc

release
Slava Pestov 2007-10-05 17:35:51 -04:00
parent 6b0b7bebf9
commit 98c9e69e1e
4 changed files with 19 additions and 23 deletions

View File

@ -24,8 +24,8 @@ big-endian on
: next-save stack-frame bootstrap-cell - ;
: xt-save stack-frame 2 bootstrap-cells - ;
: scan-save stack-frame 3 bootstrap-cells - ;
: array-save stack-frame 4 bootstrap-cells - ;
: array-save stack-frame 3 bootstrap-cells - ;
: scan-save stack-frame 4 bootstrap-cells - ;
[
temp-reg quot-reg quot-array@ LWZ ! load array

View File

@ -65,7 +65,6 @@ DEFINE_PRIMITIVE(callstack)
size = 0;
F_CALLSTACK *callstack = allot_callstack(size);
callstack->bottom = (CELL)bottom;
memcpy(FIRST_STACK_FRAME(callstack),top,size);
dpush(tag_object(callstack));
}

View File

@ -1,21 +1,3 @@
typedef struct _F_STACK_FRAME
{
/* In compiled quotation frames, position within the array.
In compiled word frames, unused. */
CELL scan;
/* In compiled quotation frames, the quot->array slot.
In compiled word frames, unused. */
CELL array;
/* In all compiled frames, the XT on entry. */
XT xt;
/* Pointer to the next stack frame; frames are chained from
the bottom on up */
struct _F_STACK_FRAME *next;
} F_STACK_FRAME;
F_FASTCALL void save_callstack_bottom(F_STACK_FRAME *callstack_bottom);
#define FIRST_STACK_FRAME(stack) (F_STACK_FRAME *)((stack) + 1)

View File

@ -238,6 +238,21 @@ typedef struct {
CELL header;
/* tagged */
CELL length;
/* untagged */
CELL bottom;
} F_CALLSTACK;
typedef struct
{
/* In compiled quotation frames, position within the array.
In compiled word frames, unused. */
CELL scan;
/* In compiled quotation frames, the quot->array slot.
In compiled word frames, unused. */
CELL array;
/* In all compiled frames, the XT on entry. */
XT xt;
/* Frame size in bytes */
CELL size;
} F_STACK_FRAME;