public void ReplaceWith(ScriptVar newVar) { ScriptVar oldVar = Var; Var = newVar.Ref(); oldVar.UnRef(); }
public ScriptVarLink(ScriptVar var, String name) { Name = name; Var = var.Ref(); Next = null; Prev = null; Owned = false; }
public ScriptVarLink(ScriptVar var, string name, bool readOnly = false) { Name = name; Var = var.Ref(); Next = null; Prev = null; Owned = false; IsConst = readOnly; }
public void ReplaceWith(ScriptVar newVar) { if (IsConst && Var?.IsUndefined == false) { throw new JITException(string.Format("{0} is const, cannot assign a new value", Name)); } var oldVar = Var; Var = newVar.Ref(); oldVar.UnRef(); }