change native_stack marker type to char *
This commit is contained in:
parent
d40f39962b
commit
d227c22379
|
@ -121,7 +121,7 @@ typedef struct {
|
||||||
struct pic_object *arena[PIC_ARENA_SIZE];
|
struct pic_object *arena[PIC_ARENA_SIZE];
|
||||||
int arena_idx;
|
int arena_idx;
|
||||||
|
|
||||||
pic_value *native_stack_start;
|
char *native_stack_start;
|
||||||
} pic_state;
|
} pic_state;
|
||||||
|
|
||||||
typedef pic_value (*pic_func_t)(pic_state *);
|
typedef pic_value (*pic_func_t)(pic_state *);
|
||||||
|
|
|
@ -15,7 +15,7 @@ struct pic_cont {
|
||||||
|
|
||||||
pic_block *blk;
|
pic_block *blk;
|
||||||
|
|
||||||
pic_value *stk_pos, *stk_ptr;
|
char *stk_pos, *stk_ptr;
|
||||||
size_t stk_len;
|
size_t stk_len;
|
||||||
|
|
||||||
pic_value *st_ptr;
|
pic_value *st_ptr;
|
||||||
|
|
|
@ -78,9 +78,9 @@ static void save_cont(pic_state *, struct pic_cont **);
|
||||||
static void restore_cont(pic_state *, struct pic_cont *);
|
static void restore_cont(pic_state *, struct pic_cont *);
|
||||||
|
|
||||||
static size_t
|
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)
|
*pos = (pic->native_stack_start > &t)
|
||||||
? &t
|
? &t
|
||||||
|
@ -95,7 +95,7 @@ static void
|
||||||
save_cont(pic_state *pic, struct pic_cont **c)
|
save_cont(pic_state *pic, struct pic_cont **c)
|
||||||
{
|
{
|
||||||
struct pic_cont *cont;
|
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);
|
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
|
NORETURN static void
|
||||||
restore_cont(pic_state *pic, struct pic_cont *cont)
|
restore_cont(pic_state *pic, struct pic_cont *cont)
|
||||||
{
|
{
|
||||||
pic_value v;
|
char v;
|
||||||
struct pic_cont *tmp = cont;
|
struct pic_cont *tmp = cont;
|
||||||
|
|
||||||
if (&v < pic->native_stack_start) {
|
if (&v < pic->native_stack_start) {
|
||||||
|
|
|
@ -15,7 +15,7 @@ void pic_init_core(pic_state *);
|
||||||
pic_state *
|
pic_state *
|
||||||
pic_open(int argc, char *argv[], char **envp)
|
pic_open(int argc, char *argv[], char **envp)
|
||||||
{
|
{
|
||||||
pic_value t;
|
char t;
|
||||||
|
|
||||||
pic_state *pic;
|
pic_state *pic;
|
||||||
int ai;
|
int ai;
|
||||||
|
|
Loading…
Reference in New Issue