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/unwind.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/unwind.c') diff --git a/runtime/unwind.c b/runtime/unwind.c index bc8a93dc..c1362237 100644 --- a/runtime/unwind.c +++ b/runtime/unwind.c @@ -655,7 +655,7 @@ static const char *_stp_enc_lo_name[] = { "DW_EH_PE_sdata4", "DW_EH_PE_sdata8" }; -char *_stp_eh_enc_name(signed type) +static char *_stp_eh_enc_name(signed type) { static char buf[64]; int hi, low; @@ -685,7 +685,7 @@ char *_stp_eh_enc_name(signed type) /* Unwind to previous to frame. Returns 0 if successful, negative * number in case of an error. A positive return means unwinding is finished; * don't try to fallback to dumping addresses on the stack. */ -int unwind(struct unwind_frame_info *frame) +static int unwind(struct unwind_frame_info *frame) { #define FRAME_REG(r, t) (((t *)frame)[reg_info[r].offs]) const u32 *fde, *cie = NULL; -- cgit