internal VarInfo CreatePrimitiveTypeVarInfo(Var v, Var newVar) { Debug.Assert(v != null, "v != null"); Debug.Assert(newVar != null, "newVar != null"); PlanCompiler.Assert(TypeSemantics.IsScalarType(v.Type), "The current variable should be of primitive or enum type."); PlanCompiler.Assert(TypeSemantics.IsScalarType(newVar.Type), "The new variable should be of primitive or enum type."); VarInfo varInfo = new PrimitiveTypeVarInfo(newVar); m_map.Add(v, varInfo); return varInfo; }
/// <summary> /// Creates a var info for var variables of primitive or enum type. /// </summary> /// <param name="v">Current variable of primitive or enum type.</param> /// <param name="newVar">The new variable replacing <paramref name="v"/>.</param> /// <returns><see cref="PrimitiveTypeVarInfo"/> for <paramref name="v"/>.</returns> internal VarInfo CreatePrimitiveTypeVarInfo(Var v, Var newVar) { System.Diagnostics.Debug.Assert(v != null, "v != null"); System.Diagnostics.Debug.Assert(newVar != null, "newVar != null"); PlanCompiler.Assert(md.TypeSemantics.IsScalarType(v.Type), "The current variable should be of primitive or enum type."); PlanCompiler.Assert(md.TypeSemantics.IsScalarType(newVar.Type), "The new variable should be of primitive or enum type."); VarInfo varInfo = new PrimitiveTypeVarInfo(newVar); m_map.Add(v, varInfo); return(varInfo); }