public static void FormatGlobalSet <T>(GlobalVariableId <T> globalVariable, IJsmExpression value, Int32[] knownVariables, ScriptWriter sw, IScriptFormatterContext formatterContext, IServices executionContext) where T : unmanaged { sw.Append("G"); if (knownVariables == null || Array.BinarySearch(knownVariables, globalVariable.VariableId) < 0) { sw.Append("["); sw.Append(globalVariable.VariableId.ToString(CultureInfo.InvariantCulture)); sw.Append("]"); sw.Append(" = "); sw.Append("("); sw.Append(GlobalVariableId <T> .TypeName); sw.Append(")"); } else { sw.Append(GlobalVariableId <T> .TypeName); sw.Append("["); sw.Append(globalVariable.VariableId.ToString(CultureInfo.InvariantCulture)); sw.Append("]"); sw.Append(" = "); } value.Format(sw, formatterContext, executionContext); sw.AppendLine(";"); }
public void Set <T>(GlobalVariableId <T> id, T value) where T : unmanaged { unsafe { fixed(Int64 *ptr = &_values[id.VariableId]) * (T *)ptr = value; } }
public T Get <T>(GlobalVariableId <T> id) where T : unmanaged { unsafe { fixed(Int64 *ptr = &_values[id.VariableId]) return(*(T *)ptr); } }
public PSHSM_W(GlobalVariableId <Int16> globalVariable) { _globalVariable = globalVariable; }
public PSHSM_B(GlobalVariableId <SByte> globalVariable) { _globalVariable = globalVariable; }
public POPM_B(GlobalVariableId <Byte> globalVariable, IJsmExpression value) { _globalVariable = globalVariable; _value = value; }
public PSHSM_L(GlobalVariableId <Int32> globalVariable) { _globalVariable = globalVariable; }
public POPM_L(GlobalVariableId <UInt32> globalVariable, IJsmExpression value) { _globalVariable = globalVariable; _value = value; }
public void Set <T>(GlobalVariableId <T> id, T value) where T : unmanaged => throw new NotSupportedException();
public T Get <T>(GlobalVariableId <T> id) where T : unmanaged => throw new NotSupportedException();