public static bool PrimitiveObjectSetType(out object answer, object arg0, object arg1) { TC newType = (TC)(int)arg0; switch (newType) { case TC.CONSTANT: answer = Constant.Decode((uint)(int)arg1); break; case TC.FIXNUM: answer = (arg1 == null) ? 9 : (arg1 is SchemeObject) ? (int)((SchemeObject)arg1).GetHashCode() : arg1.GetHashCode(); break; case TC.MANIFEST_NM_VECTOR: answer = arg1; break; case TC.MANIFEST_SPECIAL_NM_VECTOR: answer = new ManifestSpecialNMVector((int)arg1); break; case TC.NON_MARKED_VECTOR: answer = new NonMarkedVector(arg1); break; case TC.REFERENCE_TRAP: answer = ReferenceTrap.Make(arg1); break; case TC.VECTOR: answer = ((NonMarkedVector)arg1).contents; break; default: throw new NotImplementedException(); } return(false); }
public static bool PrimitiveObjectSetType(out object answer, object arg0, object arg1) { TC newType = (TC) (int) arg0; switch (newType) { case TC.CONSTANT: answer = Constant.Decode ((uint) (int) arg1); break; case TC.FIXNUM: answer = (arg1 == null) ? 9 : (arg1 is SchemeObject) ? (int)((SchemeObject)arg1).GetHashCode() : arg1.GetHashCode(); break; case TC.MANIFEST_NM_VECTOR: answer = arg1; break; case TC.MANIFEST_SPECIAL_NM_VECTOR: answer = new ManifestSpecialNMVector ((int) arg1); break; case TC.NON_MARKED_VECTOR: answer = new NonMarkedVector (arg1); break; case TC.REFERENCE_TRAP: answer = ReferenceTrap.Make (arg1); break; case TC.VECTOR: answer = ((NonMarkedVector) arg1).contents; break; default: throw new NotImplementedException (); } return false; }