This repository was archived by the owner on Nov 13, 2026. It is now read-only.
Repository navigation
Refactor EEType - #1621
Merged
Merged
Refactor EEType#1621
Conversation
nattress
force-pushed
the
refactor_eetype_2
branch
from
August 6, 2016 02:41
f69bac6 to
305289b
Compare
Contributor
Author
|
@dotnet-bot Please test Windows_NT Debug |
Contributor
Author
|
@MichalStrehovsky PTAL |
Contributor
Author
Member
|
Looks fine to me. (I do not have strong opinions on the right balance between object hierarchy vs. if-checks.) |
| if (_type.IsInterface) | ||
| flags |= (short)EETypeFlags.IsInterfaceFlag; | ||
|
|
||
| dataBuilder.EmitShort(0); // ComponentSize is always 0 |
Member
There was a problem hiding this comment.
ComponentSize should be the number of generic parameters.
Member
|
I usually prefer having an abstract class as opposed to a deriving class that tries to suppress behaviors of the base (because not overriding an abstract method is a compile error but forgetting to suppress a behavior by overriding is not), but it's fewer |
| /// | | ||
| /// [Pointer Size] | Pointer to the generic argument and variance info (optional) | ||
| /// </summary> | ||
| internal sealed partial class EETypeNode : ObjectNode, ISymbolNode, IEETypeNode |
Member
There was a problem hiding this comment.
Could you seal the overrides that can be sealed?
nattress
force-pushed
the
refactor_eetype_2
branch
from
August 8, 2016 19:43
305289b to
a13d10e
Compare
Contributor
Author
|
@MichalStrehovsky Updated with requested changes. |
Member
|
LGTM |
Split EEType into two pieces: the non-constructed EETypeNode and the constructed ConstructedEETypeNode. Generic type definitions get their own GenericDefinitionEETypeNode node which matches the the one produced by the binder. Both the constructed and the generic nodes inherit from EETypeNode. GenericDefinitionEETypeNode could exist without inheriting from EETypeNode, however this simplifies code that expects to get back a common usable ObjectNode/ISymbolNode from the NodeFactory. For example, TypeMetadataMapNode.GetData would require special casing for the different EEType node kinds if the various EEType nodes were independent of eachother.
nattress
force-pushed
the
refactor_eetype_2
branch
from
August 9, 2016 17:23
cb9af9e to
6ed9886
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split EEType into two pieces: the non-constructed EETypeNode and the
constructed ConstructedEETypeNode.
Generic type definitions get their own GenericDefinitionEETypeNode node
which matches the the one produced by the binder.
Both the constructed and the generic nodes inherit from EETypeNode.
GenericDefinitionEETypeNode could exist without inheriting from
EETypeNode, however this simplifies code that expects to get back a
common usable ObjectNode/ISymbolNode from the NodeFactory. For example,
TypeMetadataMapNode.GetData would require special casing for the
different EEType node kinds if the various EEType nodes were independent
of eachother.