]> granicus.if.org Git - re2c/commitdiff
Removed useless statistics counter.
authorUlya Trofimovich <skvadrik@gmail.com>
Tue, 10 Mar 2015 21:33:13 +0000 (21:33 +0000)
committerUlya Trofimovich <skvadrik@gmail.com>
Tue, 10 Mar 2015 21:33:13 +0000 (21:33 +0000)
Verified with 'assert (dSpans >= lTargets);'

re2c/code.cc

index 9d7fd2a3a349b213158c68e63ce713a303fe8cbb..842cec941b3af7aa2fbc5811f8ba6ab6a3914430 100644 (file)
@@ -1017,25 +1017,8 @@ void Go::genGoto(OutputFile & o, uint ind, const State *from, const State *next,
                genSwitchD (o, from);
                return;
        }
-/*
-       for (uint i = 0; i < nSpans; ++i)
-       {
-               if (span[i].ub > 0xFF)
-               {
-                       wSpans++;
-               }
-       }
-       Span * wspan = new Span[wSpans];
-       for (uint i = 0, j = 0; i < nSpans; i++)
-       {
-               if (span[i].ub > 0xFF)
-               {
-                       wspan[j++] = span[i];
-               }
-       }
-*/
+
        uint dSpans = 0;
-       std::set<uint> vTargets;
        uint nBitmaps = 0;
        if (gFlag || (encoding.szCodeUnit() > 1))
        {
@@ -1061,20 +1044,17 @@ void Go::genGoto(OutputFile & o, uint ind, const State *from, const State *next,
                                        else
                                        {
                                                dSpans++;
-                                               vTargets.insert(to->label);
                                        }
                                }
                                else
                                {
                                        dSpans++;
-                                       vTargets.insert(to->label);
                                }
                        }
                }
        }
 
-       const uint lTargets = vTargets.size() >> nBitmaps;
-       if (gFlag && (std::max (lTargets, dSpans) >= cGotoThreshold))
+       if (gFlag && (dSpans >= cGotoThreshold))
        {
                genCpGoto(o, ind, from, next, readCh);
                return;