提交 dac472af 编写于 作者: P Pharring 提交者: RoslynTeam

Fix various typos. (changeset 1214478)

上级 8adaa7ae
......@@ -1405,7 +1405,7 @@ private BoundBaseReference BindBase(BaseExpressionSyntax node, DiagnosticBag dia
}
else if (IsRefOrOutThisParameterCaptured(node, diagnostics))
{
// error has been reported by CheckThisRefernece
// error has been reported by CheckThisReference
}
else
{
......
......@@ -44,7 +44,7 @@ internal sealed class SourceAssemblySymbol : MetadataOrSourceAssemblySymbol, IAt
// granted provided the simple assembly names match. When such access is granted
// the assembly to which we have been granted access is noted (optimisticallyGrantedInternalsAccess).
// After the public key has been computed, the set of optimistic grants is reexamined
// to insure that full identities match. This may produce diagnostics.
// to ensure that full identities match. This may produce diagnostics.
private StrongNameKeys lazyStrongNameKeys;
/// <summary>
......
......@@ -326,7 +326,7 @@ internal virtual void PostDecodeWellKnownAttributes(ImmutableArray<CSharpAttribu
wellKnownAttributeData = this.ValidateAttributeUsageAndDecodeWellKnownAttributes(binders, attributesToBind, boundAttributes, diagnostics, symbolPart);
// Store data decoded from remaining well-known attributes.
// TODO: what if this suceeds on another thread but not this thread?
// TODO: what if this succeeds on another thread but not this thread?
lazyCustomAttributesBag.SetDecodedWellKnownAttributeData(wellKnownAttributeData);
}
else if (earlyDecodingOnly)
......
......@@ -1890,7 +1890,7 @@ internal AssemblyReferenceHandle GetAssemblyRef(string assemblyName)
// Check whether matching name
if (MetadataReader.StringEquals(MetadataReader.GetAssemblyReference(assemblyRef).Name, assemblyName))
{
// Return assemby ref token
// Return assembly ref token
return assemblyRef;
}
}
......
......@@ -754,7 +754,7 @@ private static bool Unescape(StringBuilder sb, string str, ref int i)
{
int codepoint = Convert.ToInt32(str.Substring(i, semicolon - i), 16);
// \0 is not valid in an asembly name
// \0 is not valid in an assembly name
if (codepoint == 0)
{
return false;
......
......@@ -39,7 +39,7 @@ internal enum CallingConvention
FastCall = 4,
/// <summary>
/// Win32 API calling convention for calling unmanged methods via PlatformInvoke. The call stack is cleaned up by the callee.
/// Win32 API calling convention for calling unmanaged methods via PlatformInvoke. The call stack is cleaned up by the callee.
/// </summary>
Standard = 2,
......
......@@ -126,7 +126,7 @@ string CustomMarshallerRuntimeArgument
}
/// <summary>
/// The unmanged element type of the unmanaged array.
/// The unmanaged element type of the unmanaged array.
/// -1 if it should be omitted from the marshal blob.
/// </summary>
System.Runtime.InteropServices.UnmanagedType ElementType
......
......@@ -7394,7 +7394,7 @@ private void WriteTextSection(System.IO.Stream peStream, MemoryStream metadataSt
this.WriteManagedResources(peStream);
this.WriteSpaceForHash(peStream);
this.WriteDebugTable(peStream);
// this.WriteUnmangedExportStubs();
// this.WriteUnmanagedExportStubs();
if (this.emitRuntimeStartupStub) this.WriteImportTable(peStream);
if (this.emitRuntimeStartupStub) this.WriteNameTable(peStream);
if (this.emitRuntimeStartupStub) this.WriteRuntimeStartupStub(peStream);
......@@ -7579,7 +7579,7 @@ private void WriteDebugTable(System.IO.Stream peStream)
stream.Free();
}
// private void WriteUnmangedExportStubs() { }
// private void WriteUnmanagedExportStubs() { }
private void WriteRuntimeStartupStub(System.IO.Stream peStream)
{
......
......@@ -3425,7 +3425,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
' If we can't find a common type, create an error type. If all the types have a common name,
' that name is used as the type of the error type (useful in ambiguous type lookup situations)
Private Function GetCommonExpressionType(
symbolRefernce As VisualBasicSyntaxNode,
symbolReference As VisualBasicSyntaxNode,
symbols As ImmutableArray(Of Symbol),
constantFieldsInProgress As SymbolsInProgress(Of FieldSymbol)
) As TypeSymbol
......@@ -3438,7 +3438,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
For i As Integer = 0 To symbols.Length - 1
Dim expressionType As TypeSymbol = GetExpressionType(symbolRefernce, symbols(i), constantFieldsInProgress, diagnostics)
Dim expressionType As TypeSymbol = GetExpressionType(symbolReference, symbols(i), constantFieldsInProgress, diagnostics)
If expressionType IsNot Nothing Then
......@@ -3471,7 +3471,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
' Get the "expression type" of a symbol when used in an expression.
Private Function GetExpressionType(
symbolRefernce As VisualBasicSyntaxNode,
symbolReference As VisualBasicSyntaxNode,
s As Symbol,
constantFieldsInProgress As SymbolsInProgress(Of FieldSymbol),
diagnostics As DiagnosticBag
......@@ -3488,7 +3488,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Case SymbolKind.Parameter
Return DirectCast(s, ParameterSymbol).Type
Case SymbolKind.Local
Return GetLocalSymbolType(DirectCast(s, LocalSymbol), symbolRefernce, diagnostics)
Return GetLocalSymbolType(DirectCast(s, LocalSymbol), symbolReference, diagnostics)
Case SymbolKind.RangeVariable
Return DirectCast(s, RangeVariableSymbol).Type
Case Else
......
......@@ -2254,7 +2254,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
<Out()> ByRef actualEventAccess As BoundEventAccess,
<Out()> ByRef eventSymbol As EventSymbol) As BoundExpression
' event must be a simple name that could be qualified and perhaps parethesised
' event must be a simple name that could be qualified and perhaps parethesized
' Examples: foo , (foo) , (bar.foo) , baz.moo(of T).goo
Dim notParenthesizedSyntax = node
While notParenthesizedSyntax.Kind = SyntaxKind.ParenthesizedExpression
......
......@@ -27,7 +27,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End If
'TODO: I have seen other places where we do similar digging.
' It seems a bit bug-prone. What if Nothing is wrapped in more than one conversion or a parenthesised or whatever...?
' It seems a bit bug-prone. What if Nothing is wrapped in more than one conversion or a parenthesized or whatever...?
' Perhaps it may be worth it to introduce BoundDefault and reduce the "default value" patterns to
' a node with unambiguous meaning?
......
......@@ -86,7 +86,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.CodeGen
Case BoundKind.Parenthesized
' rewriter should take care of Parethesized
'
' we do not know how to emit address of a parethesised without context.
' we do not know how to emit address of a parethesized without context.
' when it is an argument like foo((arg)), it must be cloned,
' in other cases like (receiver).foo() it might not need to be...
'
......
......@@ -1253,7 +1253,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.CodeGen
syntaxNode As VisualBasicSyntaxNode)
Debug.Assert(Not constructor.IsParameterlessStructConstructor(requireSynthesized:=True),
"do not call synthesised struct constructors, they do not exist")
"do not call synthesized struct constructors, they do not exist")
EmitArguments(arguments, constructor.Parameters)
_builder.EmitOpCode(ILOpCode.Newobj, ILOpCode.Newobj.StackPushCount() - arguments.Length)
......
......@@ -1617,7 +1617,7 @@ lVbRuntimePlus:
Exit Do
End If
' Expresion parsed successfully --> evaluate it
' Expression parsed successfully --> evaluate it
Dim value As InternalSyntax.CConst =
InternalSyntax.ExpressionEvaluator.EvaluateExpression(
......@@ -1636,7 +1636,7 @@ lVbRuntimePlus:
Exit Do
End If
' Expresion evaluated successfully --> add to 'defines'
' Expression evaluated successfully --> add to 'defines'
If defines.ContainsKey(symbolName) Then
defines = defines.Remove(symbolName)
End If
......
......@@ -260,8 +260,8 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Return Me.F.Block(blockBuilder.ToImmutableAndFree())
End Function
Protected Overrides Function MaterializeProxy(origExpresion As BoundExpression, proxy As CapturedSymbolOrExpression) As BoundNode
Return proxy.Materialize(Me, origExpresion.IsLValue)
Protected Overrides Function MaterializeProxy(origExpression As BoundExpression, proxy As CapturedSymbolOrExpression) As BoundNode
Return proxy.Materialize(Me, origExpression.IsLValue)
End Function
Friend Overrides Sub AddProxyFieldsForStateMachineScope(proxy As CapturedSymbolOrExpression, proxyFields As ArrayBuilder(Of FieldSymbol))
......
......@@ -209,11 +209,11 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
proxyFields.Add(proxy)
End Sub
Protected Overrides Function MaterializeProxy(origExpresion As BoundExpression, proxy As FieldSymbol) As BoundNode
Protected Overrides Function MaterializeProxy(origExpression As BoundExpression, proxy As FieldSymbol) As BoundNode
Dim syntax As VisualBasicSyntaxNode = Me.F.Syntax
Dim framePointer As BoundExpression = Me.FramePointer(syntax, proxy.ContainingType)
Dim proxyFieldParented = proxy.AsMember(DirectCast(framePointer.Type, NamedTypeSymbol))
Return Me.F.Field(framePointer, proxyFieldParented, origExpresion.IsLValue)
Return Me.F.Field(framePointer, proxyFieldParented, origExpression.IsLValue)
End Function
End Class
End Class
......
......@@ -251,13 +251,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Return New BoundLocal(syntax, localFrame, isLValue:=False, type:=localFrame.Type)
End Function
Protected Overrides Function MaterializeProxy(origExpresion As BoundExpression, proxy As FieldSymbol) As BoundNode
Dim frame As BoundExpression = FramePointer(origExpresion.Syntax, proxy.ContainingType)
Protected Overrides Function MaterializeProxy(origExpression As BoundExpression, proxy As FieldSymbol) As BoundNode
Dim frame As BoundExpression = FramePointer(origExpression.Syntax, proxy.ContainingType)
Dim constructedProxyField = proxy.AsMember(DirectCast(frame.Type, NamedTypeSymbol))
Return New BoundFieldAccess(origExpresion.Syntax,
Return New BoundFieldAccess(origExpression.Syntax,
frame,
constructedProxyField,
origExpresion.IsLValue,
origExpression.IsLValue,
constructedProxyField.Type)
End Function
......
......@@ -233,7 +233,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Return DirectCast(node, BoundEventAccess)
End If
Debug.Assert(node.Kind = BoundKind.Parenthesized, "node can only be EventAccess or Parenthesised")
Debug.Assert(node.Kind = BoundKind.Parenthesized, "node can only be EventAccess or Parenthesized")
Return UnwrapEventAccess(DirectCast(node, BoundParenthesized).Expression)
End Function
......
......@@ -20,7 +20,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Inherits BoundTreeRewriter
''' <summary>
''' Base for synthesised Lambda methods.
''' Base for synthesized Lambda methods.
''' Just provides a bunch of defaults
''' </summary>
Friend MustInherit Class SynthesizedMethod
......
......@@ -153,7 +153,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End If
End Function
Protected MustOverride Function MaterializeProxy(origExpresion As BoundExpression, proxy As TProxy) As BoundNode
Protected MustOverride Function MaterializeProxy(origExpression As BoundExpression, proxy As TProxy) As BoundNode
''' <summary>
''' Maps not-lifted parameter, since the parameter was not lifted, it must be an actual lambda's parameter
......
......@@ -153,7 +153,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Syntax.InternalSyntax
Return EvaluateLiteralExpression(DirectCast(expr, LiteralExpressionSyntax))
Case SyntaxKind.ParenthesizedExpression
Return EvaluateParenthesisedExpression(DirectCast(expr, ParenthesizedExpressionSyntax))
Return EvaluateParenthesizedExpression(DirectCast(expr, ParenthesizedExpressionSyntax))
Case SyntaxKind.IdentifierName
Return EvaluateIdentifierNameExpression(DirectCast(expr, IdentifierNameSyntax))
......@@ -264,7 +264,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Syntax.InternalSyntax
End Function
Private Function EvaluateParenthesisedExpression(expr As ParenthesizedExpressionSyntax) As CConst
Private Function EvaluateParenthesizedExpression(expr As ParenthesizedExpressionSyntax) As CConst
Return EvaluateExpressionInternal(expr.Expression)
End Function
......
......@@ -779,7 +779,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
' granted provided the simple assembly names match. When such access is granted
' the assembly to which we have been granted access is noted (m_optimisticallyGrantedInternalsAccess).
' After the public key has been computed, the set of optimistic grants is reexamined
' to insure that full identities match. This may produce diagnostics.
' to ensure that full identities match. This may produce diagnostics.
' EDMAURER please don't use thread local storage widely. This is hoped to be a one-off usage.
<ThreadStatic()>
......
......@@ -47,7 +47,7 @@ Most significant structural changes from native/LM trees:
Unify FromItem and LinqSource into the same node (CollectionRangeVariable).
WHen FromExpresison was used as the source of an Aggregate, instead use JoinOrAggregateSource.
When FromExpressison was used as the source of an Aggregate, instead use JoinOrAggregateSource.
Remove CrossJoin node, just represent as FromOperators with a source.
-->
......
......@@ -95,7 +95,7 @@ public override SyntaxNode CreateElementAccessExpression(SyntaxNode expression,
public override SyntaxNode CreateDefaultExpression(ITypeSymbol type)
{
// If it's just a reference type, then "null" is the default expresison for it. Note:
// If it's just a reference type, then "null" is the default expressison for it. Note:
// this counts for actual reference type, or a type parameter with a 'class' constraint.
// Also, if it's a nullable type, then we can use "null".
if (type.IsReferenceType ||
......
......@@ -225,13 +225,13 @@ private static async Task AddSubmissionDependentProjectsAsync(Solution solution,
var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
if (compilation.PreviousSubmission != null)
{
var refrencedProject = solution.GetProject(compilation.PreviousSubmission.Assembly);
var referencedProject = solution.GetProject(compilation.PreviousSubmission.Assembly);
List<ProjectId> referencingSubmissions = null;
if (!projectIdsToReferencingSubmissionIds.TryGetValue(refrencedProject.Id, out referencingSubmissions))
if (!projectIdsToReferencingSubmissionIds.TryGetValue(referencedProject.Id, out referencingSubmissions))
{
referencingSubmissions = new List<ProjectId>();
projectIdsToReferencingSubmissionIds.Add(refrencedProject.Id, referencingSubmissions);
projectIdsToReferencingSubmissionIds.Add(referencedProject.Id, referencingSubmissions);
}
referencingSubmissions.Add(project.Id);
......
......@@ -98,7 +98,7 @@ private List<IndentBlockOperation> GetInitialIndentBlockOperations(SyntaxToken s
node = node.Parent;
}
// make sure operations we have has effects over the formating span
// make sure operations we have has effects over the formatting span
operations.RemoveAll(o => o == null || !o.TextSpan.IntersectsWith(span));
// we couldn't find anything
......
......@@ -201,7 +201,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Extensions
End If
' If removing the cast will result in a change in semantics of any of the parenting nodes, we won't remove it.
' We do this even for identity casts in case removing that cast might affect type inferrence.
' We do this even for identity casts in case removing that cast might affect type inference.
If speculationAnalyzer.ReplacementChangesSemantics() Then
Return False
End If
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册