This repository was archived by the owner on Nov 1, 2020. It is now read-only.
Merged
Conversation
…l definition" (For a quick intro on what I'm doing here, look at the changes in the object writer.) The `Offset` property on `ISymbolNode` used to mean "the offset from the beginning of the `ObjectNode` that defines this `ISymbolNode`". This means that when referring to a symbol defined elsewhere, the `Offset` property was unused - it was only used when the `ISymbolNode` meant "definition". We found out very early in our CoreRT multi module effort that the existing structure where `ISymbolNode` is both a definition and a reference is very awkward. COMDAT sections can only define a single symbol, but we would like to refer to multiple things within the object node package. We have a bunch of places where the inability of having a node that represents "symbol+delta" leads to awkward code that needs to pass the delta separately. With this change I'm introducing a `ISymbolDefinitionNode`. The new world looks like this: * `ISymbolDefinitionNode.Offset` means "the offset from the beginning of object data where the symbol should be defined". * `ISymbolNode.Offset` now means "the delta from symbol with this name". Whoever implements `ISymbolDefinitionNode` should also implement `ISymbolNode`, so that the symbol can be used as a reference. I chose to name both of the properties `Offset`, because it makes implementing the common case (Offset = 0) require less boilerplate. As an example where this can be used (I'm not doing it now to keep the diffs as small as possible) is the `NonGCStaticsNode`: with this infrastructure in place, we can now have a separate `ISymbolNode` for the cctor context that doesn't define a new symbol, but can be used to refer to the cctor context anywhere we use `ISymbolNode`. Similar simplification is now possible around fat function pointers. [tfs-changeset: 1655840]
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.
No description provided.