diff options
author | Jo-Philipp Wich <jo@mein.io> | 2022-08-04 09:35:33 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2022-08-05 15:50:13 +0200 |
commit | b856602250b14a4df1180cf4bd744ce52e477046 (patch) | |
tree | fb75b457eeca7e31a85c5530dbe0f901fd1d892d /program.c | |
parent | d7d1bde7380bc17bd2621f341b5657b04f0fb118 (diff) |
program: add serialization and deserialization for module function flag
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'program.c')
-rw-r--r-- | program.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -228,6 +228,7 @@ enum { UC_FUNCTION_F_HAS_NAME = (1 << 4), UC_FUNCTION_F_HAS_VARDBG = (1 << 5), UC_FUNCTION_F_HAS_OFFSETDBG = (1 << 6), + UC_FUNCTION_F_IS_MODULE = (1 << 7), }; static void @@ -288,6 +289,9 @@ write_function(uc_function_t *func, FILE *file, bool debug) if (func->strict) flags |= UC_FUNCTION_F_IS_STRICT; + if (func->module) + flags |= UC_FUNCTION_F_IS_MODULE; + if (func->chunk.ehranges.count) flags |= UC_FUNCTION_F_HAS_EXCEPTIONS; @@ -780,6 +784,7 @@ read_function(FILE *file, uc_program_t *program, size_t idx, char **errp) func->arrow = (flags & UC_FUNCTION_F_IS_ARROW); func->vararg = (flags & UC_FUNCTION_F_IS_VARARG); func->strict = (flags & UC_FUNCTION_F_IS_STRICT); + func->module = (flags & UC_FUNCTION_F_IS_MODULE); func->nargs = nargs; func->nupvals = nupvals; |