From 720a69df5306e67fda2001013fdaf588e44b625e Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Tue, 2 Feb 2016 01:33:37 +0000 Subject: replace indirect with direct jumps where possible; little effect for now, pending mods will increase the impact --- generic/tclNRE.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/generic/tclNRE.h b/generic/tclNRE.h index af12f1e..db02520 100644 --- a/generic/tclNRE.h +++ b/generic/tclNRE.h @@ -87,9 +87,14 @@ typedef struct NRE_stack { return (result) #else /* no trampoline, optimized sibcalls */ -#define NRE_JUMP(interp,postProcPtr,data0,data1,data2) \ - TclNRAddCallback((interp),(postProcPtr),(data0),(data1),(data2)); \ - NRE_NEXT(TCL_OK) +#define NRE_JUMP(interp,postProcPtr,data0,data1,data2) \ + do { \ + NRE_callback *cbPtr; \ + ALLOC_CB(interp, cbPtr); \ + ++TOP_CB(interp); \ + INIT_CB(cbPtr, postProcPtr,data0,data1,data2); \ + return (postProcPtr)(cbPtr->data, interp, (result)); \ + } while (0) #define NRE_NEXT(result) \ do { /* optimized indirect sibling calls?! */ \ NRE_callback *cbPtr; \ -- cgit v0.12