提交 03758376 编写于 作者: A acasey

VB Expression Compiler

Port EEMethodSymbol to VB and eliminate EEParameterSymbol from both languages (just use SynthesizedParameterSymbol).

Bonus: Fix a couple typos. (changeset 1277348)
上级 bc8536c3
......@@ -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,
<Out()> ByRef rewrittenNodes As HashSet(Of BoundNode),
<Out()> ByRef hasLambdas As Boolean,
<Out()> ByRef symbolsCapturedWithoutCtor As ISet(Of Symbol),
<Out()> 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,
......
......@@ -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)
......
......@@ -150,7 +150,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
''' <summary>
''' Generates the name of a state machine field name for captured me reference of lambda closure
''' </summary>
Public Shared Function MakeStateMachineCaptiredClosureMeName(closureName As String) As String
Public Shared Function MakeStateMachineCapturedClosureMeName(closureName As String) As String
Return StringConstants.LiftedNonLocalPrefix & closureName
End Function
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册