summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-08-05 10:20:50 +0200
committerJo-Philipp Wich <jo@mein.io>2022-08-05 16:37:42 +0200
commit5d5dadc65b7ab88360b1cbcfdca8f108018fed03 (patch)
treea5b03e17d8f50c43692b82e060317e23894e8137
parent304995b88d4e068db43a5edb677c2d525f7b49d3 (diff)
program: remove now unused uc_program_export_lookup()
Since we track the offsets in the compiler directly now there's no need to keep this function. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--include/ucode/program.h2
-rw-r--r--program.c21
2 files changed, 0 insertions, 23 deletions
diff --git a/include/ucode/program.h b/include/ucode/program.h
index 9014ae4..19c8bdf 100644
--- a/include/ucode/program.h
+++ b/include/ucode/program.h
@@ -55,8 +55,6 @@ __hidden uc_source_t *uc_program_function_source(uc_function_t *);
__hidden size_t uc_program_function_srcpos(uc_function_t *, size_t);
__hidden void uc_program_function_free(uc_function_t *);
-__hidden ssize_t uc_program_export_lookup(uc_program_t *, uc_source_t *, uc_value_t *);
-
__hidden uc_value_t *uc_program_get_constant(uc_program_t *, size_t);
__hidden ssize_t uc_program_add_constant(uc_program_t *, uc_value_t *);
diff --git a/program.c b/program.c
index ada4cc2..f347a35 100644
--- a/program.c
+++ b/program.c
@@ -851,24 +851,3 @@ uc_program_entry(uc_program_t *program)
return (uc_function_t *)program->functions.prev;
}
-
-ssize_t
-uc_program_export_lookup(uc_program_t *program, uc_source_t *source, uc_value_t *name)
-{
- size_t i, off;
- ssize_t slot;
-
- for (i = 0, off = 0; i < program->sources.count; i++) {
- if (program->sources.entries[i] != source) {
- off += program->sources.entries[i]->exports.count;
- continue;
- }
-
- slot = uc_source_export_lookup(source, name);
-
- if (slot > -1)
- return off + slot;
- }
-
- return -1;
-}