static SCM
reify_partial_continuation (SCM vm,
- SCM *saved_fp, SCM *saved_sp, scm_t_uint8 *saved_ip,
+ SCM *saved_fp,
+ SCM *saved_sp,
+ scm_t_uint32 *saved_ip,
scm_i_jmp_buf *saved_registers,
scm_t_dynstack *dynstack,
scm_i_jmp_buf *current_registers)
scm_t_bits *prompt;
scm_t_dynstack_prompt_flags flags;
SCM *fp, *sp;
- scm_t_uint8 *ip;
+ scm_t_uint32 *ip;
scm_i_jmp_buf *registers;
size_t i;
#define PROMPT_KEY(top) (SCM_PACK ((top)[0]))
#define PROMPT_FP(top) ((SCM *) ((top)[1]))
#define PROMPT_SP(top) ((SCM *) ((top)[2]))
-#define PROMPT_IP(top) ((scm_t_uint8 *) ((top)[3]))
+#define PROMPT_IP(top) ((scm_t_uint32 *) ((top)[3]))
#define PROMPT_JMPBUF(top) ((scm_i_jmp_buf *) ((top)[4]))
#define WINDER_WORDS 2
scm_dynstack_push_prompt (scm_t_dynstack *dynstack,
scm_t_dynstack_prompt_flags flags,
SCM key,
- SCM *fp, SCM *sp, scm_t_uint8 *ip,
+ SCM *fp, SCM *sp, scm_t_uint32 *ip,
scm_i_jmp_buf *registers)
{
scm_t_bits *words;
scm_t_bits*
scm_dynstack_find_prompt (scm_t_dynstack *dynstack, SCM key,
scm_t_dynstack_prompt_flags *flags,
- SCM **fp, SCM **sp, scm_t_uint8 **ip,
+ SCM **fp, SCM **sp, scm_t_uint32 **ip,
scm_i_jmp_buf **registers)
{
scm_t_bits *walk;
SCM_INTERNAL void scm_dynstack_push_prompt (scm_t_dynstack *,
scm_t_dynstack_prompt_flags,
SCM key,
- SCM *fp, SCM *sp, scm_t_uint8 *ip,
+ SCM *fp, SCM *sp, scm_t_uint32 *ip,
scm_i_jmp_buf *registers);
SCM_INTERNAL void scm_dynstack_push_dynwind (scm_t_dynstack *,
SCM enter, SCM leave);
SCM_INTERNAL scm_t_bits* scm_dynstack_find_prompt (scm_t_dynstack *, SCM,
scm_t_dynstack_prompt_flags *,
- SCM **, SCM **, scm_t_uint8 **,
+ SCM **, SCM **, scm_t_uint32 **,
scm_i_jmp_buf **);
SCM_INTERNAL void scm_dynstack_wind_prompt (scm_t_dynstack *, scm_t_bits *,
SCM
scm_c_make_frame (SCM stack_holder, SCM *fp, SCM *sp,
- scm_t_uint8 *ip, scm_t_ptrdiff offset)
+ scm_t_uint32 *ip, scm_t_ptrdiff offset)
{
struct scm_frame *p = scm_gc_malloc (sizeof (struct scm_frame),
"vmframe");
struct scm_vm_frame
{
SCM *dynamic_link;
- scm_t_uint8 *return_address;
+ scm_t_uint32 *return_address;
SCM locals[1]; /* Variable-length */
};
#define SCM_FRAME_PROGRAM(fp) (SCM_FRAME_LOCAL (fp, 0))
\f
-
-/* FIXME: Replace SCM_FRAME_RETURN_ADDRESS with these. */
-#define SCM_FRAME_RTL_RETURN_ADDRESS(fp) \
- ((scm_t_uint32 *) SCM_FRAME_RETURN_ADDRESS (fp))
-#define SCM_FRAME_SET_RTL_RETURN_ADDRESS(fp, ip) \
- SCM_FRAME_SET_RETURN_ADDRESS (fp, (scm_t_uint8 *) (ip))
-
-\f
/*
* Heap frames
*/
SCM stack_holder;
SCM *fp;
SCM *sp;
- scm_t_uint8 *ip;
+ scm_t_uint32 *ip;
scm_t_ptrdiff offset;
};
#define SCM_VALIDATE_VM_FRAME(p,x) SCM_MAKE_VALIDATE (p, x, VM_FRAME_P)
SCM_API SCM scm_c_make_frame (SCM stack_holder, SCM *fp, SCM *sp,
- scm_t_uint8 *ip, scm_t_ptrdiff offset);
+ scm_t_uint32 *ip, scm_t_ptrdiff offset);
SCM_API SCM scm_frame_p (SCM obj);
SCM_API SCM scm_frame_procedure (SCM frame);
SCM_API SCM scm_frame_arguments (SCM frame);
exception. */
#define SYNC_IP() \
- vp->ip = (scm_t_uint8 *) (ip)
+ vp->ip = (ip)
#define SYNC_REGISTER() \
SYNC_IP()
SCM val = ret; \
SCM *old_fp = fp; \
VM_HANDLE_INTERRUPTS; \
- ip = SCM_FRAME_RTL_RETURN_ADDRESS (fp); \
+ ip = SCM_FRAME_RETURN_ADDRESS (fp); \
fp = vp->fp = SCM_FRAME_DYNAMIC_LINK (fp); \
/* Clear frame. */ \
old_fp[-1] = SCM_BOOL_F; \
fp = vp->fp = old_fp + proc;
SCM_FRAME_SET_DYNAMIC_LINK (fp, old_fp);
- SCM_FRAME_SET_RTL_RETURN_ADDRESS (fp, ip + 2);
+ SCM_FRAME_SET_RETURN_ADDRESS (fp, ip + 2);
RESET_FRAME (nlocals);
SCM *old_fp = fp;
VM_HANDLE_INTERRUPTS;
- ip = SCM_FRAME_RTL_RETURN_ADDRESS (fp);
+ ip = SCM_FRAME_RETURN_ADDRESS (fp);
fp = vp->fp = SCM_FRAME_DYNAMIC_LINK (fp);
/* Clear stack frame. */
LOCAL_REF (tag),
fp,
LOCAL_ADDRESS (proc_slot),
- (scm_t_uint8 *)(ip + offset),
+ ip + offset,
®isters);
NEXT (3);
}
call to vm_run; but that's currently not implemented.
*/
SCM
-scm_i_vm_capture_stack (SCM *stack_base, SCM *fp, SCM *sp, scm_t_uint8 *ra,
+scm_i_vm_capture_stack (SCM *stack_base, SCM *fp, SCM *sp, scm_t_uint32 *ra,
scm_t_dynstack *dynstack, scm_t_uint32 flags)
{
struct scm_vm_cont *p;
#define SCM_VM_NUM_ENGINES 2
struct scm_vm {
- scm_t_uint8 *ip; /* instruction pointer */
+ scm_t_uint32 *ip; /* instruction pointer */
SCM *sp; /* stack pointer */
SCM *fp; /* frame pointer */
size_t stack_size; /* stack size */
struct scm_vm_cont {
SCM *sp;
SCM *fp;
- scm_t_uint8 *ra;
+ scm_t_uint32 *ra;
scm_t_ptrdiff stack_size;
SCM *stack_base;
scm_t_ptrdiff reloc;
SCM_INTERNAL SCM scm_i_call_with_current_continuation (SCM proc);
SCM_INTERNAL SCM scm_i_capture_current_stack (void);
SCM_INTERNAL SCM scm_i_vm_capture_stack (SCM *stack_base, SCM *fp, SCM *sp,
- scm_t_uint8 *ra,
+ scm_t_uint32 *ra,
scm_t_dynstack *dynstack,
scm_t_uint32 flags);
SCM_INTERNAL void scm_i_vm_cont_print (SCM x, SCM port,