diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | generic/tclExecute.c | 8 |
2 files changed, 10 insertions, 2 deletions
@@ -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 |