This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
create Perl_hv_pushkv() function
authorDavid Mitchell <davem@iabyn.com>
Mon, 17 Jul 2017 16:51:57 +0000 (17:51 +0100)
committerDavid Mitchell <davem@iabyn.com>
Thu, 27 Jul 2017 10:30:24 +0000 (11:30 +0100)
commitaf3b1cba4fa1f9302496ccf5135bf61703227009
treed84ea620b9bf30b1356fc690e4d1313f94ba0cfa
parente84e4286916d8a219c8a63468807b41df9cde7fe
create Perl_hv_pushkv() function

...and make pp_padhv(), pp_rv2hv() use it rather than using Perl_do_kv()

Both pp_padhv() and pp_rv2hv() (via S_padhv_rv2hv_common()), outsource to
Perl_do_kv(), the list-context pushing/flattening of a hash onto the
stack.

Perl_do_kv() is a big function that handles all the actions of
keys, values etc. Instead, create a new function which does just the
pushing of a hash onto the stack.

At the same time, split it out into two loops, one for tied, one for
normal: the untied one can skip extending the stack on each iteration,
and use a cheaper HeVAL() instead of calling hv_iterval().
doop.c
embed.fnc
embed.h
hv.c
pp_hot.c
proto.h
t/perf/benchmarks