private AddLabelInfo ( LabelTarget target, |
||
target | LabelTarget | |
info | ||
리턴 | void |
internal void AddLabelInfo(LabelTarget target, LabelInfo info)
{
Debug.Assert(CanJumpInto);
if (_labels == null)
{
_labels = new Dictionary<LabelTarget, LabelInfo>();
}
_labels.Add(target, info);
}
}
internal void Define(LabelScopeInfo block) { for (LabelScopeInfo info = block; info != null; info = info.Parent) { if (info.ContainsTarget(this._node)) { throw System.Linq.Expressions.Error.LabelTargetAlreadyDefined(this._node.Name); } } this._definitions.Add(block); block.AddLabelInfo(this._node, this); if (this._definitions.Count == 1) { foreach (LabelScopeInfo info2 in this._references) { this.ValidateJump(info2); } } else { if (this._acrossBlockJump) { throw System.Linq.Expressions.Error.AmbiguousJump(this._node.Name); } this._labelDefined = false; } }