diff options
author | Richard Leach <richardleach@users.noreply.github.com> | 2022-07-08 14:52:19 +0000 |
---|---|---|
committer | Richard Leach <richardleach@users.noreply.github.com> | 2022-08-17 11:19:10 +0100 |
commit | 9fdd7fc4796d89d16dceea42f2af91e4fde296ed (patch) | |
tree | 9f113c432769e4dd1e8628fe2500059a588cce52 /ext/Opcode | |
parent | 434ccf36bb90d7dfe527c3ecd775983821669b4a (diff) | |
download | perl-9fdd7fc4796d89d16dceea42f2af91e4fde296ed.tar.gz |
Implement OP_PADSV_STORE - combined sassign/padsv OP
This commit introduces a new OP to replace simple cases
of OP_SASSIGN and OP_PADSV.
For example, 'my $x = 1' is currently implemented as:
1 <;> nextstate(main 1 -e:1) v:{
2 <$> const(IV 1) s
3 <0> padsv[$x:1,2] sRM*/LVINTRO
4 <2> sassign vKS/2
But now will be turned into:
1 <;> nextstate(main 1 -e:1) v:{
2 <$> const(IV 1) s
3 <1> padsv_store[$x:1,2] vKMS/LVINTRO
This intended to be a transparent performance optimization.
It should be applicable for RHS optrees of varying complexity.
Diffstat (limited to 'ext/Opcode')
-rw-r--r-- | ext/Opcode/Opcode.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/Opcode/Opcode.pm b/ext/Opcode/Opcode.pm index b709601015..7a675d3b7b 100644 --- a/ext/Opcode/Opcode.pm +++ b/ext/Opcode/Opcode.pm @@ -1,4 +1,4 @@ -package Opcode 1.59; +package Opcode 1.60; use strict; @@ -302,7 +302,7 @@ invert_opset function. null stub scalar pushmark wantarray const defined undef - rv2sv sassign + rv2sv sassign padsv_store rv2av aassign aelem aelemfast aelemfast_lex aslice kvaslice av2arylen |