-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate position independent code #50
Draft
janvrany
wants to merge
12
commits into
master
Choose a base branch
from
pr/generate-position-independent-code
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains 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
This commit removes unused `#addPreDependencyOf:on:` and `#addPostDependencyOf:on:` from `TRRegisterDependencies`
This commit moves `TRCompilationTestShell` and subclasses to category "Tinyrossa-Tests-Shells", removing "-SmalltalkX". These classes are no longer Smalltalk/X specific.
This commit removes `compilation` instvar introduced in commit 84b2519 "Implement `TRCompilationTestShell >> #call` and `#call:`". In a hindsight, this does not seem proper. We need to be able to test compilation of multiple functions calling each other, so the there'll be "multiple compilations". Removing `compilation` from shell prompted refactoring of `call`, `call:` and `call:_:` utility methods - they need to take `compilation` as a first parameter. While at it, split code injection and call to actual function into two method to facilitate tests with multiple functions.
CI fails because missing support for relocations in ArchC |
This commit uses symbols (sub-instances of `TRSymbol`) as labels rather than just plain strings. This is a preparation for using (function) symbols exports.
This is a preparation for introducing `TRRuntime` and related classes that will also make use of target. So it is no longer just target for compilation.
This commit introduces a `TRRuntime`, a class that provides an entry point for runtime services. Downstream projects (if any) may (should) provide customized subclass. Note that "runtime" is only useful / used in JIT scenarios.
This commit adds new class - `TRCodeCache` - that implements simple runtime code cache to put compiled code (result of compilation) for later execution. Downstream project may need to provide customized implementations of code cache fitting the needs of particular runtime. `TRCodeCache` should serves (i) as example implementation, (ii) possibly as a base class for downstream projects and finally (iii) as code cache implementation to be used in tests. As of now, the implementation is fairly simple. Its functionality will be expanded in further commits.
This commit makes use of `TRCodeCache` introduced in previous commit. This is a necessary step for writing tests that compile multiple functions and/or refer to external (relocatable) symbols.
This tests compilation of relocatable calls.
This commit changes `TRRV64GSystemLinkage` to compile relocatable calls using pair of `auipc` and `jalr` with `R_RISCV_CALL_PLT` relocation.
janvrany
force-pushed
the
pr/generate-position-independent-code
branch
from
June 27, 2024 10:48
858e9ef
to
8882676
Compare
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.
This commit adds basic support for generating position independent code.
The idea is that a result of single compilation is always "position independent". It is the responsibility of
"runtime" to properly link together. This means compiler has to provide relocation when necessary.
Just like with shingarov/Pharo-ArchC#39, this is work in progress. I need to get bit more hands-on experience with compiling "real code" (that is, AoT)