This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
hv.c: add some NULL check removal
authorbulk88 (via RT) <perlbug-followup@perl.org>
Mon, 24 Dec 2012 02:20:10 +0000 (18:20 -0800)
committerDavid Mitchell <davem@iabyn.com>
Tue, 29 Jan 2013 11:16:44 +0000 (11:16 +0000)
commita03199eaa6f5d9e2d15c64750229e2adeebfbdce
tree44bc106e72c3d5852de650abf4733893a91203d1
parent113b1f2cec16524fab70408ae95f289ae8e096d3
hv.c: add some NULL check removal

The purpose is less machine instructions/faster code.

* S_hv_free_ent_ret() is always called with entry non-null: so change its
  signature to reflect this, and remove a null check;

* Add some SvREFCNT_dec_NNs;

* In hv_clear(), refactor the code slightly to only do a SvREFCNT_dec_NN
within the branch where its already been determined that the arg is
non-null; also, use the _nocontext variant of Perl_croak() to save
a push instruction in threaded perls.
embed.fnc
hv.c
proto.h