/// <nodoc/> public ResolvedEntry(FullSymbol thunkContextName, Thunk thunk, QualifierSpaceId qualifierSpaceId, bool isVariableDeclaration) : this() { Contract.Requires(thunk != null); Thunk = thunk; Location = thunk.Expression.Location; m_thunkContextNameOrSymbolName = thunkContextName; IsVariableDeclaration = isVariableDeclaration; QualifierSpaceId = qualifierSpaceId; }
private EvaluationResult GetOrEvalFieldBindingThunk(ImmutableContextBase context, SymbolAtom name, ModuleBinding binding, Thunk thunk) { // Keep this call in a separate method to avoid always creating a closure object on the heap in the caller // If the thunk hasn't been evaluated yet for the current qualifier, then its evaluation gets kicked off in a newly allocated mutable named context. // We must not mutate the context at hand directly, as there might be other concurrent child contexts alive. var contextName = GetFullyQualifiedBindingName(context.FrontEndContext.SymbolTable, this, name); return(thunk.LegacyEvaluateWithNewNamedContext(context, this, contextName, binding.Location)); }
/// <inheritdoc/> public override int GetHashCode() { return(HashCodeHelper.Combine(Thunk.GetHashCode(), QualifierId.GetHashCode())); }
/// <inheritdoc/> public bool Equals(ValuePromiseFromThunk other) { return(Thunk.Equals(other.Thunk) && QualifierId.Equals(other.QualifierId)); }