diff options
author | Jo-Philipp Wich <jo@mein.io> | 2022-01-07 19:42:12 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2022-01-18 10:57:42 +0100 |
commit | 6b2e79af9fe6e7d05d31245fc9049540a96d5d31 (patch) | |
tree | 20aeea16dc72454610be5bf58e83b5070e1c6da8 /vm.c | |
parent | 0e5b273c3d25d1dce3b469f3a6865f430554e730 (diff) |
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 <jo@mein.io>
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; } |