The VM now properly aborts on critical errors
This commit is contained in:
parent
3b2359959e
commit
65af26f962
3 changed files with 43 additions and 9 deletions
|
|
@ -44,7 +44,7 @@
|
|||
#define ASSERTKA(x) assert(sfunc != NULL && (unsigned)(x) < sfunc->NumKonstA)
|
||||
#define ASSERTKS(x) assert(sfunc != NULL && (unsigned)(x) < sfunc->NumKonstS)
|
||||
|
||||
#define THROW(x)
|
||||
#define THROW(x) throw(EVMAbortException(x))
|
||||
|
||||
#define CMPJMP(test) \
|
||||
if ((test) == (a & CMP_CHECK)) { \
|
||||
|
|
@ -54,14 +54,6 @@
|
|||
pc += 1; \
|
||||
}
|
||||
|
||||
enum
|
||||
{
|
||||
X_READ_NIL,
|
||||
X_WRITE_NIL,
|
||||
X_TOO_MANY_TRIES,
|
||||
X_ARRAY_OUT_OF_BOUNDS
|
||||
};
|
||||
|
||||
#define GETADDR(a,o,x) \
|
||||
if (a == NULL) { THROW(x); } \
|
||||
ptr = (VM_SBYTE *)a + o
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue