Example #1
0
        private static void GenerateInstrumentedProcessView(
            ResultSetProcessorFactoryForge forge,
            CodegenClassScope classScope,
            CodegenMethod method,
            CodegenInstanceAux instance)
        {
            if (!classScope.IsInstrumented) {
                forge.ProcessViewResultCodegen(classScope, method, instance);
                return;
            }

            var instrumented = method.MakeChild(typeof(UniformPair<EventBean[]>), forge.GetType(), classScope)
                .AddParam(typeof(EventBean[]), NAME_NEWDATA)
                .AddParam(typeof(EventBean[]), NAME_OLDDATA)
                .AddParam(typeof(bool), NAME_ISSYNTHESIZE);
            forge.ProcessViewResultCodegen(classScope, instrumented, instance);

            method.Block
                .DebugStack()
                .Apply(InstrumentationCode.Instblock(classScope, "q" + forge.InstrumentedQName))
                .DeclareVar<UniformPair<EventBean[]>>(
                    "pair",
                    LocalMethod(instrumented, REF_NEWDATA, REF_OLDDATA, REF_ISSYNTHESIZE))
                .Apply(InstrumentationCode.Instblock(classScope, "a" + forge.InstrumentedQName, Ref("pair")))
                .MethodReturn(Ref("pair"));
        }
Example #2
0
 public ResultSetProcessorDesc(
     ResultSetProcessorFactoryForge resultSetProcessorFactoryForge,
     ResultSetProcessorType resultSetProcessorType,
     SelectExprProcessorForge[] selectExprProcessorForges,
     bool join,
     bool hasOutputLimit,
     ResultSetProcessorOutputConditionType? outputConditionType,
     bool hasOutputLimitSnapshot,
     EventType resultEventType,
     bool rollup,
     AggregationServiceForgeDesc aggregationServiceForgeDesc,
     OrderByProcessorFactoryForge orderByProcessorFactoryForge,
     SelectSubscriberDescriptor selectSubscriberDescriptor,
     IList<StmtClassForgeableFactory> additionalForgeables)
 {
     ResultSetProcessorFactoryForge = resultSetProcessorFactoryForge;
     ResultSetProcessorType = resultSetProcessorType;
     SelectExprProcessorForges = selectExprProcessorForges;
     IsJoin = join;
     HasOutputLimit = hasOutputLimit;
     OutputConditionType = outputConditionType;
     HasOutputLimitSnapshot = hasOutputLimitSnapshot;
     ResultEventType = resultEventType;
     IsRollup = rollup;
     AggregationServiceForgeDesc = aggregationServiceForgeDesc;
     OrderByProcessorFactoryForge = orderByProcessorFactoryForge;
     SelectSubscriberDescriptor = selectSubscriberDescriptor;
     AdditionalForgeables = additionalForgeables;
 }