public static VAL Assign(VAL R0, VAL R1) { bool r = false; if (R0.ty != VALTYPE.funccon) { r = HostOperation.HostTypeAssign(R0, R1); } if (!r) { R0.ty = R1.ty; R0.Class = R1.Class; R0.hty = R1.hty; R0.value = R1.value; //R0.name = R1.name; if (R1.ty == VALTYPE.funccon || (R1.ty == VALTYPE.hostcon && (R1.value is MethodInfo || R1.value is MethodInfo[])) ) { R0.temp = R1.temp; //instance of CPU } } return(R0); }
private static void SetValue(object host, Type type, string offset, VAL val) { object temp = ValizerScript.ToHost(val, type); if (temp == null) { temp = val.HostValue; } HostOperation.HostTypeAssign(host, offset, temp, true); }