diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2016-02-02 01:33:37 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2016-02-02 01:33:37 (GMT) |
commit | 720a69df5306e67fda2001013fdaf588e44b625e (patch) | |
tree | 6a71cbe9d267e30884b930b38c727849dafd2069 | |
parent | ea7fc8092078843e371f840310fb0bbf6dc69e62 (diff) | |
download | tcl-mig_opt2.zip tcl-mig_opt2.tar.gz tcl-mig_opt2.tar.bz2 |
replace indirect with direct jumps where possible; little effect for now, pending mods will increase the impactmig_opt2
-rw-r--r-- | generic/tclNRE.h | 11 |
1 files 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; \ |