in progress of fixing a bug in instruction elimination

This commit is contained in:
hyunghwan.chung
2017-02-06 17:53:33 +00:00
parent 60c38a1ecb
commit 62eb6db83d
4 changed files with 126 additions and 46 deletions

View File

@ -979,11 +979,11 @@ struct moo_t
#endif
};
/* TODO: stack bound check when pushing */
/* TODO: proper stack bound check when pushing */
#define MOO_STACK_PUSH(moo,v) \
do { \
(moo)->sp = (moo)->sp + 1; \
MOO_ASSERT (moo, (moo)->sp < (unsigned int)(MOO_OBJ_GET_SIZE((moo)->processor->active) - MOO_PROCESS_NAMED_INSTVARS)); \
(moo)->processor->active->slot[(moo)->sp] = v; \
} while (0)