detach the sidecar

This commit is contained in:
Alex Coyte
2015-11-26 12:44:56 +11:00
committed by Matthew Barr
parent e065c4d60b
commit a7d8dafb71
37 changed files with 37 additions and 3001 deletions

View File

@@ -115,7 +115,6 @@ RoseVertex createVertex(RoseBuildImpl *build, u32 literalId, u32 min_offset,
g[v].idx = build->vertexIndex++;
g[v].min_offset = min_offset;
g[v].max_offset = max_offset;
/* no escapes */
DEBUG_PRINTF("insert vertex %zu into literal %u's vertex set\n", g[v].idx,
literalId);
@@ -201,19 +200,16 @@ RoseVertex duplicate(RoseBuildImpl *build, RoseVertex v) {
namespace {
struct created_key {
explicit created_key(const RoseInEdgeProps &trep)
: prefix(trep.graph.get()), lag(trep.graph_lag), escapes(trep.escapes) {
assert(escapes.none() || !prefix);
: prefix(trep.graph.get()), lag(trep.graph_lag) {
}
bool operator<(const created_key &b) const {
const created_key &a = *this;
ORDER_CHECK(prefix);
ORDER_CHECK(lag);
ORDER_CHECK(escapes);
return false;
}
NGHolder *prefix;
u32 lag;
CharReach escapes;
};
}
@@ -320,15 +316,6 @@ void createVertices(RoseBuildImpl *tbi,
}
NFAVertex p = pv.first;
if (isLeafNode(p, g)) {
DEBUG_PRINTF("setting escapes (reach %s) on parent\n",
describeClass(key.escapes, 20, CC_OUT_TEXT).c_str());
g[p].escapes = key.escapes;
} else if (key.escapes != g[p].escapes) {
DEBUG_PRINTF("creating differently escaped version of parent\n");
p = duplicate(tbi, p);
g[p].escapes = key.escapes;
}
RoseEdge e;
bool added;
@@ -1106,10 +1093,6 @@ bool predsAreDelaySensitive(const RoseInGraph &ig, RoseInVertex v) {
DEBUG_PRINTF("edge bounds\n");
return true;
}
if (ig[e].escapes.any()) {
DEBUG_PRINTF("escapes\n");
return true;
}
RoseInVertex u = source(e, ig);
if (ig[u].type == RIV_START) {