From 5d5dadc65b7ab88360b1cbcfdca8f108018fed03 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 5 Aug 2022 10:20:50 +0200 Subject: 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 --- include/ucode/program.h | 2 -- program.c | 21 --------------------- 2 files changed, 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; -} -- cgit v1.2.3