summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-11-13 14:30:08 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-11-13 14:30:08 (GMT)
commit5d052711ae7530bf551da8ecc89a3aa5614ae4f2 (patch)
treed229ebdba872bbd8c9b999adaf4939b220e0be1b
parenta7eab25d59444b0aa9cce14d593da3f2bb42eddf (diff)
downloadtcl-5d052711ae7530bf551da8ecc89a3aa5614ae4f2.zip
tcl-5d052711ae7530bf551da8ecc89a3aa5614ae4f2.tar.gz
tcl-5d052711ae7530bf551da8ecc89a3aa5614ae4f2.tar.bz2
* generic/regcomp.c: Convert optst() from expensive no-op to a
cheap no-op.
-rw-r--r--ChangeLog5
-rw-r--r--generic/regcomp.c10
2 files changed, 15 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 0786d4a..74ca6c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-13 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/regcomp.c: Convert optst() from expensive no-op to a
+ cheap no-op.
+
2007-11-13 Donal K. Fellows <donal.k.fellows@man.ac.uk>
* unix/tclUnixChan.c (CreateSocketAddress): Rewrote to use the
diff --git a/generic/regcomp.c b/generic/regcomp.c
index b9169f9..7faf793 100644
--- a/generic/regcomp.c
+++ b/generic/regcomp.c
@@ -2103,6 +2103,7 @@ optst(
struct vars *v,
struct subre *t)
{
+#if 0
if (t == NULL) {
return;
}
@@ -2117,6 +2118,15 @@ optst(
if (t->right != NULL) {
optst(v, t->right);
}
+#else
+ /*
+ * DGP (2007-11-13): I assume it was the programmer's intent to
+ * eventually come back and add code above to optimize subRE trees,
+ * but the routine coded just spends effort traversing the tree and
+ * doing nothing. We can do nothing with less effort.
+ */
+ return;
+#endif
}
/*