protected override PExpr DoVisit() { if (!_left.IsResolved) { if (Expr.IsUnbound) { if (_withScope == null) { var c = Global.InternalWithObjectScope; if (c == null) { _withScope = GlobalContext.WithObjectScope.None; } else { _withScope = c; _scopeWalker = new ScopeWalker(this, c); } } if (_scopeWalker != null) { if ((_left = _scopeWalker.Visit()).IsPendingOrSignal) { return(ReentrantPendingOrSignal(_left)); } if (_left.Result == ScopeWalker.NotFound) { // Not found in scope: forget it and challenge the Global from now on. _scopeWalker = null; if ((_left = Global.Visit(this)).IsPendingOrSignal) { return(ReentrantPendingOrSignal(_left)); } } } else if ((_left = Global.Visit(this)).IsPendingOrSignal) { return(ReentrantPendingOrSignal(_left)); } } else { if (IsPendingOrSignal(ref _left, Expr.Left)) { return(ReentrantPendingOrSignal(_left)); } } } if (Result != null) { return(new PExpr(Result)); } Debug.Assert(!_result.IsResolved); if ((_result = _left.Result.Visit(this)).IsPendingOrSignal) { return(ReentrantPendingOrSignal(_result)); } return(ReentrantSetResult(_result.Result)); }