summaryrefslogtreecommitdiff
path: root/src/runtime/c/pgf/reasoner.c
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2013-06-26 09:03:51 +0000
committerkr.angelov <kr.angelov@gmail.com>2013-06-26 09:03:51 +0000
commita2af8e216fc14e59f636521417ac6ed941f58154 (patch)
tree1cdae0f0baa018b7fbb214e4219dca0271b54483 /src/runtime/c/pgf/reasoner.c
parent3c2d1890d0c5de25bbaa7c582c20bcd67bc47d8c (diff)
an optimization in the jitter for generating more compact code
Diffstat (limited to 'src/runtime/c/pgf/reasoner.c')
-rw-r--r--src/runtime/c/pgf/reasoner.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/runtime/c/pgf/reasoner.c b/src/runtime/c/pgf/reasoner.c
index 3e5c64692..179933e91 100644
--- a/src/runtime/c/pgf/reasoner.c
+++ b/src/runtime/c/pgf/reasoner.c
@@ -40,7 +40,7 @@ struct PgfExprState {
typedef struct {
// base must be the first field in order to be able to cast
- // from PgfCombine2State to PgfReasonerState
+ // from PgfCombine1State to PgfReasonerState
PgfReasonerState base;
GuBuf* exprs;
PgfExprState* parent;
@@ -331,6 +331,13 @@ pgf_complete(PgfReasoner* rs, PgfExprState* st)
nst->base.continuation(rs, &nst->base);
}
+void
+pgf_try_constant(PgfReasoner* rs, PgfExprState* prev, PgfAbsFun* absfun)
+{
+ pgf_try_else(rs, prev, absfun);
+ pgf_complete(rs, prev);
+}
+
static PgfExprProb*
pgf_reasoner_next(PgfReasoner* rs)
{