summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormig <mig>2011-03-01 18:24:34 (GMT)
committermig <mig>2011-03-01 18:24:34 (GMT)
commitc874b60a078337a1c19f856b6898a856af606486 (patch)
treec7f1975c2730cd7b3cc2b71d4d2a57979aa09562
parentbe81c9e32619ce659a8c2120211585938b341f21 (diff)
downloadtcl-c874b60a078337a1c19f856b6898a856af606486.zip
tcl-c874b60a078337a1c19f856b6898a856af606486.tar.gz
tcl-c874b60a078337a1c19f856b6898a856af606486.tar.bz2
* generic/tclExecute.c (TEBCresume): store local var array and constants in automatic vars to reduce indirection, slight perf increase
-rw-r--r--ChangeLog4
-rw-r--r--generic/tclExecute.c8
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index afac167..548e8183e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2011-03-01 Miguel Sofer <msofer@users.sf.net>
+ * generic/tclExecute.c (TEBCresume): store local var array and
+ constants in automatic vars to reduce indirection, slight perf
+ increase
+
* generic/tclOOCall.c (TclOODeleteContext): added missing '*' so
that trunk compiles.
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 8561bd4..e2c873e 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -2053,8 +2053,12 @@ TEBCresume(
int traceInstructions; /* Whether we are doing instruction-level
* tracing or not. */
#endif
-#define LOCAL(i) (&iPtr->varFramePtr->compiledLocals[(i)])
-#define TCONST(i) (iPtr->execEnvPtr->constants[(i)])
+
+ Var *compiledLocals = iPtr->varFramePtr->compiledLocals;
+ Tcl_Obj **constants = &iPtr->execEnvPtr->constants[0];
+
+#define LOCAL(i) (&compiledLocals[(i)])
+#define TCONST(i) (constants[(i)])
/*
* These macros are just meant to save some global variables that are not