as/codegen first batch#363
Merged
Merged
Conversation
Member
yuri91
commented
Apr 21, 2026
- feat: Add Cheerp LLVM address spaces, and map the clang ones to them
- ast: add function to deduce the Cheerp AS for a type
- cheerp: add getCheerpFunctionAS helper
- CallConstructors: Create argc/argv allocas in the correct AS
- CallConstructors: put null env alloca in the correct AS
- Add address space to jump table array
- GDA: memset/memcpy/memmove are not defined anymore in genericjs stdlibs
- fix(SROA): propagate base ptr address space
- WasmWriter: handle AS cast as nop
- profiling: allow addrspace cast of function pointers
- LowerGlobalDestructors: strip casts when getting a destructor function
Introduce a small helper that maps a data address space to the
corresponding function address space:
Default -> Default
GenericJS -> Client (functions live in the Client AS on the
JS side, not in GenericJS)
Wasm -> Wasm
Available in both a strongly-typed CheerpAS overload and an
`unsigned` overload. Used by the coroutine and later by
ItaniumCXXABI / LowerGlobalDtors / CodeGenModule / the asan
path to pick the correct AS for function pointers.
323314c to
f20f027
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 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.