Skip to content
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

Implement make_proxy_inplace and inplace_proxiable_target with freestanding #92

Merged
merged 8 commits into from
Apr 22, 2024

Conversation

mingxwa
Copy link
Collaborator

@mingxwa mingxwa commented Apr 18, 2024

Changes

  • Added concept inplace_proxiable_target and function templates make_proxy_inplace as non-allocating factory. Resolves Add APIs for in-place construction of a target #86.
  • Removed the "in-place" capability from allocate_proxy since it makes the semantics ambiguous (will reflect in the documentation later).
  • Made the implementation of proxy be compatible with freestanding by removing dependency to memcpy, which requires C runtime. Fixes Compile error when -ffreestanding is enabled on GCC #87.
  • Excluded make_proxy and allocate_proxy from freestanding compilation.
  • Added unit test cases to cover the new API make_proxy_inplace and modified the cases for allocate_proxy due to changes in semantics.
  • Added a new test case ProxyFreestandingTests for freestanding compilation without linking to any static library, using any exceptions, RTTI, or C/C++ runtime. To run the test code from an operating system, some assembly code for various platforms is embedded to invoke in the main function. The code generation on freestanding x86, x86-64, ARM64, RISC-V and PowerPC are tested manually. The pipeline should be able to build and run the test for x84-64. Resolves Add pipelines for freestanding environment #88.

@mingxwa mingxwa self-assigned this Apr 18, 2024
@mingxwa mingxwa merged commit aa384eb into microsoft:main Apr 22, 2024
4 checks passed
@mingxwa mingxwa deleted the user/mingxwa/make-proxy-inplace branch April 22, 2024 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants