Skip to content
Snippets Groups Projects

Customizability Extensions: CFunction Signatures and Code Literals

Merged Frederik Hennig requested to merge ast_extensions into backend-rework

This MR extends the expressivity of CFunction by allowing users to specify its type signature, and introduces literal expressions.

  • CFunction Signature: Instances of CFunction now have to be created with a fixed type signature, which is used by the typifier.
  • Literal expressions: Introduce PsLiteral and PsLiteralExpr to allow injection of custom code literals into the AST. Literals must have a fixed type, and are considered constant within the scope of a kernel.

This MR furthermore fixes CFunction printing, and a bug that affected typification and constant elimination in the presence of array initializers.

  • Test cases for literals
Edited by Frederik Hennig

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply