diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2022-03-03 03:38:12 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2022-06-27 21:13:31 +0200 |
commit | 93d6096c8714f3c7c9450df89e812021a212b978 (patch) | |
tree | a78b81ee02cc9d7cabb28ae7eb94cdfdb337220e /filter/f-inst.h | |
parent | 4c0c507b1fabbdab557d66eb9d90a2d3c8009880 (diff) |
Filter: Implement type checks for function calls
Keep list of function parameters in f_line and use it to verify
types of arguments for function calls. Only static type checks
are implemented.
Diffstat (limited to 'filter/f-inst.h')
-rw-r--r-- | filter/f-inst.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/filter/f-inst.h b/filter/f-inst.h index df45f88e..12df40f6 100644 --- a/filter/f-inst.h +++ b/filter/f-inst.h @@ -35,12 +35,18 @@ const char *f_instruction_name_(enum f_instruction_code fi); static inline const char *f_instruction_name(enum f_instruction_code fi) { return f_instruction_name_(fi) + 3; } +struct f_arg { + struct symbol *arg; + struct f_arg *next; +}; + /* Filter structures for execution */ /* Line of instructions to be unconditionally executed one after another */ struct f_line { uint len; /* Line length */ u8 args; /* Function: Args required */ u8 vars; + struct f_arg *arg_list; struct f_line_item items[0]; /* The items themselves */ }; |