[parrot/parrot] 9d5fe1: [GH# 828] Avoid passsing non-double through va_lis...

GitHub noreply at github.com
Fri Nov 21 21:41:18 UTC 2014


  Branch: refs/heads/rurban/va_arg_print_n
  Home:   https://github.com/parrot/parrot
  Commit: 9d5fe114700dae63ba39b7d44d5ca7ecb869f16e
      https://github.com/parrot/parrot/commit/9d5fe114700dae63ba39b7d44d5ca7ecb869f16e
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2014-11-21 (Fri, 21 Nov 2014)

  Changed paths:
    M src/pmc/float.pmc
    M t/src/embed/pmc.t
    M t/src/extend_vtable.t

  Log Message:
  -----------
  [GH# 828] Avoid passsing non-double through va_list

va_list does not support float, long double nor __float128 on most systems.
Promote FLOATVAL to double to avoid that.


  Commit: 31b2b4097f9f23c247ee448942da6236cdbfab45
      https://github.com/parrot/parrot/commit/31b2b4097f9f23c247ee448942da6236cdbfab45
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2014-11-21 (Fri, 21 Nov 2014)

  Changed paths:
    M runtime/parrot/library/Test/More.pir
    M src/dynoplibs/sys.ops
    M t/dynoplibs/sysinfo.t
    M t/dynpmc/rational.t
    M t/library/test_more.t
    M t/pmc/integer.t
    M t/pmc/testlib/packfile_common.pir

  Log Message:
  -----------
  [GH #828] Fix most tests for non-double floatval

Add more needed precisions to numeric tests, tested with intel long double.

Change a magic number in t/library/test_more.t 888.81<=>888.82 1e-2
  was not stable enough for intel long double

Use t/pmc/testlib/annotations.pbc for binary comparisons of packfiles since
  stringifying non-double numbers is not stable enough.

Fix src/dynoplibs/sys.ops doublesize to numvalsize. This only works for double.


  Commit: 76e949c840bcfcd5aa6f2ebb7d4ff7ebaa3b120f
      https://github.com/parrot/parrot/commit/76e949c840bcfcd5aa6f2ebb7d4ff7ebaa3b120f
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2014-11-21 (Fri, 21 Nov 2014)

  Changed paths:
    M src/ops/core_ops.c
    M src/ops/io.ops

  Log Message:
  -----------
  [GH #828] Optimize print_n/i and say_n/i

print_n/nc/i/ic and the say variants go through a full Parrot_io_printf with
3 va_start/va_end scenarios and a custom format string parser,
and through char* -> STRING->char* conversion until the fixed
FLOATVAL_FMT or INTVAL_FMT printf is done.
Just to print a single int or number.

This also lost precision for non-double floatval's - if cast to (double).
Now avoided.


  Commit: 6896cffaea958ee56997081e069721dae878aeb0
      https://github.com/parrot/parrot/commit/6896cffaea958ee56997081e069721dae878aeb0
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2014-11-21 (Fri, 21 Nov 2014)

  Changed paths:
    M config/auto/va_ptr.pm
    M config/auto/va_ptr/test_c.in
    M config/gen/config_h/feature_h.in
    M src/call/args.c

  Log Message:
  -----------
  [GH #828] Probe if double is needed for va_arg or if native floatval does fine

Set new feature.h PARROT_VA_PTR_FLOATVAL to double or the given floatval,
and use it in src/call/args.c

Print "stack|register (double)" in Configure va_arg result if a cast is
required and precision is lost.

Still some va_arg casts missing, multidispatch.t and nci.t fail.


  Commit: 22dda06194f913f30165bedc16289e9dd669ae98
      https://github.com/parrot/parrot/commit/22dda06194f913f30165bedc16289e9dd669ae98
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2014-11-21 (Fri, 21 Nov 2014)

  Changed paths:
    M src/call/args.c
    M src/string/spf_vtable.c

  Log Message:
  -----------
  [GH #828] Use more va_arg PARROT_VA_PTR_FLOATVAL


  Commit: 30ca8d33f7f935ea529a3b2ba4fcedfb0bd6bc23
      https://github.com/parrot/parrot/commit/30ca8d33f7f935ea529a3b2ba4fcedfb0bd6bc23
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2014-11-21 (Fri, 21 Nov 2014)

  Changed paths:
    M config/gen/config_h/feature_h.in

  Log Message:
  -----------
  [cage] ident #define properly


  Commit: e437eaba57e0390a5a1ea5b2dc03f89f91103b30
      https://github.com/parrot/parrot/commit/e437eaba57e0390a5a1ea5b2dc03f89f91103b30
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2014-11-21 (Fri, 21 Nov 2014)

  Changed paths:
    M src/pmc/float.pmc

  Log Message:
  -----------
  use PARROT_VA_PTR_FLOATVAL in float.pmc


Compare: https://github.com/parrot/parrot/compare/b941590b3321...e437eaba57e0


More information about the parrot-commits mailing list