an optimization in the jitter for generating more compact code

This commit is contained in:
kr.angelov
2013-06-26 09:03:51 +00:00
parent dba75911b0
commit c873531172
2 changed files with 110 additions and 74 deletions

View File

@@ -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)
{