From 037583768c99715de22148241732745aafca26a1 Mon Sep 17 00:00:00 2001 From: acasey Date: Thu, 12 Jun 2014 10:51:50 -0700 Subject: [PATCH] VB Expression Compiler Port EEMethodSymbol to VB and eliminate EEParameterSymbol from both languages (just use SynthesizedParameterSymbol). Bonus: Fix a couple typos. (changeset 1277348) --- .../Source/Lowering/LocalRewriter/LocalRewriter.vb | 12 ++++++------ .../StateMachineRewriter/StateMachineRewriter.vb | 2 +- .../Symbols/SynthesizedSymbols/GeneratedNames.vb | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Src/Compilers/VisualBasic/Source/Lowering/LocalRewriter/LocalRewriter.vb b/Src/Compilers/VisualBasic/Source/Lowering/LocalRewriter/LocalRewriter.vb index 4c5c67848c3..fcabac1f7bd 100644 --- a/Src/Compilers/VisualBasic/Source/Lowering/LocalRewriter/LocalRewriter.vb +++ b/Src/Compilers/VisualBasic/Source/Lowering/LocalRewriter/LocalRewriter.vb @@ -117,7 +117,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic Private Sub New( topMethod As MethodSymbol, - currentMethid As MethodSymbol, + currentMethod As MethodSymbol, compilationState As TypeCompilationState, previousSubmissionFields As SynthesizedSubmissionFields, generateDebugInfo As Boolean, @@ -125,7 +125,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic flags As RewritingFlags ) Me.topMethod = topMethod - Me.currentMethodOrLambda = currentMethid + Me.currentMethodOrLambda = currentMethod Me.globalGenerateDebugInfo = generateDebugInfo Me.emitModule = compilationState.EmitModule Me.compilationState = compilationState @@ -136,7 +136,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic Private Shared Function RewriteNode(node As BoundNode, topMethod As MethodSymbol, - currentMethid As MethodSymbol, + currentMethod As MethodSymbol, compilationState As TypeCompilationState, previousSubmissionFields As SynthesizedSubmissionFields, generateDebugInfo As Boolean, @@ -148,7 +148,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic Debug.Assert(node Is Nothing OrElse Not node.HasErrors, "node has errors") - Dim rewriter = New LocalRewriter(topMethod, currentMethid, compilationState, previousSubmissionFields, generateDebugInfo, diagnostics, flags) + Dim rewriter = New LocalRewriter(topMethod, currentMethod, compilationState, previousSubmissionFields, generateDebugInfo, diagnostics, flags) #If DEBUG Then If rewrittenNodes IsNot Nothing Then @@ -197,12 +197,12 @@ Namespace Microsoft.CodeAnalysis.VisualBasic diagnostics As DiagnosticBag, ByRef rewrittenNodes As HashSet(Of BoundNode), ByRef hasLambdas As Boolean, - ByRef symbolsCapturedWithoutCtor As ISet(Of Symbol), + ByRef symbolsCapturedWithoutCopyCtor As ISet(Of Symbol), Optional flags As RewritingFlags = RewritingFlags.Default, Optional currentMethod As MethodSymbol = Nothing) As BoundBlock Debug.Assert(rewrittenNodes Is Nothing) - Return DirectCast(RewriteNode(node, topMethod, If(currentMethod, topMethod), compilationState, previousSubmissionFields, generateDebugInfo, diagnostics, rewrittenNodes, hasLambdas, symbolsCapturedWithoutCtor, flags), BoundBlock) + Return DirectCast(RewriteNode(node, topMethod, If(currentMethod, topMethod), compilationState, previousSubmissionFields, generateDebugInfo, diagnostics, rewrittenNodes, hasLambdas, symbolsCapturedWithoutCopyCtor, flags), BoundBlock) End Function Public Shared Function Rewrite(node As BoundExpression, diff --git a/Src/Compilers/VisualBasic/Source/Lowering/StateMachineRewriter/StateMachineRewriter.vb b/Src/Compilers/VisualBasic/Source/Lowering/StateMachineRewriter/StateMachineRewriter.vb index fb99a184229..2ae925114b4 100644 --- a/Src/Compilers/VisualBasic/Source/Lowering/StateMachineRewriter/StateMachineRewriter.vb +++ b/Src/Compilers/VisualBasic/Source/Lowering/StateMachineRewriter/StateMachineRewriter.vb @@ -217,7 +217,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic Method.ContainingType, Me.Method, If(isMeOfClosureType, - GeneratedNames.MakeStateMachineCaptiredClosureMeName(typeName), + GeneratedNames.MakeStateMachineCapturedClosureMeName(typeName), GeneratedNames.MakeStateMachineCapturedMeName()), Accessibility.Friend), parameter) diff --git a/Src/Compilers/VisualBasic/Source/Symbols/SynthesizedSymbols/GeneratedNames.vb b/Src/Compilers/VisualBasic/Source/Symbols/SynthesizedSymbols/GeneratedNames.vb index 231d5f24398..1b3593d1d7d 100644 --- a/Src/Compilers/VisualBasic/Source/Symbols/SynthesizedSymbols/GeneratedNames.vb +++ b/Src/Compilers/VisualBasic/Source/Symbols/SynthesizedSymbols/GeneratedNames.vb @@ -150,7 +150,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols ''' ''' Generates the name of a state machine field name for captured me reference of lambda closure ''' - Public Shared Function MakeStateMachineCaptiredClosureMeName(closureName As String) As String + Public Shared Function MakeStateMachineCapturedClosureMeName(closureName As String) As String Return StringConstants.LiftedNonLocalPrefix & closureName End Function -- GitLab