poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 0/3] Add format


From: Mohammad-Reza Nabipoor
Subject: [PATCH v2 0/3] Add format
Date: Tue, 8 Jun 2021 03:52:04 +0430

Hi, Jose!

The first patch is the same as the previous one.
The second one is a minor bugfix in printf codegen.
The third one is the revised version of previous patch according to
your feedback.

- Now PKL_AST_PRINT_STMT emebeds a PKL_AST_FORMAT and thanks to the
  pass manager, the integration is very nice.

- Turns out that compiling `print` and `format` closure for arrays and
  structs in `pkl_gen_pr_decl` is not easy, because one should put VAL
  and DEPTH on stack for integral types, offsets, etc.

- And finally I wanted to send the patch to change `_pkl_assert`
  implementation to use `format` to synthesize the message, but
  there's a problem: it complains that the `_pkl_reduce_string_array`
  is not defined while generating the code for `format` inside
  the `_pkl_assert`.
  (It hits an assertion in `pkl_asm_call`: `assert (tmp != NULL);`).
  I even put the `_pkl_assert` definition after the other functions
  (including the `_pkl_reduce_string_array`), but still the same error.
  Unfortunately it's too late and I'm unable to understand the problem.
  I'll try in the next days.


Regards,
Mohammad-Reza


Mohammad-Reza Nabipoor (3):
  libpoke: Add skeleton for string properties instructions
  pkl: Fix codegen of printf
  libpoke: Add `format`

 ChangeLog                            | 165 ++++++++
 common/pk-utils.c                    |  28 ++
 common/pk-utils.h                    |   4 +
 libpoke/pkl-asm.c                    |  39 ++
 libpoke/pkl-ast.c                    | 135 ++++---
 libpoke/pkl-ast.h                    | 217 ++++++-----
 libpoke/pkl-gen.c                    | 298 +++++++++++++-
 libpoke/pkl-gen.h                    |   1 +
 libpoke/pkl-gen.pks                  | 559 ++++++++++++++++++++++++++-
 libpoke/pkl-insn.def                 |  17 +
 libpoke/pkl-lex.l                    |   1 +
 libpoke/pkl-pass.c                   |  23 +-
 libpoke/pkl-promo.c                  |  21 +-
 libpoke/pkl-rt.pk                    |  68 ++++
 libpoke/pkl-tab.y                    |  73 ++--
 libpoke/pkl-trans.c                  | 113 +++---
 libpoke/pkl-typify.c                 | 104 ++---
 libpoke/pvm.jitter                   | 252 ++++++++++++
 testsuite/Makefile.am                |  32 ++
 testsuite/poke.pkl/format-1.pk       |  21 +
 testsuite/poke.pkl/format-10.pk      |   7 +
 testsuite/poke.pkl/format-11.pk      |   7 +
 testsuite/poke.pkl/format-12.pk      |   7 +
 testsuite/poke.pkl/format-13.pk      |   4 +
 testsuite/poke.pkl/format-14.pk      |   4 +
 testsuite/poke.pkl/format-15.pk      |   4 +
 testsuite/poke.pkl/format-16.pk      |   7 +
 testsuite/poke.pkl/format-17.pk      |   7 +
 testsuite/poke.pkl/format-18.pk      |   4 +
 testsuite/poke.pkl/format-19.pk      |   5 +
 testsuite/poke.pkl/format-2.pk       |  20 +
 testsuite/poke.pkl/format-20.pk      |   7 +
 testsuite/poke.pkl/format-21.pk      |   5 +
 testsuite/poke.pkl/format-22.pk      |   5 +
 testsuite/poke.pkl/format-23.pk      |   5 +
 testsuite/poke.pkl/format-24.pk      |   6 +
 testsuite/poke.pkl/format-25.pk      |   7 +
 testsuite/poke.pkl/format-26.pk      |  11 +
 testsuite/poke.pkl/format-27.pk      |  10 +
 testsuite/poke.pkl/format-28.pk      |  11 +
 testsuite/poke.pkl/format-29.pk      |  11 +
 testsuite/poke.pkl/format-3.pk       |  20 +
 testsuite/poke.pkl/format-4.pk       |  20 +
 testsuite/poke.pkl/format-5.pk       |   4 +
 testsuite/poke.pkl/format-6.pk       |   4 +
 testsuite/poke.pkl/format-7.pk       |   4 +
 testsuite/poke.pkl/format-8.pk       |   7 +
 testsuite/poke.pkl/format-9.pk       |   7 +
 testsuite/poke.pkl/format-diag-1.pk  |   3 +
 testsuite/poke.pkl/reduce-array-1.pk |   7 +
 testsuite/poke.pkl/reduce-array-2.pk |   7 +
 51 files changed, 2096 insertions(+), 312 deletions(-)
 create mode 100644 testsuite/poke.pkl/format-1.pk
 create mode 100644 testsuite/poke.pkl/format-10.pk
 create mode 100644 testsuite/poke.pkl/format-11.pk
 create mode 100644 testsuite/poke.pkl/format-12.pk
 create mode 100644 testsuite/poke.pkl/format-13.pk
 create mode 100644 testsuite/poke.pkl/format-14.pk
 create mode 100644 testsuite/poke.pkl/format-15.pk
 create mode 100644 testsuite/poke.pkl/format-16.pk
 create mode 100644 testsuite/poke.pkl/format-17.pk
 create mode 100644 testsuite/poke.pkl/format-18.pk
 create mode 100644 testsuite/poke.pkl/format-19.pk
 create mode 100644 testsuite/poke.pkl/format-2.pk
 create mode 100644 testsuite/poke.pkl/format-20.pk
 create mode 100644 testsuite/poke.pkl/format-21.pk
 create mode 100644 testsuite/poke.pkl/format-22.pk
 create mode 100644 testsuite/poke.pkl/format-23.pk
 create mode 100644 testsuite/poke.pkl/format-24.pk
 create mode 100644 testsuite/poke.pkl/format-25.pk
 create mode 100644 testsuite/poke.pkl/format-26.pk
 create mode 100644 testsuite/poke.pkl/format-27.pk
 create mode 100644 testsuite/poke.pkl/format-28.pk
 create mode 100644 testsuite/poke.pkl/format-29.pk
 create mode 100644 testsuite/poke.pkl/format-3.pk
 create mode 100644 testsuite/poke.pkl/format-4.pk
 create mode 100644 testsuite/poke.pkl/format-5.pk
 create mode 100644 testsuite/poke.pkl/format-6.pk
 create mode 100644 testsuite/poke.pkl/format-7.pk
 create mode 100644 testsuite/poke.pkl/format-8.pk
 create mode 100644 testsuite/poke.pkl/format-9.pk
 create mode 100644 testsuite/poke.pkl/format-diag-1.pk
 create mode 100644 testsuite/poke.pkl/reduce-array-1.pk
 create mode 100644 testsuite/poke.pkl/reduce-array-2.pk

-- 
2.31.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]