summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2016-02-02 01:33:37 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2016-02-02 01:33:37 (GMT)
commit720a69df5306e67fda2001013fdaf588e44b625e (patch)
tree6a71cbe9d267e30884b930b38c727849dafd2069
parentea7fc8092078843e371f840310fb0bbf6dc69e62 (diff)
downloadtcl-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.h11
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; \