added argument type annotations and runtime checks. To do that new opcodes were created (PUSHTYP, PUSHTYPTYP, ERROR)

This commit is contained in:
cozis
2022-08-14 16:25:47 +02:00
parent bc516f470a
commit 6bd60bc84a
18 changed files with 571 additions and 68 deletions
+6
View File
@@ -71,6 +71,12 @@ void _Error_Report2(Error *err, _Bool internal,
assert(func);
assert(line > 0);
assert(fmt);
#ifdef DEBUG
if(err->occurred != 0) {
fprintf(stderr, "Error previously reported at %s:%d (in %s) :: %s\n", err->file, err->line, err->func, err->message);
}
#endif
assert(err->occurred == 0);
err->occurred = 1;