Recover inlined function for issue #53#96
Open
kami922 wants to merge 4 commits into
Open
Conversation
- Add InlinedCall struct and InlinedList field to FuncMetadata - Add add(), multiply(), neverInlined() to testproject - Add comprehensive inline test suite (positive + negative cases) - Positive tests intentionally fail — implementation not yet written
Constant arguments let the compiler fold add(1,2)/multiply(3,4) into literals at compile time, leaving no inline-tree evidence to recover regardless of extraction-code correctness. Deriving from len(os.Args) forces the compiler to keep real, recoverable inlined instructions. Also strengthen main_test.go to check for main.multiply by name, not just main.add, now that both are genuinely recoverable.
…functions # Conflicts: # testproject/main.go
Reads moduledata.gofunc (go:func.* base) via the existing per-version layout tables, needed for FUNCDATA_InlTree offsets (issue mandiant#53). Offset 320/64-bit, 160/32-bit verified against runtime source and a real test binary; the Go 1.26-only layout bucket is left unset rather than guessed.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
closes #53
PR attempts implementation to recover inline functions
reference PR #59