summaryrefslogtreecommitdiffhomepage
path: root/chunk.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-01-07 20:03:17 +0100
committerJo-Philipp Wich <jo@mein.io>2022-01-18 10:58:11 +0100
commit725bb75b7b66dd1e0a381908e831cede0402cb6e (patch)
treeb8ee8c737198e5b5bad6b809457c59be2a7f8bb5 /chunk.c
parent6b2e79af9fe6e7d05d31245fc9049540a96d5d31 (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.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/chunk.c b/chunk.c
index ab576da..5dbd1a1 100644
--- a/chunk.c
+++ b/chunk.c
@@ -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)
{