From 4c2732a1dad1de295c9219ee3afac007b2d7ba05 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 28 Jan 2009 14:36:08 -0800 Subject: Use 'static' as much as possible This change just inserts 'static' on runtime, tapset, and generated C functions and globals, so the compiler can do a better job of optimizing. My tests with small scripts show ~10% reduction in compile time and ~20% reduction in module size. Larger scripts may show less benefit, but I expect purely positive results. --- runtime/addr-map.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime/addr-map.c') diff --git a/runtime/addr-map.c b/runtime/addr-map.c index 706da454..e898044f 100644 --- a/runtime/addr-map.c +++ b/runtime/addr-map.c @@ -30,7 +30,7 @@ struct addr_map static DEFINE_SPINLOCK(addr_map_lock); -struct addr_map* blackmap; +static struct addr_map* blackmap; /* Find address of entry where we can insert a new one. */ static size_t @@ -88,7 +88,7 @@ lookup_addr_aux(unsigned long addr, struct addr_map* map) return 0; } -int +static int lookup_bad_addr(unsigned long addr) { struct addr_map_entry* result = 0; @@ -102,7 +102,7 @@ lookup_bad_addr(unsigned long addr) } -int +static int add_bad_addr_entry(unsigned long min_addr, unsigned long max_addr, struct addr_map_entry** existing_min, struct addr_map_entry** existing_max) @@ -181,7 +181,7 @@ add_bad_addr_entry(unsigned long min_addr, unsigned long max_addr, return 0; } -void +static void delete_bad_addr_entry(struct addr_map_entry* entry) { } -- cgit