Ejemplo n.º 1
0
void cvtInListToPairs(HqlExprArray & target, IHqlExpression * from, bool valueIfMatch)
{
    unsigned max = from->numChildren();
    unsigned idx;
    IHqlExpression * tValue = queryBoolExpr(valueIfMatch);
    ITypeInfo * type = queryBoolType();
    target.ensure(max);
    for (idx = 0; idx < max; idx++)
    {
        IHqlExpression * v1 = from->queryChild(idx);
        target.append(* createValue(no_mapto, LINK(type), LINK(v1), LINK(tValue)));
    }
}
Ejemplo n.º 2
0
void CHqlExprMultiGuard::addGuarded(IHqlExpression * original)
{
    addGuarded(queryBoolExpr(true), original, false);
}
Ejemplo n.º 3
0
                    }
                    else
                    {
                        //MORE: Check the type of the field is legal.
                        ctx.addQuotedF("%s->append(createWildKeySegmentMonitor(%u, %u, %u));", listName, i, offset, curSize);
                    }
                    return true;
                }
                offset += curSize;
            }
            break;
        }
    case no_constant:
        return true;
    }
    ctx.addReturn(queryBoolExpr(false));
    return false;
}

void CppFilterExtractor::buildKeySegmentInExpr(BuildFilterState & buildState, KeySelectorInfo & selectorInfo, BuildCtx & ctx, const char * target, IHqlExpression & thisKey, MonitorFilterKind filterKind)
{
    //Generally this slightly increases the code size, but reduces the number of
    //temporary sets which is generally more efficient.
    OwnedHqlExpr simplified = querySimplifyInExpr(&thisKey);
    if (simplified)
    {
        OwnedHqlExpr folded = foldHqlExpression(simplified);
        buildKeySegmentExpr(buildState, selectorInfo, ctx, target, *folded, filterKind);
        return;
    }