Skip to content
Permalink
Browse files

Generate all files in Generated\ directy, one file per namespace. Upd…

…ate generate-compiler-code script to test the output.
  • Loading branch information...
333fred committed Jul 31, 2019
1 parent 19befb3 commit a339db3149fddacbd91788c32dce5c5ac01516a3
Showing with 2,954 additions and 3,707 deletions.
  1. +1 −0 Compilers.slnf
  2. +4 −2 eng/generate-compiler-code.ps1
  3. +111 −0 src/Compilers/Core/Portable/Generated/FlowAnalysis.Generated.cs
  4. +2 −1 src/Compilers/Core/Portable/{Operations/OperationKind.cs → Generated/OperationKind.Generated.cs}
  5. +2,756 −0 src/Compilers/Core/Portable/Generated/Operations.Generated.cs
  6. +0 −24 src/Compilers/Core/Portable/Operations/IAddressOfOperation.cs
  7. +0 −18 src/Compilers/Core/Portable/Operations/IAggregateQueryOperation.cs
  8. +0 −29 src/Compilers/Core/Portable/Operations/IAnonymousFunctionOperation.cs
  9. +0 −28 src/Compilers/Core/Portable/Operations/IAnonymousObjectCreationOperation.cs
  10. +0 −41 src/Compilers/Core/Portable/Operations/IArgumentOperation.cs
  11. +0 −30 src/Compilers/Core/Portable/Operations/IArrayCreationOperation.cs
  12. +0 −30 src/Compilers/Core/Portable/Operations/IArrayElementReferenceOperation.cs
  13. +0 −26 src/Compilers/Core/Portable/Operations/IArrayInitializerOperation.cs
  14. +0 −29 src/Compilers/Core/Portable/Operations/IAssignmentOperation.cs
  15. +0 −25 src/Compilers/Core/Portable/Operations/IAwaitOperation.cs
  16. +0 −52 src/Compilers/Core/Portable/Operations/IBinaryOperation.cs
  17. +0 −30 src/Compilers/Core/Portable/Operations/IBlockOperation.cs
  18. +0 −29 src/Compilers/Core/Portable/Operations/IBranchOperation.cs
  19. +0 −29 src/Compilers/Core/Portable/Operations/ICaseClauseOperation.cs
  20. +0 −46 src/Compilers/Core/Portable/Operations/ICatchClauseOperation.cs
  21. +0 −18 src/Compilers/Core/Portable/Operations/ICaughtExceptionOperation.cs
  22. +0 −23 src/Compilers/Core/Portable/Operations/ICoalesceAssignmentOperation.cs
  23. +0 −38 src/Compilers/Core/Portable/Operations/ICoalesceOperation.cs
  24. +0 −26 src/Compilers/Core/Portable/Operations/ICollectionElementInitializerOperation.cs
  25. +0 −46 src/Compilers/Core/Portable/Operations/ICompoundAssignmentOperation.cs
  26. +0 −23 src/Compilers/Core/Portable/Operations/IConditionalAccessInstanceOperation.cs
  27. +0 −30 src/Compilers/Core/Portable/Operations/IConditionalAccessOperation.cs
  28. +0 −40 src/Compilers/Core/Portable/Operations/IConditionalOperation.cs
  29. +0 −24 src/Compilers/Core/Portable/Operations/IConstantPatternOperation.cs
  30. +0 −29 src/Compilers/Core/Portable/Operations/IConstructorBodyOperation.cs
  31. +0 −47 src/Compilers/Core/Portable/Operations/IConversionOperation.cs
  32. +0 −27 src/Compilers/Core/Portable/Operations/IDeclarationExpressionOperation.cs
  33. +0 −34 src/Compilers/Core/Portable/Operations/IDeclarationPatternOperation.cs
  34. +0 −20 src/Compilers/Core/Portable/Operations/IDeconstructionAssignmentOperation.cs
  35. +0 −21 src/Compilers/Core/Portable/Operations/IDefaultCaseClauseOperation.cs
  36. +0 −20 src/Compilers/Core/Portable/Operations/IDefaultValueOperation.cs
  37. +0 −25 src/Compilers/Core/Portable/Operations/IDelegateCreationOperation.cs
  38. +0 −23 src/Compilers/Core/Portable/Operations/IDiscardOperation.cs
  39. +0 −19 src/Compilers/Core/Portable/Operations/IDiscardPatternOperation.cs
  40. +0 −29 src/Compilers/Core/Portable/Operations/IDynamicIndexerAccessOperation.cs
  41. +0 −37 src/Compilers/Core/Portable/Operations/IDynamicInvocationOperation.cs
  42. +0 −38 src/Compilers/Core/Portable/Operations/IDynamicMemberReferenceOperation.cs
  43. +0 −30 src/Compilers/Core/Portable/Operations/IDynamicObjectCreationOperation.cs
  44. +0 −20 src/Compilers/Core/Portable/Operations/IEmptyOperation.cs
  45. +0 −20 src/Compilers/Core/Portable/Operations/IEndOperation.cs
  46. +0 −33 src/Compilers/Core/Portable/Operations/IEventAssignmentOperation.cs
  47. +0 −25 src/Compilers/Core/Portable/Operations/IEventReferenceOperation.cs
  48. +0 −25 src/Compilers/Core/Portable/Operations/IExpressionStatementOperation.cs
  49. +0 −26 src/Compilers/Core/Portable/Operations/IFieldInitializerOperation.cs
  50. +0 −33 src/Compilers/Core/Portable/Operations/IFieldReferenceOperation.cs
  51. +0 −29 src/Compilers/Core/Portable/Operations/IFixedOperation.cs
  52. +0 −28 src/Compilers/Core/Portable/Operations/IFlowAnonymousFunctionOperation.cs
  53. +0 −26 src/Compilers/Core/Portable/Operations/IFlowCaptureOperation.cs
  54. +0 −23 src/Compilers/Core/Portable/Operations/IFlowCaptureReferenceOperation.cs
  55. +0 −35 src/Compilers/Core/Portable/Operations/IForEachLoopOperation.cs
  56. +0 −39 src/Compilers/Core/Portable/Operations/IForLoopOperation.cs
  57. +0 −46 src/Compilers/Core/Portable/Operations/IForToLoopOperation.cs
  58. +0 −45 src/Compilers/Core/Portable/Operations/IIncrementOrDecrementOperation.cs
  59. +0 −27 src/Compilers/Core/Portable/Operations/IInstanceReferenceOperation.cs
  60. +0 −21 src/Compilers/Core/Portable/Operations/IInterpolatedStringContentOperation.cs
  61. +0 −26 src/Compilers/Core/Portable/Operations/IInterpolatedStringOperation.cs
  62. +0 −25 src/Compilers/Core/Portable/Operations/IInterpolatedStringTextOperation.cs
  63. +0 −33 src/Compilers/Core/Portable/Operations/IInterpolationOperation.cs
  64. +0 −21 src/Compilers/Core/Portable/Operations/IInvalidOperation.cs
  65. +0 −49 src/Compilers/Core/Portable/Operations/IInvocationOperation.cs
  66. +0 −25 src/Compilers/Core/Portable/Operations/IIsNullOperation.cs
  67. +0 −28 src/Compilers/Core/Portable/Operations/IIsPatternOperation.cs
  68. +0 −35 src/Compilers/Core/Portable/Operations/IIsTypeOperation.cs
  69. +0 −29 src/Compilers/Core/Portable/Operations/ILabeledOperation.cs
  70. +0 −21 src/Compilers/Core/Portable/Operations/ILiteralOperation.cs
  71. +0 −35 src/Compilers/Core/Portable/Operations/ILocalFunctionOperation.cs
  72. +0 −30 src/Compilers/Core/Portable/Operations/ILocalReferenceOperation.cs
  73. +0 −29 src/Compilers/Core/Portable/Operations/ILockOperation.cs
  74. +0 −42 src/Compilers/Core/Portable/Operations/ILoopOperation.cs
  75. +0 −30 src/Compilers/Core/Portable/Operations/IMemberInitializerOperation.cs
  76. +0 −29 src/Compilers/Core/Portable/Operations/IMemberReferenceOperation.cs
  77. +0 −28 src/Compilers/Core/Portable/Operations/IMethodBodyBaseOperation.cs
  78. +0 −20 src/Compilers/Core/Portable/Operations/IMethodBodyOperation.cs
  79. +0 −29 src/Compilers/Core/Portable/Operations/IMethodReferenceOperation.cs
  80. +0 −25 src/Compilers/Core/Portable/Operations/INameOfOperation.cs
  81. +0 −25 src/Compilers/Core/Portable/Operations/INoPiaObjectCreationOperation.cs
  82. +0 −38 src/Compilers/Core/Portable/Operations/IObjectCreationOperation.cs
  83. +0 −28 src/Compilers/Core/Portable/Operations/IObjectOrCollectionInitializerOperation.cs
  84. +0 −20 src/Compilers/Core/Portable/Operations/IOmittedArgumentOperation.cs
  85. +0 −25 src/Compilers/Core/Portable/Operations/IParameterInitializerOperation.cs
  86. +0 −25 src/Compilers/Core/Portable/Operations/IParameterReferenceOperation.cs
  87. +0 −24 src/Compilers/Core/Portable/Operations/IParenthesizedOperation.cs
  88. +0 −33 src/Compilers/Core/Portable/Operations/IPatternCaseClauseOperation.cs
  89. +0 −24 src/Compilers/Core/Portable/Operations/IPatternOperation.cs
  90. +0 −18 src/Compilers/Core/Portable/Operations/IPlaceholderOperation.cs
  91. +0 −24 src/Compilers/Core/Portable/Operations/IPointerIndirectionReferenceOperation.cs
  92. +0 −26 src/Compilers/Core/Portable/Operations/IPropertyInitializerOperation.cs
  93. +0 −34 src/Compilers/Core/Portable/Operations/IPropertyReferenceOperation.cs
  94. +0 −26 src/Compilers/Core/Portable/Operations/IPropertySubpatternOperation.cs
  95. +0 −33 src/Compilers/Core/Portable/Operations/IRaiseEventOperation.cs
  96. +0 −28 src/Compilers/Core/Portable/Operations/IRangeCaseClauseOperation.cs
  97. +0 −40 src/Compilers/Core/Portable/Operations/IRangeOperation.cs
  98. +0 −29 src/Compilers/Core/Portable/Operations/IReDimClauseOperation.cs
  99. +0 −29 src/Compilers/Core/Portable/Operations/IReDimOperation.cs
  100. +0 −39 src/Compilers/Core/Portable/Operations/IRecursivePatternOperation.cs
  101. +0 −28 src/Compilers/Core/Portable/Operations/IRelationalCaseClauseOperation.cs
  102. +0 −25 src/Compilers/Core/Portable/Operations/IReturnOperation.cs
  103. +0 −25 src/Compilers/Core/Portable/Operations/ISimpleAssignmentOperation.cs
  104. +0 −25 src/Compilers/Core/Portable/Operations/ISingleValueCaseClauseOperation.cs
  105. +0 −24 src/Compilers/Core/Portable/Operations/ISizeOfOperation.cs
  106. +0 −24 src/Compilers/Core/Portable/Operations/IStaticLocalInitializationSemaphoreOperation.cs
  107. +0 −20 src/Compilers/Core/Portable/Operations/IStopOperation.cs
  108. +0 −34 src/Compilers/Core/Portable/Operations/ISwitchCaseOperation.cs
  109. +0 −33 src/Compilers/Core/Portable/Operations/ISwitchExpressionArmOperation.cs
  110. +0 −29 src/Compilers/Core/Portable/Operations/ISwitchExpressionOperation.cs
  111. +0 −38 src/Compilers/Core/Portable/Operations/ISwitchOperation.cs
  112. +0 −30 src/Compilers/Core/Portable/Operations/ISymbolInitializerOperation.cs
  113. +0 −26 src/Compilers/Core/Portable/Operations/IThrowOperation.cs
  114. +0 −30 src/Compilers/Core/Portable/Operations/ITranslatedQueryOperation.cs
  115. +0 −38 src/Compilers/Core/Portable/Operations/ITryOperation.cs
  116. +0 −32 src/Compilers/Core/Portable/Operations/ITupleBinaryOperation.cs
  117. +0 −32 src/Compilers/Core/Portable/Operations/ITupleOperation.cs
  118. +0 −25 src/Compilers/Core/Portable/Operations/ITypeOfOperation.cs
  119. +0 −25 src/Compilers/Core/Portable/Operations/ITypeParameterObjectCreationOperation.cs
  120. +0 −44 src/Compilers/Core/Portable/Operations/IUnaryOperation.cs
  121. +0 −34 src/Compilers/Core/Portable/Operations/IUsingOperation.cs
  122. +0 −32 src/Compilers/Core/Portable/Operations/IVariableDeclarationGroupOperation.cs
  123. +0 −49 src/Compilers/Core/Portable/Operations/IVariableDeclarationOperation.cs
  124. +0 −44 src/Compilers/Core/Portable/Operations/IVariableDeclaratorOperation.cs
  125. +0 −21 src/Compilers/Core/Portable/Operations/IVariableInitializerOperation.cs
  126. +0 −41 src/Compilers/Core/Portable/Operations/IWhileLoopOperation.cs
  127. +0 −28 src/Compilers/Core/Portable/Operations/IWithOperation.cs
  128. +80 −77 src/Tools/Source/CompilerGeneratorTools/Source/IOperationGenerator/IOperationClassWriter.cs
@@ -44,6 +44,7 @@
"src\\Tools\\Source\\CompilerGeneratorTools\\Source\\BoundTreeGenerator\\CompilersBoundTreeGenerator.csproj",
"src\\Tools\\Source\\CompilerGeneratorTools\\Source\\CSharpErrorFactsGenerator\\CSharpErrorFactsGenerator.csproj",
"src\\Tools\\Source\\CompilerGeneratorTools\\Source\\CSharpSyntaxGenerator\\CSharpSyntaxGenerator.csproj",
"src\\Tools\\Source\\CompilerGeneratorTools\\Source\\IOperationGenerator\\CompilersIOperationGenerator.csproj",
"src\\Tools\\Source\\CompilerGeneratorTools\\Source\\VisualBasicErrorFactsGenerator\\VisualBasicErrorFactsGenerator.vbproj",
"src\\Tools\\Source\\CompilerGeneratorTools\\Source\\VisualBasicSyntaxGenerator\\VisualBasicSyntaxGenerator.vbproj"
]
@@ -67,13 +67,15 @@ function Run-Language($language, $languageSuffix, $languageDir, $languageTestDir
function Run-IOperation($coreDir, $ioperationProject) {
$operationsDir = Join-Path $coreDir "Operations"
$operationsXml = Join-Path $operationsDir "OperationInterfaces.xml"
$generationDir = Join-Path $coreDir "Generated"

if (-not $test) {
Run-Tool $ioperationProject "`"$operationsXml`" `"$operationsDir`""
Run-Tool $ioperationProject "`"$operationsXml`" `"$generationDir`""
} else {
$scratchDir = Join-Path $generationTempDir "Core\Operations"
Create-Directory $scratchDir
Run-Tool $ioperationProject "`"$operationsXml`" `"$scratchDir`""
# Test-GeneratedContent $operationsDir $scratchDir
Test-GeneratedContent $generationDir $scratchDir
}
}

@@ -0,0 +1,111 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// < auto-generated />
using System;
using System.Collections.Immutable;
using Microsoft.CodeAnalysis.Operations;

namespace Microsoft.CodeAnalysis.FlowAnalysis
{
/// <summary>
/// Represents that an intermediate result is being captured.
/// This node is produced only as part of a <see cref="ControlFlowGraph" />.
/// </summary>
/// <remarks>
/// This interface is reserved for implementation by its associated APIs. We reserve the right to
/// change it in the future.
/// </remarks>
public interface IFlowCaptureOperation : IOperation
{
/// <summary>
/// An id used to match references to the same intermediate result.
/// </summary>
CaptureId Id { get; }
/// <summary>
/// Value to be captured.
/// </summary>
IOperation Value { get; }
}
/// <summary>
/// Represents a point of use of an intermediate result captured earlier.
/// The fact of capturing the result is represented by <see cref="IFlowCaptureOperation" />.
/// This node is produced only as part of a <see cref="ControlFlowGraph" />.
/// </summary>
/// <remarks>
/// This interface is reserved for implementation by its associated APIs. We reserve the right to
/// change it in the future.
/// </remarks>
public interface IFlowCaptureReferenceOperation : IOperation
{
/// <summary>
/// An id used to match references to the same intermediate result.
/// </summary>
CaptureId Id { get; }
}
/// <summary>
/// Represents result of checking whether the <see cref="Operand" /> is null.
/// For reference types this checks if the <see cref="Operand" /> is a null reference,
/// for nullable types this checks if the <see cref="Operand" /> doesn’t have a value.
/// The node is produced as part of a flow graph during rewrite of <see cref="ICoalesceOperation" />
/// and <see cref="IConditionalAccessOperation" /> nodes.
/// </summary>
/// <remarks>
/// This interface is reserved for implementation by its associated APIs. We reserve the right to
/// change it in the future.
/// </remarks>
public interface IIsNullOperation : IOperation
{
/// <summary>
/// Value to check.
/// </summary>
IOperation Operand { get; }
}
/// <summary>
/// Represents a exception instance passed by an execution environment to an exception filter or handler.
/// This node is produced only as part of a <see cref="ControlFlowGraph" />.
/// </summary>
/// <remarks>
/// This interface is reserved for implementation by its associated APIs. We reserve the right to
/// change it in the future.
/// </remarks>
public interface ICaughtExceptionOperation : IOperation
{
}
/// <summary>
/// Represents the check during initialization of a VB static local that is initialized on the first call of the function, and never again.
/// If the semaphore operation returns true, the static local has not yet been initialized, and the initializer will be run. If it returns
/// false, then the local has already been initialized, and the static local initializer region will be skipped.
/// This node is produced only as part of a <see cref="ControlFlowGraph" />.
/// </summary>
/// <remarks>
/// This interface is reserved for implementation by its associated APIs. We reserve the right to
/// change it in the future.
/// </remarks>
public interface IStaticLocalInitializationSemaphoreOperation : IOperation
{
/// <summary>
/// The static local variable that is possibly initialized.
/// </summary>
ILocalSymbol Local { get; }
}
/// <summary>
/// Represents an anonymous function operation in context of a <see cref="ControlFlowGraph" />.
/// <para>
/// Current usage:
/// (1) C# lambda expression.
/// (2) VB anonymous delegate expression.
/// </para>
/// A <see cref="ControlFlowGraph" /> for the body of the anonymous function is available from
/// the enclosing <see cref="ControlFlowGraph" />.
/// </summary>
/// <remarks>
/// This interface is reserved for implementation by its associated APIs. We reserve the right to
/// change it in the future.
/// </remarks>
public interface IFlowAnonymousFunctionOperation : IOperation
{
/// <summary>
/// Symbol of the anonymous function.
/// </summary>
IMethodSymbol Symbol { get; }
}
}
@@ -1,4 +1,5 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// < auto-generated />
using System;
using System.ComponentModel;
using Microsoft.CodeAnalysis.FlowAnalysis;

0 comments on commit a339db3

Please sign in to comment.
You can’t perform that action at this time.