public int GetType(StackValue sv) { int type = (int)ProtoCore.DSASM.Constants.kInvalidIndex; if (sv.IsReferenceType()) { type = (int)sv.metaData.type; } else { if (!addressTypeClassMap.TryGetValue(sv.optype, out type)) { type = (int)PrimitiveType.kInvalidType; } } return(type); }