Skip to content

as/codegen first batch#363

Merged
alexp-sssup merged 10 commits into
masterfrom
as/codegen-first-batch
Apr 25, 2026
Merged

as/codegen first batch#363
alexp-sssup merged 10 commits into
masterfrom
as/codegen-first-batch

Conversation

@yuri91
Copy link
Copy Markdown
Member

@yuri91 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

@yuri91 yuri91 added the hydra Run hydra on this PR label Apr 21, 2026
yuri91 and others added 10 commits April 21, 2026 17:32
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.
@yuri91 yuri91 force-pushed the as/codegen-first-batch branch from 323314c to f20f027 Compare April 21, 2026 16:15
@alexp-sssup alexp-sssup marked this pull request as ready for review April 25, 2026 12:47
@alexp-sssup alexp-sssup merged commit 72d51df into master Apr 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hydra Run hydra on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants