Implement BYE

This commit is contained in:
Remko Tronçon 2022-10-01 19:54:04 +02:00
parent ebf2e1c674
commit 83fa40a3b4
3 changed files with 255 additions and 240 deletions

View file

@ -17,6 +17,7 @@
#define ERR_QUIT 0x2
#define ERR_ABORT 0x3
#define ERR_EOI 0x4
#define ERR_BYE 0x5
wasm_memory_t *memory;
wasm_table_t *table;
@ -207,6 +208,11 @@ int main(int argc, char *argv_main[]) {
assert(trap == NULL);
stopped = true;
break;
case ERR_BYE:
assert(trap != NULL);
wasm_trap_delete(trap);
stopped = true;
break;
case ERR_UNKNOWN:
assert(trap != NULL);
print_trap(trap);

File diff suppressed because it is too large Load diff

View file

@ -41,6 +41,7 @@ enum ErrorCode {
Quit = 0x2, // QUIT was called
Abort = 0x3, // ABORT or ABORT" was called
EOI = 0x4, // No more input
Bye = 0x5, // BYE was called
}
/**