From 6b2e79af9fe6e7d05d31245fc9049540a96d5d31 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 7 Jan 2022 19:42:12 +0100 Subject: types: add initial infrastructure for function serialization - Introduce a new "program" entity which holds the list of functions created during compilation - Instead of storing pointers to the in-memory function representation in the constant list, store the index of the function within the program's function list - When loading functions from the constant list, retrieve the function by index from the program entity Signed-off-by: Jo-Philipp Wich --- vm.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'vm.c') diff --git a/vm.c b/vm.c index e7757cd..b8cf50f 100644 --- a/vm.c +++ b/vm.c @@ -2602,6 +2602,8 @@ uc_vm_execute(uc_vm_t *vm, uc_function_t *fn, uc_value_t **retval) break; } + ucv_put(&fn->header); + return status; } -- cgit v1.2.3