internal void Parse(BoundArgListOperator boundArgListOperator) { base.Parse(boundArgListOperator); foreach (var boundExpression in boundArgListOperator.Arguments) { this.arguments.Add(Deserialize(boundExpression) as Expression); } }
public ExpandedVarargsMethodSymbol(MethodSymbol underlyingMethod, BoundArgListOperator argList) { this.underlyingMethod = underlyingMethod; ArrayBuilder<ParameterSymbol> builder = ArrayBuilder<ParameterSymbol>.GetInstance(); for (int i = 0; i < argList.Arguments.Count; ++i) { Debug.Assert(argList.Arguments[i].Type != null); builder.Add(new SynthesizedParameterSymbol( container: this, type: argList.Arguments[i].Type, ordinal: i + underlyingMethod.ParameterCount, refKind: argList.ArgumentRefKindsOpt.IsNullOrEmpty ? RefKind.None : argList.ArgumentRefKindsOpt[i], name: "")); // these fake parameters are never accessed by name. } this.extraParameters = builder.ToReadOnlyAndFree(); }
public ExpandedVarargsMethodSymbol(MethodSymbol underlyingMethod, BoundArgListOperator argList) { this.underlyingMethod = underlyingMethod; ArrayBuilder <ParameterSymbol> builder = ArrayBuilder <ParameterSymbol> .GetInstance(); for (int i = 0; i < argList.Arguments.Count; ++i) { Debug.Assert(argList.Arguments[i].Type != null); builder.Add(new SynthesizedParameterSymbol( container: this, type: argList.Arguments[i].Type, ordinal: i + underlyingMethod.ParameterCount, refKind: argList.ArgumentRefKindsOpt.IsNullOrEmpty ? RefKind.None : argList.ArgumentRefKindsOpt[i], name: "")); // these fake parameters are never accessed by name. } this.extraParameters = builder.ToReadOnlyAndFree(); }
private void EmitSymbolToken( MethodSymbol method, SyntaxNode syntaxNode, BoundArgListOperator optArgList, bool encodeAsRawDefinitionToken = false ) { _builder.EmitToken( _module.Translate( method, syntaxNode, _diagnostics, optArgList, needDeclaration: encodeAsRawDefinitionToken ), syntaxNode, _diagnostics, encodeAsRawDefinitionToken ); }
internal MethodSymbol GetExpandedSymbol(BoundArgListOperator argList) { if (expandedSymbols == null) { Interlocked.CompareExchange(ref expandedSymbols, new ConcurrentHashSet <ExpandedVarargsMethodSymbol>(), null); } ExpandedVarargsMethodSymbol newX = new ExpandedVarargsMethodSymbol(this, argList); // There are races here where we could end up with two outstanding copies of "the same" // expanded symbol; we really don't care. The worst that will happen is we emit a duplicate // entry in the method ref table. foreach (ExpandedVarargsMethodSymbol x in expandedSymbols) { if (x == newX) { return(x); } } expandedSymbols.Add(newX); return(newX); }
internal MethodSymbol GetExpandedSymbol(BoundArgListOperator argList) { if (expandedSymbols == null) { Interlocked.CompareExchange(ref expandedSymbols, new ConcurrentHashSet<ExpandedVarargsMethodSymbol>(), null); } ExpandedVarargsMethodSymbol newX = new ExpandedVarargsMethodSymbol(this, argList); // There are races here where we could end up with two outstanding copies of "the same" // expanded symbol; we really don't care. The worst that will happen is we emit a duplicate // entry in the method ref table. foreach(ExpandedVarargsMethodSymbol x in expandedSymbols) { if (x == newX) { return x; } } expandedSymbols.Add(newX); return newX; }
private void EmitSymbolToken(MethodSymbol method, CSharpSyntaxNode syntaxNode, BoundArgListOperator optArgList) { _builder.EmitToken(_module.Translate(method, syntaxNode, _diagnostics, optArgList), syntaxNode, _diagnostics); }
private void EmitArgListOperator(BoundArgListOperator expression) { for (int i = 0; i < expression.Arguments.Length; i++) { BoundExpression argument = expression.Arguments[i]; RefKind refKind = expression.ArgumentRefKindsOpt.IsDefaultOrEmpty ? RefKind.None : expression.ArgumentRefKindsOpt[i]; EmitArgument(argument, refKind); } }
private void EmitSymbolToken(MethodSymbol method, CSharpSyntaxNode syntaxNode, BoundArgListOperator optArgList) { builder.EmitToken(module.Translate(method, syntaxNode, diagnostics, optArgList), syntaxNode, diagnostics); }
private void EmitSymbolToken(MethodSymbol method, SyntaxNode syntaxNode, BoundArgListOperator optArgList, bool encodeAsRawDefinitionToken = false) { _builder.EmitToken(_module.Translate(method, syntaxNode, _diagnostics, optArgList, needDeclaration: encodeAsRawDefinitionToken), syntaxNode, _diagnostics, encodeAsRawDefinitionToken); }
public override object VisitArgListOperator(BoundArgListOperator node, object arg) { return Unimplemented(node, "arglist"); }
public override object VisitArgListOperator(BoundArgListOperator node, object arg) { return(Unimplemented(node, "arglist")); }