diff options
author | Jo-Philipp Wich <jo@mein.io> | 2022-01-07 20:03:17 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2022-01-18 10:58:11 +0100 |
commit | 725bb75b7b66dd1e0a381908e831cede0402cb6e (patch) | |
tree | b8ee8c737198e5b5bad6b809457c59be2a7f8bb5 /chunk.c | |
parent | 6b2e79af9fe6e7d05d31245fc9049540a96d5d31 (diff) |
compiler, vm: use a program wide constant list
Instead of storing constant values per function, maintain a global program
wide list for all constant values within the current compilation unit.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'chunk.c')
-rw-r--r-- | chunk.c | 14 |
1 files changed, 0 insertions, 14 deletions
@@ -45,7 +45,6 @@ uc_chunk_init(uc_chunk_t *chunk) chunk->debuginfo.variables.count = 0; chunk->debuginfo.variables.entries = NULL; - uc_vallist_init(&chunk->constants); uc_vallist_init(&chunk->debuginfo.varnames); } @@ -54,7 +53,6 @@ uc_chunk_free(uc_chunk_t *chunk) { uc_vector_clear(chunk); uc_vector_clear(&chunk->ehranges); - uc_vallist_free(&chunk->constants); uc_vector_clear(&chunk->debuginfo.offsets); uc_vector_clear(&chunk->debuginfo.variables); @@ -136,18 +134,6 @@ uc_chunk_pop(uc_chunk_t *chunk) } } -uc_value_t * -uc_chunk_get_constant(uc_chunk_t *chunk, size_t idx) -{ - return uc_vallist_get(&chunk->constants, idx); -} - -ssize_t -uc_chunk_add_constant(uc_chunk_t *chunk, uc_value_t *val) -{ - return uc_vallist_add(&chunk->constants, val); -} - size_t uc_chunk_debug_get_srcpos(uc_chunk_t *chunk, size_t off) { |