Skip to content

Use static nodes in buildI and buildh

What does this MR do?

This enables using small_integers in buildI and static arity-0 ADT constructors in buildh.

The already existing buildh.abc test case already covers these two cases (buildh with arity 0 and buildI with a small integer).

The advance_ptr function is modified to avoid generating getelementpointer instructions with 0 offset, as these instructions caused the static_integers external global to be renamed to a local name by calling llvmSetValueName2 in encodeInstruction (Module.icl). This seems like a bug in LLVM, but I haven't taken the time to check that since this is an easy workaround.

Changes to public APIs

Author's checklist (required)

  • If bugs have been solved, tests have been added (guidelines)
  • A changelog entry has been added (guidelines)
  • Newly added code is documented (guidelines)
  • Newly added code has a style consistent with the rest of the repository
  • Intermediate commits compile (use git rebase -i main if not)

Related issues

Closes #17 (closed)

Merge request reports

Loading