This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
optimise single backreferences
authorDavid Mitchell <davem@iabyn.com>
Sun, 1 Aug 2010 14:18:51 +0000 (15:18 +0100)
committerDavid Mitchell <davem@iabyn.com>
Sun, 1 Aug 2010 20:47:31 +0000 (21:47 +0100)
commit5648c0ae71de0db3ebfb4199727bc21e89c146c0
tree6154d88ceb21e1a21bfa48cbe08a805564149b0e
parent757971c467ea1792cbf102db9a0cc3a9dde58fea
optimise single backreferences

Rather than creating an AV and pushing the backref onto it,
store a single backref directly in the mg_obj or xhv_backreferences
slot.

If the backref is an AV, then we skip this optimisation (although I don't
think at the moment, that an AV would ever be pointed to by some backref
magic). So the test of whether the optimisation is is in effect is whether
the thing in the slot is an AV or not.
embed.fnc
hv.c
mg.c
proto.h
sv.c