From: Po Lu Date: Tue, 15 Aug 2023 00:59:03 +0000 (+0800) Subject: Micro-optimize GXAXIS X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a8365aa841d9ca6bafedccae0970e4a269c1e933;p=emacs.git Micro-optimize GXAXIS * src/sfnt.c (GXAXIS): Check for the availability of naxis slot elements in a single operation. --- diff --git a/src/sfnt.c b/src/sfnt.c index 57aa4e3c28e..71e7ecfde47 100644 --- a/src/sfnt.c +++ b/src/sfnt.c @@ -6635,16 +6635,19 @@ sfnt_interpret_trap (struct sfnt_interpreter *interpreter, #define GXAXIS() \ { \ uint32_t v; \ - int i; \ + int i, naxis; \ + \ + naxis = interpreter->n_axis; \ + CHECK_STACK_AVAILABLE (naxis); \ \ - for (i = 0; i < interpreter->n_axis; ++i) \ + for (i = 0; i < naxis; ++i) \ { \ if (interpreter->norm_coords) \ v = interpreter->norm_coords[i] / 4; \ else \ v = 0; \ \ - PUSH (v); \ + PUSH_UNCHECKED (v); \ } \ }