change native_stack marker type to char *

This commit is contained in:
Yuichi Nishiwaki 2014-03-10 01:11:01 +09:00
parent d40f39962b
commit d227c22379
4 changed files with 7 additions and 7 deletions

View File

@ -121,7 +121,7 @@ typedef struct {
struct pic_object *arena[PIC_ARENA_SIZE];
int arena_idx;
pic_value *native_stack_start;
char *native_stack_start;
} pic_state;
typedef pic_value (*pic_func_t)(pic_state *);

View File

@ -15,7 +15,7 @@ struct pic_cont {
pic_block *blk;
pic_value *stk_pos, *stk_ptr;
char *stk_pos, *stk_ptr;
size_t stk_len;
pic_value *st_ptr;

View File

@ -78,9 +78,9 @@ static void save_cont(pic_state *, struct pic_cont **);
static void restore_cont(pic_state *, struct pic_cont *);
static size_t
native_stack_length(pic_state *pic, pic_value **pos)
native_stack_length(pic_state *pic, char **pos)
{
pic_value t;
char t;
*pos = (pic->native_stack_start > &t)
? &t
@ -95,7 +95,7 @@ static void
save_cont(pic_state *pic, struct pic_cont **c)
{
struct pic_cont *cont;
pic_value *pos;
char *pos;
cont = *c = (struct pic_cont *)pic_obj_alloc(pic, sizeof(struct pic_cont), PIC_TT_CONT);
@ -142,7 +142,7 @@ native_stack_extend(pic_state *pic, struct pic_cont *cont)
NORETURN static void
restore_cont(pic_state *pic, struct pic_cont *cont)
{
pic_value v;
char v;
struct pic_cont *tmp = cont;
if (&v < pic->native_stack_start) {

View File

@ -15,7 +15,7 @@ void pic_init_core(pic_state *);
pic_state *
pic_open(int argc, char *argv[], char **envp)
{
pic_value t;
char t;
pic_state *pic;
int ai;