diff options
author | Max Maischein <corion@corion.net> | 2019-09-20 23:00:04 +0200 |
---|---|---|
committer | Max Maischein <corion@corion.net> | 2019-09-20 23:00:04 +0200 |
commit | 20ef288c535a81f9e6186650f180b3c1dccba151 (patch) | |
tree | 5ff10758c07cacfc9c521e5eab8782b901007f62 | |
parent | 7f6fc9b2e02ce976065f2006e85f5ed2ff76bd12 (diff) | |
download | perl-20ef288c535a81f9e6186650f180b3c1dccba151.tar.gz |
Revert "[MERGE] add+use PL_curstackinfo->si_cxsubix field"v5.31.4
This reverts commit d2cd363728088adada85312725ac9d96c29659be, reversing
changes made to 068b48acd4bdf9e7c69b87f4ba838bdff035053c.
This change breaks installing Test::Deep:
...
not ok 37 - Test 'isa eq' completed
ok 38 - Test 'isa eq' no premature diagnostication
...
-rw-r--r-- | cop.h | 5 | ||||
-rw-r--r-- | embed.fnc | 1 | ||||
-rw-r--r-- | embed.h | 1 | ||||
-rw-r--r-- | ext/B/t/optree_concise.t | 12 | ||||
-rw-r--r-- | ext/B/t/optree_constants.t | 8 | ||||
-rw-r--r-- | ext/B/t/optree_misc.t | 4 | ||||
-rw-r--r-- | ext/B/t/optree_samples.t | 8 | ||||
-rw-r--r-- | ext/B/t/optree_sort.t | 16 | ||||
-rw-r--r-- | ext/B/t/optree_varinit.t | 40 | ||||
-rw-r--r-- | ext/Devel-Peek/t/Peek.t | 2 | ||||
-rw-r--r-- | inline.h | 26 | ||||
-rw-r--r-- | op.c | 3 | ||||
-rw-r--r-- | op.h | 2 | ||||
-rw-r--r-- | pod/perldelta.pod | 6 | ||||
-rw-r--r-- | pp_ctl.c | 19 | ||||
-rw-r--r-- | proto.h | 4 | ||||
-rw-r--r-- | scope.c | 1 | ||||
-rw-r--r-- | sv.c | 1 | ||||
-rw-r--r-- | t/perf/benchmarks | 6 |
19 files changed, 54 insertions, 111 deletions
@@ -585,7 +585,6 @@ C<*len>. Upon return, C<*flags> will be set to either C<SVf_UTF8> or 0. /* subroutine context */ struct block_sub { OP * retop; /* op to execute on exit from sub */ - I32 old_cxsubix; /* previous value of si_cxsubix */ /* Above here is the same for sub, format and eval. */ PAD *prevcomppad; /* the caller's PL_comppad */ CV * cv; @@ -598,7 +597,6 @@ struct block_sub { /* format context */ struct block_format { OP * retop; /* op to execute on exit from sub */ - I32 old_cxsubix; /* previous value of si_cxsubix */ /* Above here is the same for sub, format and eval. */ PAD *prevcomppad; /* the caller's PL_comppad */ CV * cv; @@ -665,7 +663,6 @@ struct block_format { /* eval context */ struct block_eval { OP * retop; /* op to execute on exit from eval */ - I32 old_cxsubix; /* previous value of si_cxsubix */ /* Above here is the same for sub, format and eval. */ SV * old_namesv; OP * old_eval_root; @@ -1029,7 +1026,6 @@ struct stackinfo { struct stackinfo * si_next; I32 si_cxix; /* current context index */ I32 si_cxmax; /* maximum allocated index */ - I32 si_cxsubix; /* topmost sub/eval/format */ I32 si_type; /* type of runlevel */ I32 si_markoff; /* offset where markstack begins for us. * currently used only with DEBUGGING, @@ -1076,7 +1072,6 @@ typedef struct stackinfo PERL_SI; } \ next->si_type = type; \ next->si_cxix = -1; \ - next->si_cxsubix = -1; \ PUSHSTACK_INIT_HWM(next); \ AvFILLp(next->si_stack) = 0; \ SWITCHSTACK(PL_curstack,next->si_stack); \ @@ -3517,7 +3517,6 @@ Apx |void |leave_adjust_stacks|NN SV **from_sp|NN SV **to_sp \ |U8 gimme|int filter #ifndef PERL_NO_INLINE_FUNCTIONS -Aixp |U8 |gimme_V | Aixp |PERL_CONTEXT * |cx_pushblock|U8 type|U8 gimme|NN SV** sp|I32 saveix Aixp |void |cx_popblock|NN PERL_CONTEXT *cx Aixp |void |cx_topblock|NN PERL_CONTEXT *cx @@ -979,7 +979,6 @@ #define cx_pushsub(a,b,c,d) Perl_cx_pushsub(aTHX_ a,b,c,d) #define cx_pushwhen(a) Perl_cx_pushwhen(aTHX_ a) #define cx_topblock(a) Perl_cx_topblock(aTHX_ a) -#define gimme_V() Perl_gimme_V(aTHX) #endif #if defined(DEBUGGING) #define pad_setsv(a,b) Perl_pad_setsv(aTHX_ a,b) diff --git a/ext/B/t/optree_concise.t b/ext/B/t/optree_concise.t index 86280ac488..1e2594703f 100644 --- a/ext/B/t/optree_concise.t +++ b/ext/B/t/optree_concise.t @@ -217,7 +217,7 @@ checkOptree ( name => 'cmdline invoke -basic works', strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 7 <@> leave[1 ref] vKP/REFC ->(end) -# 1 <0> enter v ->2 +# 1 <0> enter ->2 # 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 # 6 <@> sort vK ->7 # 3 <0> pushmark s ->4 @@ -225,7 +225,7 @@ checkOptree ( name => 'cmdline invoke -basic works', # 4 <#> gv[*a] s ->5 EOT_EOT # 7 <@> leave[1 ref] vKP/REFC ->(end) -# 1 <0> enter v ->2 +# 1 <0> enter ->2 # 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 # 6 <@> sort vK ->7 # 3 <0> pushmark s ->4 @@ -241,7 +241,7 @@ checkOptree ( name => 'cmdline invoke -exec works', bcopts => '-exec', strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <0> enter v +1 <0> enter 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ 3 <0> pushmark s 4 <#> gv[*a] s @@ -249,7 +249,7 @@ checkOptree ( name => 'cmdline invoke -exec works', 6 <@> sort vK 7 <@> leave[1 ref] vKP/REFC EOT_EOT -# 1 <0> enter v +# 1 <0> enter # 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ # 3 <0> pushmark s # 4 <$> gv(*a) s @@ -290,7 +290,7 @@ checkOptree errs => ['Useless use of sort in void context at -e line 1.'], strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <0> enter v +# 1 <0> enter # 2 <;> nextstate(main 2 -e:1) v:>,<,%,{ # 3 <0> pushmark s # 4 <#> gv[*a] s @@ -298,7 +298,7 @@ checkOptree # 6 <@> sort vK # 7 <@> leave[1 ref] vKP/REFC EOT_EOT -# 1 <0> enter v +# 1 <0> enter # 2 <;> nextstate(main 2 -e:1) v:>,<,%,{ # 3 <0> pushmark s # 4 <$> gv(*a) s diff --git a/ext/B/t/optree_constants.t b/ext/B/t/optree_constants.t index 43afacc570..a8073164db 100644 --- a/ext/B/t/optree_constants.t +++ b/ext/B/t/optree_constants.t @@ -152,14 +152,14 @@ checkOptree ( name => 'myyes() as coderef', strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 6 <@> leave[1 ref] vKP/REFC ->(end) -# 1 <0> enter v ->2 +# 1 <0> enter ->2 # 2 <;> nextstate(main 2 -e:1) v:>,<,%,{ ->3 # 5 <@> print vK ->6 # 3 <0> pushmark s ->4 # 4 <$> const[SPECIAL sv_yes] s*/FOLD ->5 EOT_EOT # 6 <@> leave[1 ref] vKP/REFC ->(end) -# 1 <0> enter v ->2 +# 1 <0> enter ->2 # 2 <;> nextstate(main 2 -e:1) v:>,<,%,{ ->3 # 5 <@> print vK ->6 # 3 <0> pushmark s ->4 @@ -176,14 +176,14 @@ checkOptree ( name => 'myno() as coderef', strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 6 <@> leave[1 ref] vKP/REFC ->(end) -# 1 <0> enter v ->2 +# 1 <0> enter ->2 # 2 <;> nextstate(main 2 -e:1) v:>,<,%,{ ->3 # 5 <@> print vK ->6 # 3 <0> pushmark s ->4 # 4 <$> const[SPECIAL sv_no] s*/FOLD ->5 EOT_EOT # 6 <@> leave[1 ref] vKP/REFC ->(end) -# 1 <0> enter v ->2 +# 1 <0> enter ->2 # 2 <;> nextstate(main 2 -e:1) v:>,<,%,{ ->3 # 5 <@> print vK ->6 # 3 <0> pushmark s ->4 diff --git a/ext/B/t/optree_misc.t b/ext/B/t/optree_misc.t index 490abb33d4..f8ff3ce968 100644 --- a/ext/B/t/optree_misc.t +++ b/ext/B/t/optree_misc.t @@ -89,7 +89,7 @@ EONT_EONT my $t = <<'EOT_EOT'; # 8 <@> leave[1 ref] vKP/REFC ->(end) -# 1 <0> enter v ->2 +# 1 <0> enter ->2 # 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 # 7 <2> sassign vKS/2 ->8 # 5 <@> index[t2] sK/2 ->6 @@ -101,7 +101,7 @@ my $t = <<'EOT_EOT'; EOT_EOT my $nt = <<'EONT_EONT'; # 8 <@> leave[1 ref] vKP/REFC ->(end) -# 1 <0> enter v ->2 +# 1 <0> enter ->2 # 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 # 7 <2> sassign vKS/2 ->8 # 5 <@> index[t1] sK/2 ->6 diff --git a/ext/B/t/optree_samples.t b/ext/B/t/optree_samples.t index 0a498a9e52..15b5799ce0 100644 --- a/ext/B/t/optree_samples.t +++ b/ext/B/t/optree_samples.t @@ -331,7 +331,7 @@ checkOptree ( name => '-exec -e foreach (1..10) {print qq{foo $_}}', bcopts => '-exec', strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <0> enter v +# 1 <0> enter # 2 <;> nextstate(main 2 -e:1) v:>,<,%,{ # 3 <0> pushmark s # 4 <$> const[IV 1] s @@ -350,7 +350,7 @@ checkOptree ( name => '-exec -e foreach (1..10) {print qq{foo $_}}', # g <2> leaveloop vK/2 # h <@> leave[1 ref] vKP/REFC EOT_EOT -# 1 <0> enter v +# 1 <0> enter # 2 <;> nextstate(main 2 -e:1) v:>,<,%,{ # 3 <0> pushmark s # 4 <$> const(IV 1) s @@ -602,14 +602,14 @@ checkOptree ( name => '-e use constant j => qq{junk}; print j', bcopts => '-exec', strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <0> enter v +# 1 <0> enter # 2 <;> nextstate(main 71 -e:1) v:>,<,%,{ # 3 <0> pushmark s # 4 <$> const[PV "junk"] s*/FOLD # 5 <@> print vK # 6 <@> leave[1 ref] vKP/REFC EOT_EOT -# 1 <0> enter v +# 1 <0> enter # 2 <;> nextstate(main 71 -e:1) v:>,<,%,{ # 3 <0> pushmark s # 4 <$> const(PV "junk") s*/FOLD diff --git a/ext/B/t/optree_sort.t b/ext/B/t/optree_sort.t index 2c661f6765..0b5897d575 100644 --- a/ext/B/t/optree_sort.t +++ b/ext/B/t/optree_sort.t @@ -46,7 +46,7 @@ checkOptree ( name => 'sort @a', bcopts => '-exec', strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <0> enter v +1 <0> enter 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ 3 <0> pushmark s 4 <#> gv[*a] s @@ -54,7 +54,7 @@ checkOptree ( name => 'sort @a', 6 <@> sort vK 7 <@> leave[1 ref] vKP/REFC EOT_EOT -# 1 <0> enter v +# 1 <0> enter # 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ # 3 <0> pushmark s # 4 <$> gv(*a) s @@ -98,7 +98,7 @@ checkOptree ( name => '@a = sort @a', bcopts => '-exec', strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <0> enter v +1 <0> enter 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ 3 <0> pushmark s 4 <0> pushmark s @@ -107,7 +107,7 @@ checkOptree ( name => '@a = sort @a', 7 <@> sort lK/INPLACE 8 <@> leave[1 ref] vKP/REFC EOT_EOT -# 1 <0> enter v +# 1 <0> enter # 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ # 3 <0> pushmark s # 4 <0> pushmark s @@ -155,7 +155,7 @@ checkOptree ( name => '@a = sort @a; reverse @a', bcopts => '-exec', strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <0> enter v +1 <0> enter 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ 3 <0> pushmark s 4 <0> pushmark s @@ -169,7 +169,7 @@ b <1> rv2av[t7] lK/1 c <@> reverse[t8] vK/1 d <@> leave[1 ref] vKP/REFC EOT_EOT -# 1 <0> enter v +# 1 <0> enter # 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ # 3 <0> pushmark s # 4 <0> pushmark s @@ -219,7 +219,7 @@ checkOptree ( name => 'my @a; @a = sort @a', bcopts => '-exec', strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <0> enter v +1 <0> enter 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ 3 <0> padav[@a:1,2] vM/LVINTRO 4 <;> nextstate(main 2 -e:1) v:>,<,%,{ @@ -229,7 +229,7 @@ checkOptree ( name => 'my @a; @a = sort @a', 8 <@> sort lK/INPLACE 9 <@> leave[1 ref] vKP/REFC EOT_EOT -# 1 <0> enter v +# 1 <0> enter # 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ # 3 <0> padav[@a:1,2] vM/LVINTRO # 4 <;> nextstate(main 2 -e:1) v:>,<,%,{ diff --git a/ext/B/t/optree_varinit.t b/ext/B/t/optree_varinit.t index 8312df029d..5938048f3a 100644 --- a/ext/B/t/optree_varinit.t +++ b/ext/B/t/optree_varinit.t @@ -80,12 +80,12 @@ checkOptree ( name => 'my $a', strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 4 <@> leave[1 ref] vKP/REFC ->(end) -# 1 <0> enter v ->2 +# 1 <0> enter ->2 # 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 # 3 <0> padsv[$a:1,2] vM/LVINTRO ->4 EOT_EOT # 4 <@> leave[1 ref] vKP/REFC ->(end) -# 1 <0> enter v ->2 +# 1 <0> enter ->2 # 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 # 3 <0> padsv[$a:1,2] vM/LVINTRO ->4 EONT_EONT @@ -96,13 +96,13 @@ checkOptree ( name => 'our $a', strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 3 <@> leave[1 ref] vKP/REFC ->(end) -1 <0> enter v ->2 +1 <0> enter ->2 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 - <1> rv2sv vK/OURINTR,1 ->3 - <#> gv[*a] s ->- EOT_EOT # 3 <@> leave[1 ref] vKP/REFC ->(end) -# 1 <0> enter v ->2 +# 1 <0> enter ->2 # 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 # - <1> rv2sv vK/OURINTR,1 ->3 # - <$> gv(*a) s ->- @@ -115,13 +115,13 @@ checkOptree ( name => 'local $c', strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 4 <@> leave[1 ref] vKP/REFC ->(end) -1 <0> enter v ->2 +1 <0> enter ->2 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 - <1> ex-rv2sv vKM/LVINTRO,1 ->4 3 <#> gvsv[*c] s/LVINTRO ->4 EOT_EOT # 4 <@> leave[1 ref] vKP/REFC ->(end) -# 1 <0> enter v ->2 +# 1 <0> enter ->2 # 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 # - <1> ex-rv2sv vKM/LVINTRO,1 ->4 # 3 <$> gvsv(*c) s/LVINTRO ->4 @@ -201,14 +201,14 @@ checkOptree ( name => 'my $a=undef', strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 6 <@> leave[1 ref] vKP/REFC ->(end) -1 <0> enter v ->2 +1 <0> enter ->2 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 5 <2> sassign vKS/2 ->6 3 <0> undef s ->4 4 <0> padsv[$a:1,2] sRM*/LVINTRO ->5 EOT_EOT # 6 <@> leave[1 ref] vKP/REFC ->(end) -# 1 <0> enter v ->2 +# 1 <0> enter ->2 # 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 # 5 <2> sassign vKS/2 ->6 # 3 <0> undef s ->4 @@ -222,7 +222,7 @@ checkOptree ( name => 'our $a=undef', strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 6 <@> leave[1 ref] vKP/REFC ->(end) -1 <0> enter v ->2 +1 <0> enter ->2 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 5 <2> sassign vKS/2 ->6 3 <0> undef s ->4 @@ -230,7 +230,7 @@ checkOptree ( name => 'our $a=undef', 4 <#> gvsv[*a] s/OURINTR ->5 EOT_EOT # 6 <@> leave[1 ref] vKP/REFC ->(end) -# 1 <0> enter v ->2 +# 1 <0> enter ->2 # 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 # 5 <2> sassign vKS/2 ->6 # 3 <0> undef s ->4 @@ -246,7 +246,7 @@ checkOptree ( name => 'local $c=undef', strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 6 <@> leave[1 ref] vKP/REFC ->(end) -1 <0> enter v ->2 +1 <0> enter ->2 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 5 <2> sassign vKS/2 ->6 3 <0> undef s ->4 @@ -254,7 +254,7 @@ checkOptree ( name => 'local $c=undef', 4 <#> gvsv[*c] s/LVINTRO ->5 EOT_EOT # 6 <@> leave[1 ref] vKP/REFC ->(end) -# 1 <0> enter v ->2 +# 1 <0> enter ->2 # 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ ->3 # 5 <2> sassign vKS/2 ->6 # 3 <0> undef s ->4 @@ -323,14 +323,14 @@ checkOptree ( name => 'my $a=()', bcopts => '-exec', strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <0> enter v +1 <0> enter 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ 3 <0> stub sP 4 <0> padsv[$a:1,2] sRM*/LVINTRO 5 <2> sassign vKS/2 6 <@> leave[1 ref] vKP/REFC EOT_EOT -# 1 <0> enter v +# 1 <0> enter # 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ # 3 <0> stub sP # 4 <0> padsv[$a:1,2] sRM*/LVINTRO @@ -344,14 +344,14 @@ checkOptree ( name => 'our $a=()', bcopts => '-exec', strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <0> enter v +1 <0> enter 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ 3 <0> stub sP 4 <#> gvsv[*a] s/OURINTR 5 <2> sassign vKS/2 6 <@> leave[1 ref] vKP/REFC EOT_EOT -# 1 <0> enter v +# 1 <0> enter # 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ # 3 <0> stub sP # 4 <$> gvsv(*a) s/OURINTR @@ -366,14 +366,14 @@ checkOptree ( name => 'local $c=()', bcopts => '-exec', strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <0> enter v +1 <0> enter 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ 3 <0> stub sP 4 <#> gvsv[*c] s/LVINTRO 5 <2> sassign vKS/2 6 <@> leave[1 ref] vKP/REFC EOT_EOT -# 1 <0> enter v +# 1 <0> enter # 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ # 3 <0> stub sP # 4 <$> gvsv(*c) s/LVINTRO @@ -387,14 +387,14 @@ checkOptree ( name => 'my ($a,$b)=()', bcopts => '-exec', strip_open_hints => 1, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <0> enter v +# 1 <0> enter # 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ # 3 <0> pushmark s # 4 <0> padrange[$a:1,2; $b:1,2] RM/LVINTRO,range=2 # 5 <2> aassign[t3] vKS # 6 <@> leave[1 ref] vKP/REFC EOT_EOT -# 1 <0> enter v +# 1 <0> enter # 2 <;> nextstate(main 1 -e:1) v:>,<,%,{ # 3 <0> pushmark s # 4 <0> padrange[$a:1,2; $b:1,2] RM/LVINTRO,range=2 diff --git a/ext/Devel-Peek/t/Peek.t b/ext/Devel-Peek/t/Peek.t index fbcda76433..f3f781ac6b 100644 --- a/ext/Devel-Peek/t/Peek.t +++ b/ext/Devel-Peek/t/Peek.t @@ -1465,7 +1465,7 @@ dumpindent is 4 at -e line 1. REFCNT = 1 | 2 +--enter OP(0xNNN) ===> 3 [nextstate 0xNNN] - | FLAGS = (VOID,SLABBED,MORESIB) + | FLAGS = (UNKNOWN,SLABBED,MORESIB) | 3 +--nextstate COP(0xNNN) ===> 4 [pushmark 0xNNN] | FLAGS = (VOID,SLABBED,MORESIB) @@ -2056,23 +2056,6 @@ Perl_sv_only_taint_gmagic(SV *sv) /* ------------------ cop.h ------------------------------------------- */ -/* implement GIMME_V() macro */ - -PERL_STATIC_INLINE U8 -Perl_gimme_V(pTHX) -{ - I32 cxix; - U8 gimme = (PL_op->op_flags & OPf_WANT); - - if (gimme) - return gimme; - cxix = PL_curstackinfo->si_cxsubix; - if (cxix < 0) - return G_VOID; - assert(cxstack[cxix].blk_gimme & G_WANT); - return (cxstack[cxix].blk_gimme & G_WANT); -} - /* Enter a block. Push a new base context and return its address. */ @@ -2151,8 +2134,6 @@ Perl_cx_pushsub(pTHX_ PERL_CONTEXT *cx, CV *cv, OP *retop, bool hasargs) PERL_ARGS_ASSERT_CX_PUSHSUB; PERL_DTRACE_PROBE_ENTRY(cv); - cx->blk_sub.old_cxsubix = PL_curstackinfo->si_cxsubix; - PL_curstackinfo->si_cxsubix = cx - PL_curstackinfo->si_cxstack; cx->blk_sub.cv = cv; cx->blk_sub.olddepth = CvDEPTH(cv); cx->blk_sub.prevcomppad = PL_comppad; @@ -2179,7 +2160,6 @@ Perl_cx_popsub_common(pTHX_ PERL_CONTEXT *cx) CvDEPTH(cv) = cx->blk_sub.olddepth; cx->blk_sub.cv = NULL; SvREFCNT_dec(cv); - PL_curstackinfo->si_cxsubix = cx->blk_sub.old_cxsubix; } @@ -2226,8 +2206,6 @@ Perl_cx_pushformat(pTHX_ PERL_CONTEXT *cx, CV *cv, OP *retop, GV *gv) { PERL_ARGS_ASSERT_CX_PUSHFORMAT; - cx->blk_format.old_cxsubix = PL_curstackinfo->si_cxsubix; - PL_curstackinfo->si_cxsubix= cx - PL_curstackinfo->si_cxstack; cx->blk_format.cv = cv; cx->blk_format.retop = retop; cx->blk_format.gv = gv; @@ -2261,7 +2239,6 @@ Perl_cx_popformat(pTHX_ PERL_CONTEXT *cx) cx->blk_format.cv = NULL; --CvDEPTH(cv); SvREFCNT_dec_NN(cv); - PL_curstackinfo->si_cxsubix = cx->blk_format.old_cxsubix; } @@ -2270,8 +2247,6 @@ Perl_cx_pusheval(pTHX_ PERL_CONTEXT *cx, OP *retop, SV *namesv) { PERL_ARGS_ASSERT_CX_PUSHEVAL; - cx->blk_eval.old_cxsubix = PL_curstackinfo->si_cxsubix; - PL_curstackinfo->si_cxsubix= cx - PL_curstackinfo->si_cxstack; cx->blk_eval.retop = retop; cx->blk_eval.old_namesv = namesv; cx->blk_eval.old_eval_root = PL_eval_root; @@ -2307,7 +2282,6 @@ Perl_cx_popeval(pTHX_ PERL_CONTEXT *cx) cx->blk_eval.old_namesv = NULL; SvREFCNT_dec_NN(sv); } - PL_curstackinfo->si_cxsubix = cx->blk_eval.old_cxsubix; } @@ -5455,8 +5455,7 @@ Perl_op_scope(pTHX_ OP *o) dVAR; if (o) { if (o->op_flags & OPf_PARENS || PERLDB_NOOPT || TAINTING_get) { - o = op_prepend_elem(OP_LINESEQ, - newOP(OP_ENTER, (o->op_flags & OPf_WANT)), o); + o = op_prepend_elem(OP_LINESEQ, newOP(OP_ENTER, 0), o); OpTYPE_set(o, OP_LEAVE); } else if (o->op_type == OP_LINESEQ) { @@ -85,7 +85,7 @@ Deprecated. Use C<GIMME_V> instead. =cut */ -#define GIMME_V Perl_gimme_V(aTHX) +#define GIMME_V OP_GIMME(PL_op, block_gimme()) /* Public flags */ diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 0594af90e3..0b04894f03 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -163,11 +163,7 @@ decode it as UTF-8. [perl #133981] =item * -Added the C<<PL_curstackinfo->si_cxsubix>> field. This records the stack -index of the most recently pushed sub/format/eval context. It is set and -restored automatically by C<cx_pushsub()>, C<cx_popsub()> etc., but would -need to be manually managed if you do any unusual manipulation of the -context stack. +XXX =back @@ -37,11 +37,6 @@ #define RUN_PP_CATCHABLY(thispp) \ STMT_START { if (CATCH_GET) return docatch(thispp); } STMT_END -#define dopopto_cursub() \ - (PL_curstackinfo->si_cxsubix >= 0 \ - ? PL_curstackinfo->si_cxsubix \ - : dopoptosub_at(cxstack, cxstack_ix)) - #define dopoptosub(plop) dopoptosub_at(cxstack, (plop)) PP(pp_wantarray) @@ -55,7 +50,7 @@ PP(pp_wantarray) if (!(cx = caller_cx(1,NULL))) RETPUSHUNDEF; } else { - cxix = dopopto_cursub(); + cxix = dopoptosub(cxstack_ix); if (cxix < 0) RETPUSHUNDEF; cx = &cxstack[cxix]; @@ -1389,12 +1384,10 @@ Perl_dowantarray(pTHX) return (gimme == G_VOID) ? G_SCALAR : gimme; } -/* note that this function has mostly been superseded by Perl_gimme_V */ - U8 Perl_block_gimme(pTHX) { - const I32 cxix = dopopto_cursub(); + const I32 cxix = dopoptosub(cxstack_ix); U8 gimme; if (cxix < 0) return G_VOID; @@ -1409,7 +1402,7 @@ Perl_block_gimme(pTHX) I32 Perl_is_lvalue_sub(pTHX) { - const I32 cxix = dopopto_cursub(); + const I32 cxix = dopoptosub(cxstack_ix); assert(cxix >= 0); /* We should only be called from inside subs */ if (CxLVAL(cxstack + cxix) && CvLVALUE(cxstack[cxix].blk_sub.cv)) @@ -1867,7 +1860,7 @@ frame for the sub call itself. const PERL_CONTEXT * Perl_caller_cx(pTHX_ I32 count, const PERL_CONTEXT **dbcxp) { - I32 cxix = dopopto_cursub(); + I32 cxix = dopoptosub(cxstack_ix); const PERL_CONTEXT *cx; const PERL_CONTEXT *ccstack = cxstack; const PERL_SI *top_si = PL_curstackinfo; @@ -2469,7 +2462,7 @@ PP(pp_return) { dSP; dMARK; PERL_CONTEXT *cx; - const I32 cxix = dopopto_cursub(); + const I32 cxix = dopoptosub(cxstack_ix); assert(cxstack_ix >= 0); if (cxix < cxstack_ix) { @@ -2840,7 +2833,7 @@ PP(pp_goto) DIE(aTHX_ "Goto undefined subroutine"); } - cxix = dopopto_cursub(); + cxix = dopoptosub(cxstack_ix); if (cxix < 0) { DIE(aTHX_ "Can't goto subroutine outside a subroutine"); } @@ -4868,10 +4868,6 @@ PERL_STATIC_INLINE void Perl_cx_topblock(pTHX_ PERL_CONTEXT *cx); #define PERL_ARGS_ASSERT_CX_TOPBLOCK \ assert(cx) #endif -#ifndef PERL_NO_INLINE_FUNCTIONS -PERL_STATIC_INLINE U8 Perl_gimme_V(pTHX); -#define PERL_ARGS_ASSERT_GIMME_V -#endif #endif #if !defined(PERL_NO_UTF16_FILTER) # if defined(PERL_IN_TOKE_C) @@ -82,7 +82,6 @@ Perl_new_stackinfo(pTHX_ I32 stitems, I32 cxitems) si->si_next = 0; si->si_cxmax = cxitems - 1; si->si_cxix = -1; - si->si_cxsubix = -1; si->si_type = PERLSI_UNDEF; Newx(si->si_cxstack, cxitems, PERL_CONTEXT); /* Without any kind of initialising CX_PUSHSUBST() @@ -14690,7 +14690,6 @@ Perl_si_dup(pTHX_ PERL_SI *si, CLONE_PARAMS* param) nsi->si_stack = av_dup_inc(si->si_stack, param); nsi->si_cxix = si->si_cxix; - nsi->si_cxsubix = si->si_cxsubix; nsi->si_cxmax = si->si_cxmax; nsi->si_cxstack = cx_dup(si->si_cxstack, si->si_cxix, si->si_cxmax, param); nsi->si_type = si->si_type; diff --git a/t/perf/benchmarks b/t/perf/benchmarks index 63eb62cfc3..7795079c78 100644 --- a/t/perf/benchmarks +++ b/t/perf/benchmarks @@ -158,12 +158,6 @@ code => '$x = f(1)', }, - 'call::sub::scalar' => { - desc => 'sub called in scalar context', - setup => 'my $x; my @a = 1..4; sub f { @a }', - code => '$x = f()', - }, - 'call::goto::empty' => { desc => 'goto &funtion with no args or body', setup => 'sub f { goto &g } sub g {}', |