public BinaryExpression(Expression left, Expression right, BinaryOperation operation, MjoType type)
 {
     Left      = left;
     Right     = right;
     Operation = operation;
     Type      = type;
 }
示例#2
0
 public Assignment(Expression value, uint hash, MjoFlags flags, MjoType type, BinaryOperation operation)
 {
     Value     = value;
     Hash      = hash;
     Flags     = flags;
     Type      = type;
     Operation = operation;
 }
示例#3
0
 private void ProcessBinaryExpression(Instruction instruction, BinaryOperation operation, MjoType type)
 {
     Debug.Assert(EvaluationStack.Count >= 2);
     var left  = EvaluationStack[^ 2];
示例#4
0
 public static MjoFlags Build(MjoType type, MjoScope scope, MjoModifier modifier, MjoInvertMode invertMode, int dimension) =>
 (MjoFlags)(dimension << 11 | (ushort)type << 8 | (ushort)scope << 5 | (ushort)invertMode << 3 | (ushort)modifier);
示例#5
0
 public static MjoType ElementType(this MjoType type) => type.Matches(MjoTypeMask.Array)
                 ? type - 3
                 : throw new Exception($"Can't resolve element type of {type}");
示例#6
0
 public static MjoType Array(this MjoType type) => type.Matches(MjoTypeMask.Primitive)
                 ? type + 3
                 : throw new Exception($"Can't create array type from {type}");
示例#7
0
 public static bool Matches(this MjoType type, MjoTypeMask mask) => type == MjoType.Unknown || (type.ToMask() & mask) != 0;
示例#8
0
 public static MjoTypeMask ToMask(this MjoType type) => type == MjoType.Unknown ? MjoTypeMask.All : (MjoTypeMask)(1 << (byte)type);
示例#9
0
 public UnaryExpression(Expression operand, UnaryOperation operation, MjoType type)
 {
     Operand   = operand;
     Operation = operation;
     Type      = type;
 }
示例#10
0
 public ArrayAssignment(Expression value, Expression[] indices, uint hash, MjoFlags flags, MjoType type, BinaryOperation operation)
     : base(value, hash, flags, type, operation)
 {
     Indices = indices;
 }
示例#11
0
 public Cast(Expression value, MjoType targetType)
 {
     Value      = value;
     TargetType = targetType;
 }