Example #1
1
 public Operation(OpType type, int row, int column, QuadValue direction = QuadValue.Left | QuadValue.Right | QuadValue.Up | QuadValue.Down)
 {
     _type = type;
     _row = row;
     _column = column;
     _direction = direction;
 }
 // <summary>
 // Is the given op one of the ConstantBaseOp-s
 // </summary>
 internal static bool IsConstantBaseOp(OpType opType)
 {
     return opType == OpType.Constant ||
            opType == OpType.InternalConstant ||
            opType == OpType.Null ||
            opType == OpType.NullSentinel;
 }
Example #3
0
		// should form a binary tree, can't have more than 2 children
		public MathNode(UberNode parent, string scriptInput, OpType opType)
			: base(parent, scriptInput)
		{
			Children.Add(null);
			Children.Add(null);
			OpTypeVal = opType;
		}
Example #4
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            rssUtil.bgndWorker.RunWorkerCompleted += (sender, e) =>
            {

                //todo clear list
                listViewRSS.Adapter = new ArrayAdapter<string> (this, Android.Resource.Layout.SimpleListItem1,
                                                                rssUtil.RssFeeds.Select(x=>x.Title).ToArray());

                SetProgressBarIndeterminateVisibility (false);
                opType = OpType.Feeds;
            };

            RequestWindowFeature (WindowFeatures.ActionBar);
            RequestWindowFeature (WindowFeatures.Progress);
            RequestWindowFeature (WindowFeatures.IndeterminateProgress);

            SetProgressBarIndeterminate (true);
            SetProgressBarIndeterminateVisibility (true);

            ActionBar.NavigationMode = ActionBarNavigationMode.Tabs;
            ActionBar.Title = "Eyegregator";
            ActionBar.SetDisplayShowTitleEnabled (true);

            CreateDB ();

            SetContentView (Resource.Layout.Main);
            listViewRSS = (ListView)FindViewById (Resource.Id.listView);
            listViewRSS.Clickable = true;
        }
 protected static void Assert(bool condition, string format, OpType op, object arg1, object arg2)
 {
     if (!condition)
     {
         Debug.Assert(false, String.Format(CultureInfo.InvariantCulture, format, Dump.AutoString.ToString(op), arg1, arg2));
     }
 }
Example #6
0
 internal SetOp(OpType opType, VarVec outputs, VarMap left, VarMap right)
     : this(opType)
 {
     m_varMap = new VarMap[2];
     m_varMap[0] = left;
     m_varMap[1] = right;
     m_outputVars = outputs;
 }
        private readonly List<RelProperty> m_relProperties; // list of relationship properties for which we have values

        #endregion

        #region constructors

        internal NewEntityBaseOp(OpType opType, TypeUsage type, bool scoped, EntitySet entitySet, List<RelProperty> relProperties)
            : base(opType, type)
        {
            Debug.Assert(scoped || entitySet == null, "entitySet cann't be set of constructor isn't scoped");
            DebugCheck.NotNull(relProperties);
            m_scoped = scoped;
            m_entitySet = entitySet;
            m_relProperties = relProperties;
        }
Example #8
0
        /// <summary>
        /// Basic constructor
        /// </summary>
        /// <param name="opType">The OpType we're interested in processing</param>
        /// <param name="nodeProcessDelegate">The callback to invoke</param>
        protected Rule(OpType opType, ProcessNodeDelegate nodeProcessDelegate)
        {
            Debug.Assert(nodeProcessDelegate != null, "null process delegate");
            Debug.Assert(opType != OpType.NotValid, "bad OpType");
            Debug.Assert(opType != OpType.Leaf, "bad OpType - Leaf");

            m_opType = opType;
            m_nodeDelegate = nodeProcessDelegate;
        }
Example #9
0
 internal NestBaseOp(
     OpType opType, List<SortKey> prefixSortKeys,
     VarVec outputVars,
     List<CollectionInfo> collectionInfoList)
     : base(opType)
 {
     m_outputs = outputVars;
     m_collectionInfoList = collectionInfoList;
     m_prefixSortKeys = prefixSortKeys;
 }
Example #10
0
        public ScreenEdit(t_Screen t_Scr, OpType moptype)
        {
            InitializeComponent();

            Scree = t_Scr;
            if (moptype == OpType.Alert)
            {
                txtName.Text = t_Scr.ScreenName;
                txtImage.Text = t_Scr.ImageURL;
            }
            optype = moptype;
            BindSite();
        }
        public TP_ButtonSetPropertyEdit(TP_ButtonSetProperty _BaseWindow,OpType mopType)
        {
            InitializeComponent();
            _OpType = mopType;

            _ContentX = _BaseWindow;

            InitProperty();
            if (mopType == OpType.Alert)
            {
                OpItem = (ScreenAddShowName)_ContentX.gvList.SelectedItem;
                txtShowName.Text = OpItem.ScreenShowName;
                cbScreenList.SelectedItem = OpItem.Screen;
            }
        }
        public List<Polygon> Clip(Polygon p1, Polygon p2, OpType operation)
        {
            List<IntPoint> pol1 = new List<IntPoint>();
            List<IntPoint> pol2 = new List<IntPoint>();
            List<List<IntPoint>> res = new List<List<IntPoint>>();

            foreach (Point point in p1.Points) {
                pol1.Add(new IntPoint(point.X, point.Y));
            }
            foreach (Point point in p2.Points) {
                pol2.Add(new IntPoint(point.X, point.Y));
            }

            Clipper clipper = new Clipper();
            clipper.AddPolygon(pol1, PolyType.ptSubject);
            clipper.AddPolygon(pol2, PolyType.ptClip);

            switch (operation) {
                case OpType.Difference:
                    clipper.Execute(ClipType.ctDifference, res);
                    break;
                case OpType.Intersection:
                    clipper.Execute(ClipType.ctIntersection, res);
                    break;
                case OpType.Union:
                    clipper.Execute(ClipType.ctUnion, res);
                    break;
                case OpType.Xor:
                    clipper.Execute(ClipType.ctXor, res);
                    break;
            }
            List<Polygon> ret = new List<Polygon>();

            foreach (var poly in res) {
                Polygon pol = new Polygon() { Points = new List<Point>() };

                foreach (var poi in poly) {
                    pol.Points.Add(new Point() { X = poi.X, Y = poi.Y });
                }

                ret.Add(pol);
            }
            return ret;
        }
Example #13
0
 //ScreenEdit _mw)
 public ScreenViewModel(t_Screen _mScreen, OpType mType, ScreenEdit mWindow)
 {
     OperationType = mType;
     if (mType == OpType.Add)
     {
         _ParentScreen = _mScreen;
         ScreenObj = new t_Screen();
         _ScreenObj = new t_Screen();
     }
     else
     {
         ScreenObj = new t_Screen();
         ScreenObj.Clone(_mScreen);
         _ScreenObj = _mScreen;
     }
     _Window = mWindow;
     //UpdatetxtSource(_Window.gridContent);
     Init();
 }
Example #14
0
 public bool leftasso = true; //is the operator left associative? most are, so save some lines w/ default value
 public OpToken(OpType type)
 {
     this.type = type;
     switch (type)
     {
         case OpType.ADD:
             precedence = 0;                    
             break;
         case OpType.SUB:
             precedence = 0;                    
             break;
         case OpType.MUL:
             precedence = 1;                    
             break;
         case OpType.DIV:
             precedence = 1;                    
             break;
         case OpType.MOD:
             precedence = 1;                    
             break;
         case OpType.LP:
             precedence = -999999; //these will be handled specially
             break;
         case OpType.RP:
             precedence = -999999; //these will be handled specially
             break;
         case OpType.EXP:
             precedence = 2;
             leftasso = false;
             break;
         case OpType.LSHIFT:
             precedence = -1;
             length = 2;
             break;
         case OpType.RSHIFT:
             precedence = -1;
             length = 2;
             break;
     }
 }
Example #15
0
		public static string GetName (OpType ot)
		{
			return names [(int) ot] [0];
		}
Example #16
0
 /// <summary>
 /// Basic constructor.
 /// </summary>
 /// <param name="opType">kind of Op</param>
 internal RelOp(OpType opType) : base(opType)
 {
 }
Example #17
0
        private static bool CheckEntry(OpType opType, PlanCompilerPhase phase)
        {
            var hash = ComputeHash(opType, phase);

            return(s_ValidOpTypes.IsSet(hash));
        }
 protected ConstantBaseOp(OpType opType, TypeUsage type, object value)
     : base(opType, type)
 {
     m_value = value;
 }
Example #19
0
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="opType">kind of Op</param>
 internal RulePatternOp(OpType opType) : base(opType)
 {
 }
Example #20
0
        internal static OpInfo parseOperand(string val, OpType allowedTypesFlag, int paramNo, Log log)
        {
            //lets try and resolve any aliases
            OpInfo opInfo;

            if (ISA_DATA.sRegAliases.TryGetValue(val, out opInfo))
            {
                if (!allowedTypesFlag.HasFlag(opInfo.flags))
                {
                    log.Error("The dataType '{0}' is not allowed for param #{1}.", paramNo, opInfo.flags, paramNo);
                }
                return(opInfo);
            }

            Match m = Regex.Match(val, RegexRecognizers.Operand);

            if (!m.Groups[2].Success)
            {
                log.Error("param {0}: unable to recognize operand '{1}'", paramNo, val);
                return(opInfo);
            }

            char   opType = m.Groups[1].Value[0];
            string opVal  = m.Groups[2].Value;

            if (opVal == "")
            {
                log.Error("param {0}: compiler error 4359 '{1}'", paramNo, val);
            }

            switch (opType)
            {
            case 's':     //scalier register
                opInfo.reg   = opInfo.value = UInt32.Parse(opVal);
                opInfo.flags = ISA_DATA.GetFlagsFromRegNum(opInfo.value, log);
                if (opInfo.reg > 255)
                {
                    log.Error("param {0}: unable to use scalier greater then 255.", paramNo);
                }
                break;

            case 'v':     //vector register
                //uint v_offset = allowedTypesFlag.HasFlag(OpType.SCALAR_DST) ? (uint)256 : 0;
                opInfo.reg   = opInfo.value = 256 + UInt32.Parse(opVal);
                opInfo.flags = OpType.VGPR;
                if (opInfo.reg > (256 + 255))
                {
                    log.Error("param {0}: unable to use vector greater then 255.", paramNo);
                }
                break;

            case 'x':     //hex value
            case 'o':     //hex value
            case 'b':     //hex value
                uint hexVal = Convert.ToUInt32(opVal, (opType == 'x') ? 16 : (opType == 'o') ? 8 : 2);
                opInfo.value = hexVal;
                opInfo.reg   = ConvertIntToRegNum((int)hexVal);
                if (opInfo.reg == 255)     // LITERAL
                {
                    opInfo.flags = OpType.LITERAL;
                }
                else if (hexVal > 0)
                {
                    opInfo.flags = OpType.INLINE_INT_POS;
                }
                else if (hexVal == 0)
                {
                    opInfo.flags = OpType.ZERO;
                }
                else     // (val < 0)
                {
                    opInfo.flags = OpType.INLINE_INT_NEG;
                }

                opInfo.dataDisc = DataDesc.HEX_FORMAT;
                break;

            case '0':
            case '1':
            case '2':
            case '3':
            case '4':      //simple number or exponent
            case '5':
            case '6':
            case '7':
            case '8':
            case '9':

                int decVal = 0;
                if (!Int32.TryParse(opVal, NumberStyles.AllowLeadingSign | NumberStyles.AllowExponent, CultureInfo.CurrentCulture, out decVal))
                {
                    log.Error("param {0}: unable to convert {1} to an int. It could be out of range.", paramNo, opVal);
                    decVal = 0;
                    break;
                }

                opInfo.reg = ConvertIntToRegNum(decVal);
                if (opInfo.reg == 255)     // LITERAL
                {
                    opInfo.flags    = OpType.LITERAL;
                    opInfo.dataDisc = (decVal > 0) ? DataDesc.POS_INT : DataDesc.NEG_INT;
                    opInfo.value    = BitConverter.ToUInt32(BitConverter.GetBytes(decVal), 0);
                }
                else if (decVal > 0)
                {
                    opInfo.dataDisc = DataDesc.POS_INT;
                    opInfo.flags    = OpType.INLINE_INT_POS;
                }
                else if (decVal == 0)
                {
                    opInfo.dataDisc = DataDesc.ZERO_INT;
                    opInfo.flags    = OpType.ZERO;
                }
                else     // (lit < 0)
                {
                    opInfo.dataDisc = DataDesc.NEG_INT;
                    opInfo.flags    = OpType.INLINE_INT_NEG;
                }
                break;

            case '.':     //float value - The below should  only be hit if not found in sRegAliases... like 0.000 or -.5
                float temp = float.Parse(opVal, NumberStyles.Float);

                if (temp == 0.0)
                {
                    opInfo.reg = 240; opInfo.flags = OpType.ZERO; opInfo.dataDisc = DataDesc.ZERO_FLOAT;
                }
                else if (temp == 0.5)
                {
                    opInfo.reg = 240; opInfo.flags = OpType.INLINE_FLOAT_POS; opInfo.dataDisc = DataDesc.POS_FLOAT;
                }
                else if (temp == -0.5)
                {
                    opInfo.reg = 241; opInfo.flags = OpType.INLINE_FLOAT_NEG; opInfo.dataDisc = DataDesc.NEG_FLOAT;
                }
                else if (temp == 1.0)
                {
                    opInfo.reg = 242; opInfo.flags = OpType.INLINE_FLOAT_POS; opInfo.dataDisc = DataDesc.POS_FLOAT;
                }
                else if (temp == -1.0)
                {
                    opInfo.reg = 243; opInfo.flags = OpType.INLINE_FLOAT_NEG; opInfo.dataDisc = DataDesc.NEG_FLOAT;
                }
                else if (temp == 2.0)
                {
                    opInfo.reg = 244; opInfo.flags = OpType.INLINE_FLOAT_POS; opInfo.dataDisc = DataDesc.POS_FLOAT;
                }
                else if (temp == -2.0)
                {
                    opInfo.reg = 245; opInfo.flags = OpType.INLINE_FLOAT_NEG; opInfo.dataDisc = DataDesc.NEG_FLOAT;
                }
                else if (temp == 4.0)
                {
                    opInfo.reg = 246; opInfo.flags = OpType.INLINE_FLOAT_POS; opInfo.dataDisc = DataDesc.POS_FLOAT;
                }
                else if (temp == -4.0)
                {
                    opInfo.reg = 247; opInfo.flags = OpType.INLINE_FLOAT_NEG; opInfo.dataDisc = DataDesc.NEG_FLOAT;
                }
                else
                {
                    opInfo.reg      = 255;
                    opInfo.flags    = OpType.LITERAL;
                    opInfo.dataDisc = (opVal[0] == '-') ? DataDesc.NEG_FLOAT : DataDesc.POS_FLOAT;
                    opInfo.value    = BitConverter.ToUInt32(BitConverter.GetBytes(temp), 0);
                }
                break;

            //case '@': // label //removed: we replace labels with literals before parsing. Depends on the distance I guess.
            //    labels[opVal].AddOccurrence(line);
            //    opInfo.dataDisc = DataDesc.LABEL_NAME;
            //    break;
            default: log.Error("param {0}: unable to decode operand '{1}'", paramNo, val); break;
            }

            if (!allowedTypesFlag.HasFlag(opInfo.flags))
            {
                log.Error("param {0}: '{1}' is not in the allowed list of '{2}'", paramNo, opInfo.flags, allowedTypesFlag);
            }

            return(opInfo);
        }
 public Op(OpType type, int ind = -1)
 {
     this.type = type;
     this.ind  = ind;
 }
Example #22
0
            public override void PreWrite(OpType operation)
            {
                if (key)
                {
                    switch (operation)
                    {
                        case OpType.OpKey:
                            key = false;
                            Current(operation);
                            needComma = false;
                            break;
                        case OpType.ObjEnd:
                            ReturnToPrevious(operation);
                            break;
                        default:
                            InvalidState(operation);
                            break;
                    }
                }
                else
                {
                    switch (operation)
                    {

                        case OpType.OpValue:
                            key = true;
                            needComma = true;
                            break;
                        case OpType.OpCast:
                            // nothing to do
                            break;
                        default:
                            base.PreWrite(operation);
                            // wrote a value, look for a key again
                            key = true;
                            needComma = true;
                            break;
                    }
                }
            }
Example #23
0
 private static int ComputeHash(OpType opType, PlanCompilerPhase phase)
 {
     var hash = ((int)opType * (int)PlanCompilerPhase.MaxMarker) + (int)phase;
     return hash;
 }
Example #24
0
 private double PerformOp(double lastValue, OpType currentOp, double currentValue)
 {
     throw new NotImplementedException();
 }
Example #25
0
 private int CompareOpPrecedence(OpType newOp, OpType currentOp)
 {
     throw new NotImplementedException();
 }
Example #26
0
 public BinOpNode(ExprNode left, ExprNode right, OpType op)
 {
     Op = op;
     ExprChildren.Add(left);
     ExprChildren.Add(right);
 }
Example #27
0
        // <summary>
        // Determines whether an applyNode can be rewritten into a projection with a scalar subquery.
        // It can be done if all of the following conditions hold:
        // 1. The right child or the apply has only one output
        // 2. The right child of the apply produces at most one row
        // 3. The right child of the apply produces at least one row, or the Apply operator in question is an OuterApply
        // </summary>
        private static bool CanRewriteApply(Node rightChild, ExtendedNodeInfo applyRightChildNodeInfo, OpType applyKind)
        {
            //Check whether it produces only one definition
            if (applyRightChildNodeInfo.Definitions.Count != 1)
            {
                return(false);
            }

            //Check whether it produces at most one row
            if (applyRightChildNodeInfo.MaxRows
                != RowCount.One)
            {
                return(false);
            }

            //For cross apply it must also return exactly one row
            if (applyKind == OpType.CrossApply &&
                (applyRightChildNodeInfo.MinRows != RowCount.One))
            {
                return(false);
            }

            //Dev10 #488632: Make sure the right child not only declares to produce only one definition,
            // but has exactly one output. For example, ScanTableOp really outputs all the columns from the table,
            // but in its ExtendedNodeInfo.Definitions only these that are referenced are shown.
            // This is to allow for projection pruning of the unreferenced columns.
            if (OutputCountVisitor.CountOutputs(rightChild) != 1)
            {
                return(false);
            }

            return(true);
        }
        public void Schedule(OpType opType, ActorInfo currentActor = null)
        {
            if (currentActor == null)
            {
                currentActor = GetCurrentActorInfo();
            }

            if (CheckTerminated(opType))
            {
                return;
            }

            currentActor.currentOp = opType;

            ActorInfo nextActor = scheduler.GetNext(actorList, currentActor);

            if (nextActor == null)
            {
                foreach (
                    var waiter in
                    actorList.Where(info => info.waitingForDeadlock))
                {
                    waiter.waitingForDeadlock = false;
                    waiter.enabled            = true;
                }
                nextActor = scheduler.GetNext(actorList, currentActor);
            }

            if (nextActor == null)
            {
                // Deadlock
                terminated = true;
                ActivateAllActors();

                CheckTerminated(opType);
                return;
            }

            if (nextActor == currentActor)
            {
                return;
            }

            Safety.Assert(currentActor.active);
            currentActor.active = false;

            lock (nextActor.mutex)
            {
                Safety.Assert(nextActor.enabled);

                Safety.Assert(!nextActor.active);
                nextActor.active = true;

                Monitor.PulseAll(nextActor.mutex);
            }

            lock (currentActor.mutex)
            {
                if (currentActor.terminated && opType == OpType.END)
                {
                    return;
                }

                while (!currentActor.active)
                {
                    Monitor.Wait(currentActor.mutex);
                }

                if (CheckTerminated(opType))
                {
                    return;
                }

                Safety.Assert(currentActor.enabled);
                Safety.Assert(currentActor.active);
            }
        }
Example #29
0
 protected ScalarOp(OpType opType) : base(opType)
 {
 }
Example #30
0
 private static void AddEntry(BitVec opVector, OpType opType, params PlanCompilerPhase[] phases)
 {
     foreach (var phase in phases)
     {
         AddSingleEntry(opVector, opType, phase);
     }
 }
Example #31
0
 /// <summary>
 ///  Constructs a Flag Data operation with a letter operand.
 /// </summary>
 /// <param name="type">The type of the operation.</param>
 /// <param name="index">The index of the letter to mutate.</param>
 /// <param name="letter">The operand value to use with the operation type.</param>
 ///
 /// <exception cref="ArgumentException">
 ///  <paramref name="type"/> is an invalid enum value.
 /// </exception>
 /// <exception cref="ArgumentOutOfRangeException">
 ///  <paramref name="index"/> is less than 0 or greater than or equal to <see cref="PasswordFlagData.Length"/>.
 /// </exception>
 public FlagOperation(OpType type, int index, Letter letter)
 {
     ValidateOpType(type, nameof(type));
     Type  = type;
     Flags = new[] { new FlagLetter(index, letter) };
 }
Example #32
0
 private static bool CheckEntry(OpType opType, PlanCompilerPhase phase)
 {
     var hash = ComputeHash(opType, phase);
     return s_ValidOpTypes.IsSet(hash);
 }
Example #33
0
 internal OpEntry(OpType type, String value)
 {
     Type  = type;
     Value = value;
 }
 internal SortBaseOp(OpType opType, List<SortKey> sortKeys)
     : this(opType)
 {
     m_keys = sortKeys;
 }
 /// <summary>
 ///     Constructor overload for rules
 /// </summary>
 protected ConstantBaseOp(OpType opType)
     : base(opType)
 {
 }
Example #36
0
        private static int ComputeHash(OpType opType, PlanCompilerPhase phase)
        {
            var hash = ((int)opType * (int)PlanCompilerPhase.MaxMarker) + (int)phase;

            return(hash);
        }
Example #37
0
 protected static void AssertOpType(Op op, OpType opType)
 {
     Assert(op.OpType == opType, "OpType Mismatch: Expected {0}; found {1}", op.OpType, Dump.AutoString.ToString(opType));
 }
Example #38
0
 public void ReadOut(BinaryReader reader)
 {
     _type = (OpType)reader.ReadInt32();
 }
Example #39
0
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="opType">kind of Op</param>
 internal AncillaryOp(OpType opType) : base(opType)
 {
 }
Example #40
0
 // <summary>
 // Default constructor
 // </summary>
 // <param name="opType"> the op type </param>
 internal PhysicalOp(OpType opType)
     : base(opType)
 {
 }
Example #41
0
 protected SetOp(OpType opType) : base(opType)
 {
 }
Example #42
0
        private static void AddSingleEntry(BitVec opVector, OpType opType, PlanCompilerPhase phase)
        {
            var hash = ComputeHash(opType, phase);

            opVector.Set(hash);
        }
Example #43
0
 public override void PreWrite(OpType operation)
 {
     InvalidState(operation);
 }
Example #44
0
 internal JoinBaseOp(OpType opType) : base(opType)
 {
 }
Example #45
0
 private static void AddSingleEntry(BitVec opVector, OpType opType, PlanCompilerPhase phase)
 {
     var hash = ComputeHash(opType, phase);
     opVector.Set(hash);
 }
Example #46
0
 protected ScanTableBaseOp(OpType opType, Table table)
     : base(opType)
 {
     m_table = table;
 }
Example #47
0
 private static void AddAllEntry(BitVec opVector, OpType opType)
 {
     foreach (var phase in _planCompilerPhases)
     {
         AddSingleEntry(opVector, opType, phase);
     }
 }
Example #48
0
 protected ScanTableBaseOp(OpType opType)
     : base(opType)
 {
 }
 // Pattern constructor
 internal SortBaseOp(OpType opType)
     : base(opType)
 {
     Debug.Assert(opType == OpType.Sort || opType == OpType.ConstrainedSort, "SortBaseOp OpType must be Sort or ConstrainedSort");
 }
Example #50
0
 internal ApplyBaseOp(OpType opType) : base(opType)
 {
 }
 protected static void AssertOpType(Op op, OpType opType)
 {
     Assert(op.OpType == opType, "OpType Mismatch: Expected {0}; found {1}", op.OpType, Dump.AutoString.ToString(opType));
 }
Example #52
0
 // Pattern constructor
 internal SortBaseOp(OpType opType)
     : base(opType)
 {
     Debug.Assert(opType == OpType.Sort || opType == OpType.ConstrainedSort, "SortBaseOp OpType must be Sort or ConstrainedSort");
 }
Example #53
0
 public Operation(OpType type)
 {
     _type = type;
 }
Example #54
0
 internal SortBaseOp(OpType opType, List <SortKey> sortKeys)
     : this(opType)
 {
     m_keys = sortKeys;
 }
 /// <summary>
 ///     Is the op not safe for null sentinel value change
 /// </summary>
 /// <param name="optype"> </param>
 /// <returns> </returns>
 internal static bool IsOpNotSafeForNullSentinelValueChange(OpType optype)
 {
     return optype == OpType.Distinct ||
            optype == OpType.GroupBy ||
            optype == OpType.Intersect ||
            optype == OpType.Except;
 }
Example #56
0
 protected GroupByBaseOp(OpType opType) : base(opType)
 {
     Debug.Assert(opType == OpType.GroupBy || opType == OpType.GroupByInto, "GroupByBaseOp OpType must be GroupBy or GroupByInto");
 }
Example #57
0
		public Operator (TypeDefinition parent, OpType type, FullNamedExpression ret_type, Modifiers mod_flags, ParametersCompiled parameters,
				 ToplevelBlock block, Attributes attrs, Location loc)
			: base (parent, ret_type, mod_flags, AllowedModifiers, new MemberName (GetMetadataName (type), loc), attrs, parameters)
		{
			OperatorType = type;
			Block = block;
		}
Example #58
0
 internal GroupByBaseOp(OpType opType, VarVec keys, VarVec outputs)
     : this(opType)
 {
     m_keys    = keys;
     m_outputs = outputs;
 }
Example #59
0
		public static string GetMetadataName (OpType ot)
		{
			return names [(int) ot] [1];
		}
Example #60
0
 internal override void EmitGet(ILGenerator ilg)
 {
     EmitUnaryOperator(ilg, this, OpType.TypeSymbol()); // TODO nkok: handle checked/unchecked
 }