From: Nicholas Clark Date: Sat, 20 May 2006 15:27:28 +0000 (+0000) Subject: Move the hints from op_private into cop_hints. This allows all 32 bits X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d5ec2987912a76b3059b7bd1d06cf02b4d0dae0c;p=p5sagit%2Fp5-mst-13.2.git Move the hints from op_private into cop_hints. This allows all 32 bits to be stored. Make B::Concise display the new hints field, and modify B::Deparse to use it. p4raw-id: //depot/perl@28257 --- diff --git a/cop.h b/cop.h index 203e431..21dc228 100644 --- a/cop.h +++ b/cop.h @@ -143,6 +143,7 @@ struct cop { HV * cop_stash; /* package line was compiled in */ GV * cop_filegv; /* file the following line # is from */ #endif + U32 cop_hints; /* hints bits from pragmata */ U32 cop_seq; /* parse sequence number */ line_t cop_line; /* line # of this command */ /* Beware. mg.c and warnings.pl assume the type of this is STRLEN *: */ @@ -239,8 +240,8 @@ struct cop { "$[", 2, 0, 0)) \ : 0) #define CopARYBASE_set(c, b) STMT_START { \ - if (b || ((c)->op_private & HINT_ARYBASE)) { \ - (c)->op_private |= HINT_ARYBASE; \ + if (b || ((c)->cop_hints & HINT_ARYBASE)) { \ + (c)->cop_hints |= HINT_ARYBASE; \ if ((c) == &PL_compiling) \ PL_hints |= HINT_LOCALIZE_HH | HINT_ARYBASE; \ (c)->cop_hints_hash \ @@ -251,10 +252,9 @@ struct cop { } STMT_END /* FIXME NATIVE_HINTS if this is changed from op_private (see perl.h) */ -#define CopHINTS_get(c) ((c)->op_private + 0) +#define CopHINTS_get(c) ((c)->cop_hints + 0) #define CopHINTS_set(c, h) STMT_START { \ - (c)->op_private \ - = (U8)((h) & HINT_PRIVATE_MASK); \ + (c)->cop_hints = (h); \ } STMT_END /* diff --git a/ext/B/B.pm b/ext/B/B.pm index f157e78..b28c64c 100644 --- a/ext/B/B.pm +++ b/ext/B/B.pm @@ -7,7 +7,7 @@ # package B; -our $VERSION = '1.10'; +our $VERSION = '1.11'; use XSLoader (); require Exporter; @@ -1110,6 +1110,8 @@ Only when perl was compiled with ithreads. =item io +=item hints + =back diff --git a/ext/B/B.xs b/ext/B/B.xs index d8ec4e3..50b959b 100644 --- a/ext/B/B.xs +++ b/ext/B/B.xs @@ -1101,6 +1101,7 @@ LOOP_lastop(o) #define COP_arybase(o) CopARYBASE_get(o) #define COP_line(o) CopLINE(o) #define COP_io(o) o->cop_io +#define COP_hints(o) CopHINTS_get(o) MODULE = B PACKAGE = B::COP PREFIX = COP_ @@ -1148,6 +1149,10 @@ B::SV COP_io(o) B::COP o +U32 +COP_hints(o) + B::COP o + MODULE = B PACKAGE = B::SV U32 diff --git a/ext/B/B/Concise.pm b/ext/B/B/Concise.pm index b2179a7..0633edb 100644 --- a/ext/B/B/Concise.pm +++ b/ext/B/B/Concise.pm @@ -14,7 +14,7 @@ use warnings; # uses #3 and #4, since warnings uses Carp use Exporter (); # use #5 -our $VERSION = "0.68"; +our $VERSION = "0.69"; our @ISA = qw(Exporter); our @EXPORT_OK = qw( set_style set_style_standard add_callback concise_subref concise_cv concise_main @@ -37,8 +37,8 @@ my %style = "(*( )*)goto #class (#addr)\n", "#class pp_#name"], "concise" => - ["#hyphseq2 (*( (x( ;)x))*)<#classsym> " - . "#exname#arg(?([#targarglife])?)~#flags(?(/#private)?)(x(;~->#next)x)\n" + ["#hyphseq2 (*( (x( ;)x))*)<#classsym> #exname#arg(?([#targarglife])?)" + . "~#flags(?(/#private)?)(?(:#hints)?)(x(;~->#next)x)\n" , " (*( )*) goto #seq\n", "(?(<#seq>)?)#exname#arg(?([#targarglife])?)"], "linenoise" => @@ -49,7 +49,7 @@ my %style = ["#class (#addr)\n\top_next\t\t#nextaddr\n\top_sibling\t#sibaddr\n\t" . "op_ppaddr\tPL_ppaddr[OP_#NAME]\n\top_type\t\t#typenum\n" . ($] > 5.009 ? '' : "\top_seq\t\t#seqnum\n") - . "\top_flags\t#flagval\n\top_private\t#privval\n" + . "\top_flags\t#flagval\n\top_private\t#privval\t#hintsval\n" . "(?(\top_first\t#firstaddr\n)?)(?(\top_last\t\t#lastaddr\n)?)" . "(?(\top_sv\t\t#svaddr\n)?)", " GOTO #addr\n", @@ -618,19 +618,44 @@ if ($] >= 5.009) { for ("mapwhile", "mapstart", "grepwhile", "grepstart"); } -sub private_flags { - my($name, $x) = @_; +our %hints; # used to display each COP's op_hints values + +# strict refs, subs, vars +@hints{2,512,1024} = ('$', '&', '*'); +# integers, locale, bytes, arybase +@hints{1,4,8,16,32} = ('i', 'l', 'b', '['); +# block scope, localise %^H +@hints{256,131072} = ('{','%'); +# overload new integer, float, binary, string, re +@hints{4096,8192,16384,32768,65536} = ('I', 'F', 'B', 'S', 'R'); +# taint and eval +@hints{1048576,2097152} = ('T', 'E'); +# filetest access, UTF-8, assertions, assertions seen +@hints{4194304,8388608,16777216,33554432} = ('X', 'U', 'A', 'a'); + +sub _flags { + my($hash, $x) = @_; my @s; - for my $flag (128, 96, 64, 32, 16, 8, 4, 2, 1) { - if ($priv{$name}{$flag} and $x & $flag and $x >= $flag) { + for my $flag (sort {$b <=> $a} keys %$hash) { + if ($hash->{$flag} and $x & $flag and $x >= $flag) { $x -= $flag; - push @s, $priv{$name}{$flag}; + push @s, $hash->{$flag}; } } push @s, $x if $x; return join(",", @s); } +sub private_flags { + my($name, $x) = @_; + _flags($priv{$name}, $x); +} + +sub hints_flags { + my($x) = @_; + _flags(\%hints, $x); +} + sub concise_sv { my($sv, $hr, $preferpv) = @_; $hr->{svclass} = class($sv); @@ -803,6 +828,12 @@ sub concise_op { $h{flags} = op_flags($op->flags); $h{privval} = $op->private; $h{private} = private_flags($h{name}, $op->private); + if ($op->can("hints")) { + $h{hintsval} = $op->hints; + $h{hints} = hints_flags($h{hintsval}); + } else { + $h{hintsval} = $h{hints} = ''; + } $h{addr} = sprintf("%#x", $$op); $h{typenum} = $op->type; $h{noise} = $linenoise[$op->type]; @@ -1393,6 +1424,16 @@ The OP's flags, abbreviated as a series of symbols. The numeric value of the OP's flags. +=item B<#hints> + +The COP's hint flags, rendered with abbreviated names if possible. An empty +string if this is not a COP. + +=item B<#hintsval> + +The numeric value of the COP's hint flags, or an empty string if this is not +a COP. + =item B<#hyphseq> The sequence number of the OP, or a hyphen if it doesn't have one. diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm index 092336c..a9abfec 100644 --- a/ext/B/B/Deparse.pm +++ b/ext/B/B/Deparse.pm @@ -20,7 +20,7 @@ use B qw(class main_root main_start main_cv svref_2object opnumber perlstring CVf_METHOD CVf_LOCKED CVf_LVALUE CVf_ASSERTION PMf_KEEP PMf_GLOBAL PMf_CONTINUE PMf_EVAL PMf_ONCE PMf_SKIPWHITE PMf_MULTILINE PMf_SINGLELINE PMf_FOLD PMf_EXTENDED); -$VERSION = 0.75; +$VERSION = 0.76; use strict; use vars qw/$AUTOLOAD/; use warnings (); @@ -607,7 +607,7 @@ sub init { $self->{'warnings'} = defined ($self->{'ambient_warnings'}) ? $self->{'ambient_warnings'} & WARN_MASK : undef; - $self->{'hints'} = $self->{'ambient_hints'} & 0xFF; + $self->{'hints'} = $self->{'ambient_hints'}; # also a convenient place to clear out subs_declared delete $self->{'subs_declared'}; @@ -1402,9 +1402,9 @@ sub pp_nextstate { $self->{'warnings'} = $warning_bits; } - if ($self->{'hints'} != $op->private) { - push @text, declare_hints($self->{'hints'}, $op->private); - $self->{'hints'} = $op->private; + if ($self->{'hints'} != $op->hints) { + push @text, declare_hints($self->{'hints'}, $op->hints); + $self->{'hints'} = $op->hints; } # This should go after of any branches that add statements, to diff --git a/ext/B/t/f_map.t b/ext/B/t/f_map.t index 8e614a6..9c2dd1d 100644 --- a/ext/B/t/f_map.t +++ b/ext/B/t/f_map.t @@ -97,7 +97,7 @@ checkOptree(note => q{}, bcopts => q{-exec}, code => q{%hash = map { getkey($_) => $_ } @array; }, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <;> nextstate(main 476 (eval 10):1) v +# 1 <;> nextstate(main 476 (eval 10):1) v:{ # 2 <0> pushmark s # 3 <0> pushmark s # 4 <#> gv[*array] s @@ -105,7 +105,7 @@ checkOptree(note => q{}, # 6 <@> mapstart lK* # 7 <|> mapwhile(other->8)[t9] lK # 8 <0> enter l -# 9 <;> nextstate(main 475 (eval 10):1) v +# 9 <;> nextstate(main 475 (eval 10):1) v:{ # a <0> pushmark s # b <0> pushmark s # c <#> gvsv[*_] s @@ -121,7 +121,7 @@ checkOptree(note => q{}, # l <2> aassign[t10] KS/COMMON # m <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 560 (eval 15):1) v +# 1 <;> nextstate(main 560 (eval 15):1) v:{ # 2 <0> pushmark s # 3 <0> pushmark s # 4 <$> gv(*array) s @@ -129,7 +129,7 @@ EOT_EOT # 6 <@> mapstart lK* # 7 <|> mapwhile(other->8)[t4] lK # 8 <0> enter l -# 9 <;> nextstate(main 559 (eval 15):1) v +# 9 <;> nextstate(main 559 (eval 15):1) v:{ # a <0> pushmark s # b <0> pushmark s # c <$> gvsv(*_) s @@ -162,7 +162,7 @@ checkOptree(note => q{}, bcopts => q{-exec}, code => q{{ %hash = (); foreach $_ (@array) { $hash{getkey($_)} = $_; } } }, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <;> nextstate(main 478 (eval 10):1) v +# 1 <;> nextstate(main 478 (eval 10):1) v:{ # 2 <{> enterloop(next->u last->u redo->3) # 3 <;> nextstate(main 475 (eval 10):1) v # 4 <0> pushmark s @@ -170,7 +170,7 @@ checkOptree(note => q{}, # 6 <#> gv[*hash] s # 7 <1> rv2hv[t2] lKRM*/1 # 8 <2> aassign[t3] vKS -# 9 <;> nextstate(main 476 (eval 10):1) v +# 9 <;> nextstate(main 476 (eval 10):1) v:{ # a <0> pushmark sM # b <#> gv[*array] s # c <1> rv2av[t6] sKRM/1 @@ -179,7 +179,7 @@ checkOptree(note => q{}, # f <{> enteriter(next->q last->t redo->g) lKS/8 # r <0> iter s # s <|> and(other->g) K/1 -# g <;> nextstate(main 475 (eval 10):1) v +# g <;> nextstate(main 475 (eval 10):1) v:{ # h <#> gvsv[*_] s # i <#> gv[*hash] s # j <1> rv2hv sKR/1 @@ -195,7 +195,7 @@ checkOptree(note => q{}, # u <2> leaveloop K/2 # v <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 562 (eval 15):1) v +# 1 <;> nextstate(main 562 (eval 15):1) v:{ # 2 <{> enterloop(next->u last->u redo->3) # 3 <;> nextstate(main 559 (eval 15):1) v # 4 <0> pushmark s @@ -203,7 +203,7 @@ EOT_EOT # 6 <$> gv(*hash) s # 7 <1> rv2hv[t1] lKRM*/1 # 8 <2> aassign[t2] vKS -# 9 <;> nextstate(main 560 (eval 15):1) v +# 9 <;> nextstate(main 560 (eval 15):1) v:{ # a <0> pushmark sM # b <$> gv(*array) s # c <1> rv2av[t3] sKRM/1 @@ -212,7 +212,7 @@ EOT_EOT # f <{> enteriter(next->q last->t redo->g) lKS/8 # r <0> iter s # s <|> and(other->g) K/1 -# g <;> nextstate(main 559 (eval 15):1) v +# g <;> nextstate(main 559 (eval 15):1) v:{ # h <$> gvsv(*_) s # i <$> gv(*hash) s # j <1> rv2hv sKR/1 diff --git a/ext/B/t/f_sort.t b/ext/B/t/f_sort.t index 513c2e2..20bf865 100644 --- a/ext/B/t/f_sort.t +++ b/ext/B/t/f_sort.t @@ -395,14 +395,14 @@ checkOptree(name => q{sort USERSUB LIST }, # k <#> gv[*george] s # l <1> rv2av[t5] lKRM*/1 # m <2> aassign[t6] vKS -# n <;> nextstate(main 602 (eval 32):4) v +# n <;> nextstate(main 602 (eval 32):4) v:{ # o <0> pushmark s # p <0> pushmark s # q <#> gv[*harry] s # r <1> rv2av[t8] lK/1 # s <@> sort lK # t <@> print vK -# u <;> nextstate(main 602 (eval 32):4) v +# u <;> nextstate(main 602 (eval 32):4) v:{ # v <0> pushmark s # w <0> pushmark s # x <$> const[PV "backwards"] s/BARE @@ -410,7 +410,7 @@ checkOptree(name => q{sort USERSUB LIST }, # z <1> rv2av[t10] lK/1 # 10 <@> sort lKS # 11 <@> print vK -# 12 <;> nextstate(main 602 (eval 32):5) v +# 12 <;> nextstate(main 602 (eval 32):5) v:{ # 13 <0> pushmark s # 14 <0> pushmark s # 15 <#> gv[*george] s @@ -444,14 +444,14 @@ EOT_EOT # k <$> gv(*george) s # l <1> rv2av[t3] lKRM*/1 # m <2> aassign[t4] vKS -# n <;> nextstate(main 602 (eval 32):4) v +# n <;> nextstate(main 602 (eval 32):4) v:{ # o <0> pushmark s # p <0> pushmark s # q <$> gv(*harry) s # r <1> rv2av[t5] lK/1 # s <@> sort lK # t <@> print vK -# u <;> nextstate(main 602 (eval 32):4) v +# u <;> nextstate(main 602 (eval 32):4) v:{ # v <0> pushmark s # w <0> pushmark s # x <$> const(PV "backwards") s/BARE @@ -459,7 +459,7 @@ EOT_EOT # z <1> rv2av[t6] lK/1 # 10 <@> sort lKS # 11 <@> print vK -# 12 <;> nextstate(main 602 (eval 32):5) v +# 12 <;> nextstate(main 602 (eval 32):5) v:{ # 13 <0> pushmark s # 14 <0> pushmark s # 15 <$> gv(*george) s @@ -500,7 +500,7 @@ checkOptree(name => q{Compound sort/map Expression }, sort { $b->[1] <=> $a->[1] || $a->[2] cmp $b->[2] } map { [$_, /=(\d+)/, uc($_)] } @old; }, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <;> nextstate(main 609 (eval 34):3) v +# 1 <;> nextstate(main 609 (eval 34):3) v:{ # 2 <0> pushmark s # 3 <0> pushmark s # 4 <0> pushmark s @@ -510,7 +510,7 @@ checkOptree(name => q{Compound sort/map Expression }, # 8 <@> mapstart lK* # 9 <|> mapwhile(other->a)[t20] lK # a <0> enter l -# b <;> nextstate(main 608 (eval 34):2) v +# b <;> nextstate(main 608 (eval 34):2) v:{ # c <0> pushmark s # d <#> gvsv[*_] s # e match(/"=(\\d+)"/) l/RTIME @@ -536,7 +536,7 @@ checkOptree(name => q{Compound sort/map Expression }, # v <2> aassign[t27] KS/COMMON # w <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 609 (eval 34):3) v +# 1 <;> nextstate(main 609 (eval 34):3) v:{ # 2 <0> pushmark s # 3 <0> pushmark s # 4 <0> pushmark s @@ -546,7 +546,7 @@ EOT_EOT # 8 <@> mapstart lK* # 9 <|> mapwhile(other->a)[t11] lK # a <0> enter l -# b <;> nextstate(main 608 (eval 34):2) v +# b <;> nextstate(main 608 (eval 34):2) v:{ # c <0> pushmark s # d <$> gvsv(*_) s # e match(/"=(\\d+)"/) l/RTIME @@ -590,7 +590,7 @@ checkOptree(name => q{sort other::sub LIST }, code => q{package other; sub backwards ($$) { $_[1] cmp $_[0]; } package main; @new = sort other::backwards @old; }, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <;> nextstate(main 614 (eval 36):2) v +# 1 <;> nextstate(main 614 (eval 36):2) v:{ # 2 <0> pushmark s # 3 <0> pushmark s # 4 <$> const[PV "other::backwards"] s/BARE @@ -603,7 +603,7 @@ checkOptree(name => q{sort other::sub LIST }, # b <2> aassign[t5] KS/COMMON # c <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 614 (eval 36):2) v +# 1 <;> nextstate(main 614 (eval 36):2) v:{ # 2 <0> pushmark s # 3 <0> pushmark s # 4 <$> const(PV "other::backwards") s/BARE @@ -670,7 +670,7 @@ checkOptree(note => q{}, bcopts => q{-exec}, code => q{use sort 'stable'; @new = sort { substr($a, 3, 5) cmp substr($b, 3, 5) } @old; }, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <;> nextstate(main 656 (eval 40):1) v +# 1 <;> nextstate(main 656 (eval 40):1) v:%,{ # 2 <0> pushmark s # 3 <0> pushmark s # 4 <#> gv[*old] s @@ -682,7 +682,7 @@ checkOptree(note => q{}, # a <2> aassign[t14] KS/COMMON # b <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 578 (eval 15):1) v +# 1 <;> nextstate(main 578 (eval 15):1) v:%,{ # 2 <0> pushmark s # 3 <0> pushmark s # 4 <$> gv(*old) s @@ -708,7 +708,7 @@ checkOptree(note => q{}, bcopts => q{-exec}, code => q{use sort '_mergesort'; @new = sort { substr($a, 3, 5) cmp substr($b, 3, 5) } @old; }, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <;> nextstate(main 662 (eval 42):1) v +# 1 <;> nextstate(main 662 (eval 42):1) v:%,{ # 2 <0> pushmark s # 3 <0> pushmark s # 4 <#> gv[*old] s @@ -720,7 +720,7 @@ checkOptree(note => q{}, # a <2> aassign[t14] KS/COMMON # b <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 578 (eval 15):1) v +# 1 <;> nextstate(main 578 (eval 15):1) v:%,{ # 2 <0> pushmark s # 3 <0> pushmark s # 4 <$> gv(*old) s @@ -905,7 +905,7 @@ checkOptree(note => q{}, bcopts => q{-exec}, code => q{$s = sort { $a <=> $b } @input; }, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <;> nextstate(main 689 (eval 52):1) v +# 1 <;> nextstate(main 689 (eval 52):1) v:{ # 2 <0> pushmark s # 3 <#> gv[*input] s # 4 <1> rv2av[t6] lK/1 @@ -914,7 +914,7 @@ checkOptree(note => q{}, # 7 <2> sassign sKS/2 # 8 <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 546 (eval 15):1) v +# 1 <;> nextstate(main 546 (eval 15):1) v:{ # 2 <0> pushmark s # 3 <$> gv(*input) s # 4 <1> rv2av[t2] lK/1 @@ -935,7 +935,7 @@ checkOptree(note => q{}, bcopts => q{-exec}, code => q{$s = sort { $a <=> $b } grep { $_ == $_ } @input; }, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <;> nextstate(main 695 (eval 54):1) v +# 1 <;> nextstate(main 695 (eval 54):1) v:{ # 2 <0> pushmark s # 3 <0> pushmark s # 4 <#> gv[*input] s @@ -952,7 +952,7 @@ checkOptree(note => q{}, # d <2> sassign sKS/2 # e <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 547 (eval 15):1) v +# 1 <;> nextstate(main 547 (eval 15):1) v:{ # 2 <0> pushmark s # 3 <0> pushmark s # 4 <$> gv(*input) s diff --git a/ext/B/t/optree_check.t b/ext/B/t/optree_check.t index ee682fd..4a57b1b 100644 --- a/ext/B/t/optree_check.t +++ b/ext/B/t/optree_check.t @@ -185,7 +185,7 @@ checkOptree ( name => 'canonical example w -basic', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 7 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->7 -# 1 <;> nextstate(main 380 optree_selftest.t:139) v ->2 +# 1 <;> nextstate(main 380 optree_selftest.t:139) v:{ ->2 # 6 <2> sassign sKS/2 ->7 # 4 <2> add[t3] sK/2 ->5 # - <1> ex-rv2sv sK/1 ->3 @@ -196,7 +196,7 @@ checkOptree ( name => 'canonical example w -basic', EOT_EOT # 7 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->7 -# 1 <;> nextstate(main 60 optree_concise.t:122) v ->2 +# 1 <;> nextstate(main 60 optree_concise.t:122) v:{ ->2 # 6 <2> sassign sKS/2 ->7 # 4 <2> add[t1] sK/2 ->5 # - <1> ex-rv2sv sK/1 ->3 @@ -209,7 +209,7 @@ EONT_EONT checkOptree ( code => '$a=$b+42', bcopts => '-exec', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <;> nextstate(main 61 optree_concise.t:139) v +# 1 <;> nextstate(main 61 optree_concise.t:139) v:{ # 2 <#> gvsv[*b] s # 3 <$> const[IV 42] s # 4 <2> add[t3] sK/2 @@ -217,7 +217,7 @@ checkOptree ( code => '$a=$b+42', # 6 <2> sassign sKS/2 # 7 <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 61 optree_concise.t:139) v +# 1 <;> nextstate(main 61 optree_concise.t:139) v:{ # 2 <$> gvsv(*b) s # 3 <$> const(IV 42) s # 4 <2> add[t1] sK/2 diff --git a/ext/B/t/optree_concise.t b/ext/B/t/optree_concise.t index b14af0d..3a3d219 100644 --- a/ext/B/t/optree_concise.t +++ b/ext/B/t/optree_concise.t @@ -38,7 +38,7 @@ checkOptree ( name => 'canonical example w -basic', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 7 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->7 -# 1 <;> nextstate(foo bar) v ->2 +# 1 <;> nextstate(foo bar) v:{ ->2 # 6 <2> sassign sKS/2 ->7 # 4 <2> add[t3] sK/2 ->5 # - <1> ex-rv2sv sK/1 ->3 @@ -49,7 +49,7 @@ checkOptree ( name => 'canonical example w -basic', EOT_EOT # 7 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->7 -# 1 <;> nextstate(main 60 optree_concise.t:122) v ->2 +# 1 <;> nextstate(main 60 optree_concise.t:122) v:{ ->2 # 6 <2> sassign sKS/2 ->7 # 4 <2> add[t1] sK/2 ->5 # - <1> ex-rv2sv sK/1 ->3 @@ -63,7 +63,7 @@ checkOptree ( name => 'canonical example w -exec', bcopts => '-exec', code => sub{$a=$b+42}, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <;> nextstate(main 61 optree_concise.t:139) v +# 1 <;> nextstate(main 61 optree_concise.t:139) v:{ # 2 <#> gvsv[*b] s # 3 <$> const[IV 42] s # 4 <2> add[t3] sK/2 @@ -71,7 +71,7 @@ checkOptree ( name => 'canonical example w -exec', # 6 <2> sassign sKS/2 # 7 <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 61 optree_concise.t:139) v +# 1 <;> nextstate(main 61 optree_concise.t:139) v:{ # 2 <$> gvsv(*b) s # 3 <$> const(IV 42) s # 4 <2> add[t1] sK/2 @@ -87,7 +87,7 @@ checkOptree ( name => '-base3 sticky-exec', bcopts => '-base3', code => sub{$a=$b+42}, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <;> dbstate(main 24 optree_concise.t:132) v +1 <;> dbstate(main 24 optree_concise.t:132) v:{ 2 <#> gvsv[*b] s 10 <$> const[IV 42] s 11 <2> add[t3] sK/2 @@ -95,7 +95,7 @@ checkOptree ( name => '-base3 sticky-exec', 20 <2> sassign sKS/2 21 <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 62 optree_concise.t:161) v +# 1 <;> nextstate(main 62 optree_concise.t:161) v:{ # 2 <$> gvsv(*b) s # 10 <$> const(IV 42) s # 11 <2> add[t1] sK/2 @@ -110,7 +110,7 @@ checkOptree ( name => 'sticky-base3, -basic over sticky-exec', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 21 <1> leavesub[1 ref] K/REFC,1 ->(end) - <@> lineseq KP ->21 -1 <;> nextstate(main 32 optree_concise.t:164) v ->2 +1 <;> nextstate(main 32 optree_concise.t:164) v:{ ->2 20 <2> sassign sKS/2 ->21 11 <2> add[t3] sK/2 ->12 - <1> ex-rv2sv sK/1 ->10 @@ -121,7 +121,7 @@ checkOptree ( name => 'sticky-base3, -basic over sticky-exec', EOT_EOT # 21 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->21 -# 1 <;> nextstate(main 63 optree_concise.t:186) v ->2 +# 1 <;> nextstate(main 63 optree_concise.t:186) v:{ ->2 # 20 <2> sassign sKS/2 ->21 # 11 <2> add[t1] sK/2 ->12 # - <1> ex-rv2sv sK/1 ->10 @@ -137,7 +137,7 @@ checkOptree ( name => '-base4', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 13 <1> leavesub[1 ref] K/REFC,1 ->(end) - <@> lineseq KP ->13 -1 <;> nextstate(main 26 optree_concise.t:145) v ->2 +1 <;> nextstate(main 26 optree_concise.t:145) v:{ ->2 12 <2> sassign sKS/2 ->13 10 <2> add[t3] sK/2 ->11 - <1> ex-rv2sv sK/1 ->3 @@ -148,7 +148,7 @@ checkOptree ( name => '-base4', EOT_EOT # 13 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->13 -# 1 <;> nextstate(main 64 optree_concise.t:193) v ->2 +# 1 <;> nextstate(main 64 optree_concise.t:193) v:{ ->2 # 12 <2> sassign sKS/2 ->13 # 10 <2> add[t1] sK/2 ->11 # - <1> ex-rv2sv sK/1 ->3 @@ -217,7 +217,7 @@ checkOptree ( name => 'cmdline invoke -basic works', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 7 <@> leave[1 ref] vKP/REFC ->(end) # 1 <0> enter ->2 -# 2 <;> nextstate(main 1 -e:1) v ->3 +# 2 <;> nextstate(main 1 -e:1) v:{ ->3 # 6 <@> sort vK ->7 # 3 <0> pushmark s ->4 # 5 <1> rv2av[t2] lK/1 ->6 @@ -225,7 +225,7 @@ checkOptree ( name => 'cmdline invoke -basic works', EOT_EOT # 7 <@> leave[1 ref] vKP/REFC ->(end) # 1 <0> enter ->2 -# 2 <;> nextstate(main 1 -e:1) v ->3 +# 2 <;> nextstate(main 1 -e:1) v:{ ->3 # 6 <@> sort vK ->7 # 3 <0> pushmark s ->4 # 5 <1> rv2av[t1] lK/1 ->6 @@ -240,7 +240,7 @@ checkOptree ( name => 'cmdline invoke -exec works', bcopts => '-exec', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <0> enter -2 <;> nextstate(main 1 -e:1) v +2 <;> nextstate(main 1 -e:1) v:{ 3 <0> pushmark s 4 <#> gv[*a] s 5 <1> rv2av[t2] lK/1 @@ -248,7 +248,7 @@ checkOptree ( name => 'cmdline invoke -exec works', 7 <@> leave[1 ref] vKP/REFC EOT_EOT # 1 <0> enter -# 2 <;> nextstate(main 1 -e:1) v +# 2 <;> nextstate(main 1 -e:1) v:{ # 3 <0> pushmark s # 4 <$> gv(*a) s # 5 <1> rv2av[t1] lK/1 @@ -286,10 +286,10 @@ checkOptree errs => ['Useless use of sort in void context at -e line 1.'], expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 1 <0> enter -# 2 <;> nextstate(main 1 -e:1) v +# 2 <;> nextstate(main 1 -e:1) v:{ # 3 <#> gv[*a] s # 4 <1> rv2av[t3] vK/OURINTR,1 -# 5 <;> nextstate(main 2 -e:1) v +# 5 <;> nextstate(main 2 -e:1) v:{ # 6 <0> pushmark s # 7 <#> gv[*a] s # 8 <1> rv2av[t5] lK/1 @@ -297,10 +297,10 @@ checkOptree # a <@> leave[1 ref] vKP/REFC EOT_EOT # 1 <0> enter -# 2 <;> nextstate(main 1 -e:1) v +# 2 <;> nextstate(main 1 -e:1) v:{ # 3 <$> gv(*a) s # 4 <1> rv2av[t2] vK/OURINTR,1 -# 5 <;> nextstate(main 2 -e:1) v +# 5 <;> nextstate(main 2 -e:1) v:{ # 6 <0> pushmark s # 7 <$> gv(*a) s # 8 <1> rv2av[t3] lK/1 @@ -364,7 +364,7 @@ checkOptree ( name => 'callback used, independent of style', bcopts => [qw/ -concise -exec /], code => sub{$a=$b+42}, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <;> nextstate(main 76 optree_concise.t:337) v +1 <;> nextstate(main 76 optree_concise.t:337) v:{ 2 <#> gvsv[*b] s 3 <$> const[IV 42] CALLBACK s 4 <2> add[t3] sK/2 @@ -372,7 +372,7 @@ checkOptree ( name => 'callback used, independent of style', 6 <2> sassign sKS/2 7 <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 455 optree_concise.t:328) v +# 1 <;> nextstate(main 455 optree_concise.t:328) v:{ # 2 <$> gvsv(*b) s # 3 <$> const(IV 42) CALLBACK s # 4 <2> add[t1] sK/2 diff --git a/ext/B/t/optree_constants.t b/ext/B/t/optree_constants.t index 453eed0..7598c24 100644 --- a/ext/B/t/optree_constants.t +++ b/ext/B/t/optree_constants.t @@ -173,12 +173,12 @@ checkOptree ( name => 'constant sub returning list', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 3 <1> leavesub[2 refs] K/REFC,1 ->(end) # - <@> lineseq K ->3 -# 1 <;> nextstate(constant 685 constant.pm:121) v ->2 +# 1 <;> nextstate(constant 685 constant.pm:121) v:*,& ->2 # 2 <0> padav[@list:FAKE:m:102] ->3 EOT_EOT # 3 <1> leavesub[2 refs] K/REFC,1 ->(end) # - <@> lineseq K ->3 -# 1 <;> nextstate(constant 685 constant.pm:121) v ->2 +# 1 <;> nextstate(constant 685 constant.pm:121) v:*,& ->2 # 2 <0> padav[@list:FAKE:m:76] ->3 EONT_EONT diff --git a/ext/B/t/optree_misc.t b/ext/B/t/optree_misc.t index 96a232c..47355cd 100644 --- a/ext/B/t/optree_misc.t +++ b/ext/B/t/optree_misc.t @@ -37,7 +37,7 @@ checkOptree ( name => 'OP_AELEMFAST opclass', # 3 <;> nextstate(main 635 optree_misc.t:25) v ->4 # 5 <1> rv2av[t4] vK/OURINTR,1 ->6 # 4 <#> gv[*y] s ->5 -# 6 <;> nextstate(main 636 optree_misc.t:25) v ->7 +# 6 <;> nextstate(main 636 optree_misc.t:25) v:{ ->7 # 9 <2> add[t6] sK/2 ->a # - <1> ex-aelem sK/2 ->8 # 7 <0> aelemfast[@x:634,636] sR* ->8 @@ -54,7 +54,7 @@ EOT_EOT # 3 <;> nextstate(main 635 optree_misc.t:27) v ->4 # 5 <1> rv2av[t3] vK/OURINTR,1 ->6 # 4 <$> gv(*y) s ->5 -# 6 <;> nextstate(main 636 optree_misc.t:27) v ->7 +# 6 <;> nextstate(main 636 optree_misc.t:27) v:{ ->7 # 9 <2> add[t4] sK/2 ->a # - <1> ex-aelem sK/2 ->8 # 7 <0> aelemfast[@x:634,636] sR* ->8 diff --git a/ext/B/t/optree_samples.t b/ext/B/t/optree_samples.t index c7a8152..576ff09 100644 --- a/ext/B/t/optree_samples.t +++ b/ext/B/t/optree_samples.t @@ -444,7 +444,7 @@ checkOptree ( name => '@foo = grep(!/^\#/, @bar)', code => '@foo = grep(!/^\#/, @bar)', bcopts => '-exec', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <;> nextstate(main 496 (eval 20):1) v +# 1 <;> nextstate(main 496 (eval 20):1) v:{ # 2 <0> pushmark s # 3 <0> pushmark s # 4 <#> gv[*bar] s @@ -460,7 +460,7 @@ checkOptree ( name => '@foo = grep(!/^\#/, @bar)', # d <2> aassign[t6] KS/COMMON # e <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 496 (eval 20):1) v +# 1 <;> nextstate(main 496 (eval 20):1) v:{ # 2 <0> pushmark s # 3 <0> pushmark s # 4 <$> gv(*bar) s @@ -484,7 +484,7 @@ checkOptree ( name => '%h = map { getkey($_) => $_ } @a', code => '%h = map { getkey($_) => $_ } @a', bcopts => '-exec', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -# 1 <;> nextstate(main 501 (eval 22):1) v +# 1 <;> nextstate(main 501 (eval 22):1) v:{ # 2 <0> pushmark s # 3 <0> pushmark s # 4 <#> gv[*a] s @@ -492,7 +492,7 @@ checkOptree ( name => '%h = map { getkey($_) => $_ } @a', # 6 <@> mapstart lK* # 7 <|> mapwhile(other->8)[t9] lK # 8 <0> enter l -# 9 <;> nextstate(main 500 (eval 22):1) v +# 9 <;> nextstate(main 500 (eval 22):1) v:{ # a <0> pushmark s # b <0> pushmark s # c <#> gvsv[*_] s @@ -508,7 +508,7 @@ checkOptree ( name => '%h = map { getkey($_) => $_ } @a', # l <2> aassign[t10] KS/COMMON # m <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 501 (eval 22):1) v +# 1 <;> nextstate(main 501 (eval 22):1) v:{ # 2 <0> pushmark s # 3 <0> pushmark s # 4 <$> gv(*a) s @@ -516,7 +516,7 @@ EOT_EOT # 6 <@> mapstart lK* # 7 <|> mapwhile(other->8)[t4] lK # 8 <0> enter l -# 9 <;> nextstate(main 500 (eval 22):1) v +# 9 <;> nextstate(main 500 (eval 22):1) v:{ # a <0> pushmark s # b <0> pushmark s # c <$> gvsv(*_) s @@ -543,7 +543,7 @@ checkOptree ( name => '%h=(); for $_(@a){$h{getkey($_)} = $_}', # 4 <#> gv[*h] s # 5 <1> rv2hv[t2] lKRM*/1 # 6 <2> aassign[t3] vKS -# 7 <;> nextstate(main 506 (eval 24):1) v +# 7 <;> nextstate(main 506 (eval 24):1) v:{ # 8 <0> pushmark sM # 9 <#> gv[*a] s # a <1> rv2av[t6] sKRM/1 @@ -552,7 +552,7 @@ checkOptree ( name => '%h=(); for $_(@a){$h{getkey($_)} = $_}', # d <{> enteriter(next->o last->r redo->e) lKS/8 # p <0> iter s # q <|> and(other->e) K/1 -# e <;> nextstate(main 505 (eval 24):1) v +# e <;> nextstate(main 505 (eval 24):1) v:{ # f <#> gvsv[*_] s # g <#> gv[*h] s # h <1> rv2hv sKR/1 @@ -573,7 +573,7 @@ EOT_EOT # 4 <$> gv(*h) s # 5 <1> rv2hv[t1] lKRM*/1 # 6 <2> aassign[t2] vKS -# 7 <;> nextstate(main 506 (eval 24):1) v +# 7 <;> nextstate(main 506 (eval 24):1) v:{ # 8 <0> pushmark sM # 9 <$> gv(*a) s # a <1> rv2av[t3] sKRM/1 @@ -582,7 +582,7 @@ EOT_EOT # d <{> enteriter(next->o last->r redo->e) lKS/8 # p <0> iter s # q <|> and(other->e) K/1 -# e <;> nextstate(main 505 (eval 24):1) v +# e <;> nextstate(main 505 (eval 24):1) v:{ # f <$> gvsv(*_) s # g <$> gv(*h) s # h <1> rv2hv sKR/1 @@ -634,14 +634,14 @@ checkOptree ( name => '-e use constant j => qq{junk}; print j', bcopts => '-exec', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 1 <0> enter -# 2 <;> nextstate(main 71 -e:1) v +# 2 <;> nextstate(main 71 -e:1) v:{ # 3 <0> pushmark s # 4 <$> const[PV "junk"] s # 5 <@> print vK # 6 <@> leave[1 ref] vKP/REFC EOT_EOT # 1 <0> enter -# 2 <;> nextstate(main 71 -e:1) v +# 2 <;> nextstate(main 71 -e:1) v:{ # 3 <0> pushmark s # 4 <$> const(PV "junk") s # 5 <@> print vK diff --git a/ext/B/t/optree_sort.t b/ext/B/t/optree_sort.t index 278ebd7..4cdea3b 100644 --- a/ext/B/t/optree_sort.t +++ b/ext/B/t/optree_sort.t @@ -51,7 +51,7 @@ checkOptree ( name => 'sort @a', bcopts => '-exec', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <0> enter -2 <;> nextstate(main 1 -e:1) v +2 <;> nextstate(main 1 -e:1) v:{ 3 <0> pushmark s 4 <#> gv[*a] s 5 <1> rv2av[t2] lK/1 @@ -59,7 +59,7 @@ checkOptree ( name => 'sort @a', 7 <@> leave[1 ref] vKP/REFC EOT_EOT # 1 <0> enter -# 2 <;> nextstate(main 1 -e:1) v +# 2 <;> nextstate(main 1 -e:1) v:{ # 3 <0> pushmark s # 4 <$> gv(*a) s # 5 <1> rv2av[t1] lK/1 @@ -101,7 +101,7 @@ checkOptree ( name => '@a = sort @a', bcopts => '-exec', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <0> enter -2 <;> nextstate(main 1 -e:1) v +2 <;> nextstate(main 1 -e:1) v:{ 3 <0> pushmark s 4 <0> pushmark s 5 <#> gv[*a] s @@ -110,7 +110,7 @@ checkOptree ( name => '@a = sort @a', 8 <@> leave[1 ref] vKP/REFC EOT_EOT # 1 <0> enter -# 2 <;> nextstate(main 1 -e:1) v +# 2 <;> nextstate(main 1 -e:1) v:{ # 3 <0> pushmark s # 4 <0> pushmark s # 5 <$> gv(*a) s @@ -156,13 +156,13 @@ checkOptree ( name => '@a = sort @a; reverse @a', bcopts => '-exec', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <0> enter -2 <;> nextstate(main 1 -e:1) v +2 <;> nextstate(main 1 -e:1) v:{ 3 <0> pushmark s 4 <0> pushmark s 5 <#> gv[*a] s 6 <1> rv2av[t4] lKRM*/1 7 <@> sort lK/INPLACE -8 <;> nextstate(main 1 -e:1) v +8 <;> nextstate(main 1 -e:1) v:{ 9 <0> pushmark s a <#> gv[*a] s b <1> rv2av[t7] lK/1 @@ -170,13 +170,13 @@ c <@> reverse[t8] vK/1 d <@> leave[1 ref] vKP/REFC EOT_EOT # 1 <0> enter -# 2 <;> nextstate(main 1 -e:1) v +# 2 <;> nextstate(main 1 -e:1) v:{ # 3 <0> pushmark s # 4 <0> pushmark s # 5 <$> gv(*a) s # 6 <1> rv2av[t2] lKRM*/1 # 7 <@> sort lK/INPLACE -# 8 <;> nextstate(main 1 -e:1) v +# 8 <;> nextstate(main 1 -e:1) v:{ # 9 <0> pushmark s # a <$> gv(*a) s # b <1> rv2av[t4] lK/1 @@ -218,9 +218,9 @@ checkOptree ( name => 'my @a; @a = sort @a', bcopts => '-exec', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <0> enter -2 <;> nextstate(main 1 -e:1) v +2 <;> nextstate(main 1 -e:1) v:{ 3 <0> padav[@a:1,2] vM/LVINTRO -4 <;> nextstate(main 2 -e:1) v +4 <;> nextstate(main 2 -e:1) v:{ 5 <0> pushmark s 6 <0> pushmark s 7 <0> padav[@a:1,2] lRM* @@ -228,9 +228,9 @@ checkOptree ( name => 'my @a; @a = sort @a', 9 <@> leave[1 ref] vKP/REFC EOT_EOT # 1 <0> enter -# 2 <;> nextstate(main 1 -e:1) v +# 2 <;> nextstate(main 1 -e:1) v:{ # 3 <0> padav[@a:1,2] vM/LVINTRO -# 4 <;> nextstate(main 2 -e:1) v +# 4 <;> nextstate(main 2 -e:1) v:{ # 5 <0> pushmark s # 6 <0> pushmark s # 7 <0> padav[@a:1,2] lRM* @@ -250,7 +250,7 @@ checkOptree ( name => 'sub {my @a; @a = sort @a; push @a, 1}', 5 <0> pushmark s 6 <0> padav[@a:-437,-436] lRM* 7 <@> sort lK/INPLACE -8 <;> nextstate(main -436 optree.t:325) v +8 <;> nextstate(main -436 optree.t:325) v:{ 9 <0> pushmark s a <0> padav[@a:-437,-436] lRM b <$> const[IV 1] s @@ -264,7 +264,7 @@ EOT_EOT # 5 <0> pushmark s # 6 <0> padav[@a:429,430] lRM* # 7 <@> sort lK/INPLACE -# 8 <;> nextstate(main 430 optree_sort.t:220) v +# 8 <;> nextstate(main 430 optree_sort.t:220) v:{ # 9 <0> pushmark s # a <0> padav[@a:429,430] lRM # b <$> const(IV 1) s @@ -284,7 +284,7 @@ checkOptree ( name => 'sub {my @a; @a = sort @a; 1}', 5 <0> pushmark s 6 <0> padav[@a:-437,-436] lRM* 7 <@> sort lK/INPLACE -8 <;> nextstate(main -436 optree.t:346) v +8 <;> nextstate(main -436 optree.t:346) v:{ 9 <$> const[IV 1] s a <1> leavesub[1 ref] K/REFC,1 EOT_EOT @@ -295,7 +295,7 @@ EOT_EOT # 5 <0> pushmark s # 6 <0> padav[@a:431,432] lRM* # 7 <@> sort lK/INPLACE -# 8 <;> nextstate(main 432 optree_sort.t:251) v +# 8 <;> nextstate(main 432 optree_sort.t:251) v:{ # 9 <$> const(IV 1) s # a <1> leavesub[1 ref] K/REFC,1 EONT_EONT diff --git a/ext/B/t/optree_specials.t b/ext/B/t/optree_specials.t index 963ec88..3587133 100644 --- a/ext/B/t/optree_specials.t +++ b/ext/B/t/optree_specials.t @@ -56,12 +56,12 @@ checkOptree ( name => 'BEGIN', # BEGIN 1: # b <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->b -# 1 <;> nextstate(B::Concise -234 Concise.pm:328) v/2 ->2 +# 1 <;> nextstate(B::Concise -234 Concise.pm:328) v:*,&,{,$ ->2 # 3 <1> require sK/1 ->4 # 2 <$> const[PV "warnings.pm"] s/BARE ->3 -# 4 <;> nextstate(B::Concise -234 Concise.pm:328) v/2 ->5 +# 4 <;> nextstate(B::Concise -234 Concise.pm:328) v:*,&,{,$ ->5 # - <@> lineseq K ->- -# 5 <;> nextstate(B::Concise -234 Concise.pm:328) /2 ->6 +# 5 <;> nextstate(B::Concise -234 Concise.pm:328) :*,&,{,$ ->6 # a <1> entersub[t1] KS*/TARG,2 ->b # 6 <0> pushmark s ->7 # 7 <$> const[PV "warnings"] sM ->8 @@ -70,7 +70,7 @@ checkOptree ( name => 'BEGIN', # BEGIN 2: # f <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->f -# c <;> nextstate(main 2 -e:1) v ->d +# c <;> nextstate(main 2 -e:1) v:{ ->d # e <1> postinc[t3] sK/1 ->f # - <1> ex-rv2sv sKRM/1 ->e # d <#> gvsv[*beg] s ->e @@ -78,12 +78,12 @@ EOT_EOT # BEGIN 1: # b <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->b -# 1 <;> nextstate(B::Concise -234 Concise.pm:328) v/2 ->2 +# 1 <;> nextstate(B::Concise -234 Concise.pm:328) v:*,&,{,$ ->2 # 3 <1> require sK/1 ->4 # 2 <$> const(PV "warnings.pm") s/BARE ->3 -# 4 <;> nextstate(B::Concise -234 Concise.pm:328) v/2 ->5 +# 4 <;> nextstate(B::Concise -234 Concise.pm:328) v:*,&,{,$ ->5 # - <@> lineseq K ->- -# 5 <;> nextstate(B::Concise -234 Concise.pm:328) /2 ->6 +# 5 <;> nextstate(B::Concise -234 Concise.pm:328) :*,&,{,$ ->6 # a <1> entersub[t1] KS*/TARG,2 ->b # 6 <0> pushmark s ->7 # 7 <$> const(PV "warnings") sM ->8 @@ -92,7 +92,7 @@ EOT_EOT # BEGIN 2: # f <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->f -# c <;> nextstate(main 2 -e:1) v ->d +# c <;> nextstate(main 2 -e:1) v:{ ->d # e <1> postinc[t2] sK/1 ->f # - <1> ex-rv2sv sKRM/1 ->e # d <$> gvsv(*beg) s ->e @@ -106,7 +106,7 @@ checkOptree ( name => 'END', # END 1: # 4 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->4 -# 1 <;> nextstate(main 5 -e:6) v ->2 +# 1 <;> nextstate(main 5 -e:6) v:{ ->2 # 3 <1> postinc[t3] sK/1 ->4 # - <1> ex-rv2sv sKRM/1 ->3 # 2 <#> gvsv[*end] s ->3 @@ -114,7 +114,7 @@ EOT_EOT # END 1: # 4 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->4 -# 1 <;> nextstate(main 5 -e:6) v ->2 +# 1 <;> nextstate(main 5 -e:6) v:{ ->2 # 3 <1> postinc[t2] sK/1 ->4 # - <1> ex-rv2sv sKRM/1 ->3 # 2 <$> gvsv(*end) s ->3 @@ -128,7 +128,7 @@ checkOptree ( name => 'CHECK', # CHECK 1: # 4 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->4 -# 1 <;> nextstate(main 3 -e:4) v ->2 +# 1 <;> nextstate(main 3 -e:4) v:{ ->2 # 3 <1> postinc[t3] sK/1 ->4 # - <1> ex-rv2sv sKRM/1 ->3 # 2 <#> gvsv[*chk] s ->3 @@ -136,7 +136,7 @@ EOT_EOT # CHECK 1: # 4 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->4 -# 1 <;> nextstate(main 3 -e:4) v ->2 +# 1 <;> nextstate(main 3 -e:4) v:{ ->2 # 3 <1> postinc[t2] sK/1 ->4 # - <1> ex-rv2sv sKRM/1 ->3 # 2 <$> gvsv(*chk) s ->3 @@ -151,7 +151,7 @@ checkOptree ( name => 'INIT', # INIT 1: # 4 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->4 -# 1 <;> nextstate(main 4 -e:5) v ->2 +# 1 <;> nextstate(main 4 -e:5) v:{ ->2 # 3 <1> postinc[t3] sK/1 ->4 # - <1> ex-rv2sv sKRM/1 ->3 # 2 <#> gvsv[*init] s ->3 @@ -159,7 +159,7 @@ EOT_EOT # INIT 1: # 4 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->4 -# 1 <;> nextstate(main 4 -e:5) v ->2 +# 1 <;> nextstate(main 4 -e:5) v:{ ->2 # 3 <1> postinc[t2] sK/1 ->4 # - <1> ex-rv2sv sKRM/1 ->3 # 2 <$> gvsv(*init) s ->3 @@ -172,11 +172,11 @@ checkOptree ( name => 'all of BEGIN END INIT CHECK -exec', @warnings_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # BEGIN 1: -# 1 <;> nextstate(B::Concise -234 Concise.pm:328) v/2 +# 1 <;> nextstate(B::Concise -234 Concise.pm:328) v:*,&,{,$ # 2 <$> const[PV "warnings.pm"] s/BARE # 3 <1> require sK/1 -# 4 <;> nextstate(B::Concise -234 Concise.pm:328) v/2 -# 5 <;> nextstate(B::Concise -234 Concise.pm:328) /2 +# 4 <;> nextstate(B::Concise -234 Concise.pm:328) v:*,&,{,$ +# 5 <;> nextstate(B::Concise -234 Concise.pm:328) :*,&,{,$ # 6 <0> pushmark s # 7 <$> const[PV "warnings"] sM # 8 <$> const[PV "qw"] sM @@ -184,32 +184,32 @@ checkOptree ( name => 'all of BEGIN END INIT CHECK -exec', # a <1> entersub[t1] KS*/TARG,2 # b <1> leavesub[1 ref] K/REFC,1 # BEGIN 2: -# c <;> nextstate(main 2 -e:1) v +# c <;> nextstate(main 2 -e:1) v:{ # d <#> gvsv[*beg] s # e <1> postinc[t3] sK/1 # f <1> leavesub[1 ref] K/REFC,1 # END 1: -# g <;> nextstate(main 5 -e:1) v +# g <;> nextstate(main 5 -e:1) v:{ # h <#> gvsv[*end] s # i <1> postinc[t3] sK/1 # j <1> leavesub[1 ref] K/REFC,1 # INIT 1: -# k <;> nextstate(main 4 -e:1) v +# k <;> nextstate(main 4 -e:1) v:{ # l <#> gvsv[*init] s # m <1> postinc[t3] sK/1 # n <1> leavesub[1 ref] K/REFC,1 # CHECK 1: -# o <;> nextstate(main 3 -e:1) v +# o <;> nextstate(main 3 -e:1) v:{ # p <#> gvsv[*chk] s # q <1> postinc[t3] sK/1 # r <1> leavesub[1 ref] K/REFC,1 EOT_EOT # BEGIN 1: -# 1 <;> nextstate(B::Concise -234 Concise.pm:328) v/2 +# 1 <;> nextstate(B::Concise -234 Concise.pm:328) v:*,&,{,$ # 2 <$> const(PV "warnings.pm") s/BARE # 3 <1> require sK/1 -# 4 <;> nextstate(B::Concise -234 Concise.pm:328) v/2 -# 5 <;> nextstate(B::Concise -234 Concise.pm:328) /2 +# 4 <;> nextstate(B::Concise -234 Concise.pm:328) v:*,&,{,$ +# 5 <;> nextstate(B::Concise -234 Concise.pm:328) :*,&,{,$ # 6 <0> pushmark s # 7 <$> const(PV "warnings") sM # 8 <$> const(PV "qw") sM @@ -217,22 +217,22 @@ EOT_EOT # a <1> entersub[t1] KS*/TARG,2 # b <1> leavesub[1 ref] K/REFC,1 # BEGIN 2: -# c <;> nextstate(main 2 -e:1) v +# c <;> nextstate(main 2 -e:1) v:{ # d <$> gvsv(*beg) s # e <1> postinc[t2] sK/1 # f <1> leavesub[1 ref] K/REFC,1 # END 1: -# g <;> nextstate(main 5 -e:1) v +# g <;> nextstate(main 5 -e:1) v:{ # h <$> gvsv(*end) s # i <1> postinc[t2] sK/1 # j <1> leavesub[1 ref] K/REFC,1 # INIT 1: -# k <;> nextstate(main 4 -e:1) v +# k <;> nextstate(main 4 -e:1) v:{ # l <$> gvsv(*init) s # m <1> postinc[t2] sK/1 # n <1> leavesub[1 ref] K/REFC,1 # CHECK 1: -# o <;> nextstate(main 3 -e:1) v +# o <;> nextstate(main 3 -e:1) v:{ # p <$> gvsv(*chk) s # q <1> postinc[t2] sK/1 # r <1> leavesub[1 ref] K/REFC,1 @@ -249,11 +249,11 @@ checkOptree ( name => 'regression test for patch 25352', @warnings_todo, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # BEGIN 1: -# 1 <;> nextstate(B::Concise -234 Concise.pm:359) v/2 +# 1 <;> nextstate(B::Concise -234 Concise.pm:359) v:*,&,{,$ # 2 <$> const[PV "warnings.pm"] s/BARE # 3 <1> require sK/1 -# 4 <;> nextstate(B::Concise -234 Concise.pm:359) v/2 -# 5 <;> nextstate(B::Concise -234 Concise.pm:359) /2 +# 4 <;> nextstate(B::Concise -234 Concise.pm:359) v:*,&,{,$ +# 5 <;> nextstate(B::Concise -234 Concise.pm:359) :*,&,{,$ # 6 <0> pushmark s # 7 <$> const[PV "warnings"] sM # 8 <$> const[PV "qw"] sM @@ -262,11 +262,11 @@ checkOptree ( name => 'regression test for patch 25352', # b <1> leavesub[1 ref] K/REFC,1 EOT_EOT # BEGIN 1: -# 1 <;> nextstate(B::Concise -234 Concise.pm:359) v/2 +# 1 <;> nextstate(B::Concise -234 Concise.pm:359) v:*,&,{,$ # 2 <$> const(PV "warnings.pm") s/BARE # 3 <1> require sK/1 -# 4 <;> nextstate(B::Concise -234 Concise.pm:359) v/2 -# 5 <;> nextstate(B::Concise -234 Concise.pm:359) /2 +# 4 <;> nextstate(B::Concise -234 Concise.pm:359) v:*,&,{,$ +# 5 <;> nextstate(B::Concise -234 Concise.pm:359) :*,&,{,$ # 6 <0> pushmark s # 7 <$> const(PV "warnings") sM # 8 <$> const(PV "qw") sM diff --git a/ext/B/t/optree_varinit.t b/ext/B/t/optree_varinit.t index 844b6df..04c2b80 100644 --- a/ext/B/t/optree_varinit.t +++ b/ext/B/t/optree_varinit.t @@ -66,11 +66,11 @@ checkOptree ( name => 'sub {local $a}', bcopts => '-exec', code => sub {local $a}, expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <;> nextstate(main 23 optree.t:57) v +1 <;> nextstate(main 23 optree.t:57) v:{ 2 <#> gvsv[*a] s/LVINTRO 3 <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 53 optree.t:67) v +# 1 <;> nextstate(main 53 optree.t:67) v:{ # 2 <$> gvsv(*a) s/LVINTRO # 3 <1> leavesub[1 ref] K/REFC,1 EONT_EONT @@ -81,12 +81,12 @@ checkOptree ( name => 'my $a', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 4 <@> leave[1 ref] vKP/REFC ->(end) # 1 <0> enter ->2 -# 2 <;> nextstate(main 1 -e:1) v ->3 +# 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 ->2 -# 2 <;> nextstate(main 1 -e:1) v ->3 +# 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', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 4 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 -2 <;> nextstate(main 1 -e:1) v ->3 +2 <;> nextstate(main 1 -e:1) v:{ ->3 - <1> ex-rv2sv vK/17 ->4 3 <#> gvsv[*a] s/OURINTR ->4 EOT_EOT # 4 <@> leave[1 ref] vKP/REFC ->(end) # 1 <0> enter ->2 -# 2 <;> nextstate(main 1 -e:1) v ->3 +# 2 <;> nextstate(main 1 -e:1) v:{ ->3 # - <1> ex-rv2sv vK/17 ->4 # 3 <$> gvsv(*a) s/OURINTR ->4 EONT_EONT @@ -114,13 +114,13 @@ checkOptree ( name => 'local $a', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 4 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 -2 <;> nextstate(main 1 -e:1) v ->3 +2 <;> nextstate(main 1 -e:1) v:{ ->3 - <1> ex-rv2sv vKM/129 ->4 3 <#> gvsv[*a] s/LVINTRO ->4 EOT_EOT # 4 <@> leave[1 ref] vKP/REFC ->(end) # 1 <0> enter ->2 -# 2 <;> nextstate(main 1 -e:1) v ->3 +# 2 <;> nextstate(main 1 -e:1) v:{ ->3 # - <1> ex-rv2sv vKM/129 ->4 # 3 <$> gvsv(*a) s/LVINTRO ->4 EONT_EONT @@ -153,7 +153,7 @@ checkOptree ( name => 'sub {our $a=undef}', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 5 <1> leavesub[1 ref] K/REFC,1 ->(end) - <@> lineseq KP ->5 -1 <;> nextstate(main 26 optree.t:109) v ->2 +1 <;> nextstate(main 26 optree.t:109) v:{ ->2 4 <2> sassign sKS/2 ->5 2 <0> undef s ->3 - <1> ex-rv2sv sKRM*/17 ->4 @@ -161,7 +161,7 @@ checkOptree ( name => 'sub {our $a=undef}', EOT_EOT # 5 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->5 -# 1 <;> nextstate(main 446 optree_varinit.t:137) v ->2 +# 1 <;> nextstate(main 446 optree_varinit.t:137) v:{ ->2 # 4 <2> sassign sKS/2 ->5 # 2 <0> undef s ->3 # - <1> ex-rv2sv sKRM*/17 ->4 @@ -175,7 +175,7 @@ checkOptree ( name => 'sub {local $a=undef}', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 5 <1> leavesub[1 ref] K/REFC,1 ->(end) - <@> lineseq KP ->5 -1 <;> nextstate(main 28 optree.t:122) v ->2 +1 <;> nextstate(main 28 optree.t:122) v:{ ->2 4 <2> sassign sKS/2 ->5 2 <0> undef s ->3 - <1> ex-rv2sv sKRM*/129 ->4 @@ -183,7 +183,7 @@ checkOptree ( name => 'sub {local $a=undef}', EOT_EOT # 5 <1> leavesub[1 ref] K/REFC,1 ->(end) # - <@> lineseq KP ->5 -# 1 <;> nextstate(main 58 optree.t:141) v ->2 +# 1 <;> nextstate(main 58 optree.t:141) v:{ ->2 # 4 <2> sassign sKS/2 ->5 # 2 <0> undef s ->3 # - <1> ex-rv2sv sKRM*/129 ->4 @@ -196,14 +196,14 @@ checkOptree ( name => 'my $a=undef', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 6 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 -2 <;> nextstate(main 1 -e:1) v ->3 +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 ->2 -# 2 <;> nextstate(main 1 -e:1) v ->3 +# 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 @@ -216,7 +216,7 @@ checkOptree ( name => 'our $a=undef', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 6 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 -2 <;> nextstate(main 1 -e:1) v ->3 +2 <;> nextstate(main 1 -e:1) v:{ ->3 5 <2> sassign vKS/2 ->6 3 <0> undef s ->4 - <1> ex-rv2sv sKRM*/17 ->5 @@ -224,7 +224,7 @@ checkOptree ( name => 'our $a=undef', EOT_EOT # 6 <@> leave[1 ref] vKP/REFC ->(end) # 1 <0> enter ->2 -# 2 <;> nextstate(main 1 -e:1) v ->3 +# 2 <;> nextstate(main 1 -e:1) v:{ ->3 # 5 <2> sassign vKS/2 ->6 # 3 <0> undef s ->4 # - <1> ex-rv2sv sKRM*/17 ->5 @@ -239,7 +239,7 @@ checkOptree ( name => 'local $a=undef', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 6 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 -2 <;> nextstate(main 1 -e:1) v ->3 +2 <;> nextstate(main 1 -e:1) v:{ ->3 5 <2> sassign vKS/2 ->6 3 <0> undef s ->4 - <1> ex-rv2sv sKRM*/129 ->5 @@ -247,7 +247,7 @@ checkOptree ( name => 'local $a=undef', EOT_EOT # 6 <@> leave[1 ref] vKP/REFC ->(end) # 1 <0> enter ->2 -# 2 <;> nextstate(main 1 -e:1) v ->3 +# 2 <;> nextstate(main 1 -e:1) v:{ ->3 # 5 <2> sassign vKS/2 ->6 # 3 <0> undef s ->4 # - <1> ex-rv2sv sKRM*/129 ->5 @@ -276,13 +276,13 @@ checkOptree ( name => 'sub {our $a=()}', #todo => 'probly not worth doing', bcopts => '-exec', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <;> nextstate(main 31 optree.t:177) v +1 <;> nextstate(main 31 optree.t:177) v:{ 2 <0> stub sP 3 <#> gvsv[*a] s/OURINTR 4 <2> sassign sKS/2 5 <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 440 optree_varinit.t:262) v +# 1 <;> nextstate(main 440 optree_varinit.t:262) v:{ # 2 <0> stub sP # 3 <$> gvsv(*a) s/OURINTR # 4 <2> sassign sKS/2 @@ -294,13 +294,13 @@ checkOptree ( name => 'sub {local $a=()}', #todo => 'probly not worth doing', bcopts => '-exec', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); -1 <;> nextstate(main 33 optree.t:190) v +1 <;> nextstate(main 33 optree.t:190) v:{ 2 <0> stub sP 3 <#> gvsv[*a] s/LVINTRO 4 <2> sassign sKS/2 5 <1> leavesub[1 ref] K/REFC,1 EOT_EOT -# 1 <;> nextstate(main 63 optree.t:225) v +# 1 <;> nextstate(main 63 optree.t:225) v:{ # 2 <0> stub sP # 3 <$> gvsv(*a) s/LVINTRO # 4 <2> sassign sKS/2 @@ -312,14 +312,14 @@ checkOptree ( name => 'my $a=()', bcopts => '-exec', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <0> enter -2 <;> nextstate(main 1 -e:1) v +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 -# 2 <;> nextstate(main 1 -e:1) v +# 2 <;> nextstate(main 1 -e:1) v:{ # 3 <0> stub sP # 4 <0> padsv[$a:1,2] sRM*/LVINTRO # 5 <2> sassign vKS/2 @@ -332,14 +332,14 @@ checkOptree ( name => 'our $a=()', bcopts => '-exec', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <0> enter -2 <;> nextstate(main 1 -e:1) v +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 -# 2 <;> nextstate(main 1 -e:1) v +# 2 <;> nextstate(main 1 -e:1) v:{ # 3 <0> stub sP # 4 <$> gvsv(*a) s/OURINTR # 5 <2> sassign vKS/2 @@ -353,14 +353,14 @@ checkOptree ( name => 'local $a=()', bcopts => '-exec', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); 1 <0> enter -2 <;> nextstate(main 1 -e:1) v +2 <;> nextstate(main 1 -e:1) v:{ 3 <0> stub sP 4 <#> gvsv[*a] s/LVINTRO 5 <2> sassign vKS/2 6 <@> leave[1 ref] vKP/REFC EOT_EOT # 1 <0> enter -# 2 <;> nextstate(main 1 -e:1) v +# 2 <;> nextstate(main 1 -e:1) v:{ # 3 <0> stub sP # 4 <$> gvsv(*a) s/LVINTRO # 5 <2> sassign vKS/2 @@ -373,7 +373,7 @@ checkOptree ( name => 'my ($a,$b)=()', bcopts => '-exec', expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT'); # 1 <0> enter -# 2 <;> nextstate(main 1 -e:1) v +# 2 <;> nextstate(main 1 -e:1) v:{ # 3 <0> pushmark s # 4 <0> pushmark sRM*/128 # 5 <0> padsv[$a:1,2] lRM*/LVINTRO @@ -382,7 +382,7 @@ checkOptree ( name => 'my ($a,$b)=()', # 8 <@> leave[1 ref] vKP/REFC EOT_EOT # 1 <0> enter -# 2 <;> nextstate(main 1 -e:1) v +# 2 <;> nextstate(main 1 -e:1) v:{ # 3 <0> pushmark s # 4 <0> pushmark sRM*/128 # 5 <0> padsv[$a:1,2] lRM*/LVINTRO diff --git a/ext/ByteLoader/bytecode.h b/ext/ByteLoader/bytecode.h index 9df93ff..addae62 100644 --- a/ext/ByteLoader/bytecode.h +++ b/ext/ByteLoader/bytecode.h @@ -332,7 +332,7 @@ typedef char *pvindex; GvCV(CvGV(cv)) = 0; /* cv has been hijacked */\ call_list(oldscope, PL_beginav); \ PL_curcop = &PL_compiling; \ - PL_compiling.op_private = (U8)(PL_hints & HINT_PRIVATE_MASK);\ + CopHINTS_set(&PL_compiling, PL_hints); \ LEAVE; \ } STMT_END #define BSET_push_init(ary,cv) \ diff --git a/op.c b/op.c index 5afda98..bf942e1 100644 --- a/op.c +++ b/op.c @@ -5832,7 +5832,7 @@ Perl_ck_bitop(pTHX_ OP *o) (op) == OP_EQ || (op) == OP_I_EQ || \ (op) == OP_NE || (op) == OP_I_NE || \ (op) == OP_NCMP || (op) == OP_I_NCMP) - o->op_private = (U8)(PL_hints & HINT_PRIVATE_MASK); + o->op_private = (U8)(PL_hints & HINT_INTEGER); if (!(o->op_flags & OPf_STACKED) /* Not an assignment */ && (o->op_type == OP_BIT_OR || o->op_type == OP_BIT_AND diff --git a/perl.h b/perl.h index f438ca0..364c409 100644 --- a/perl.h +++ b/perl.h @@ -4208,9 +4208,10 @@ enum { /* pass one of these to get_vtbl */ want_vtbl_hintselem }; - /* Note: the lowest 8 bits are reserved for - stuffing into op->op_private */ -#define HINT_PRIVATE_MASK 0x000000ff + +/* Hints are now stored in a dedicated U32, so the bottom 8 bits are no longer + special and there is no need for HINT_PRIVATE_MASK for COPs + However, bitops store HINT_INTEGER in their op_private. */ #define HINT_INTEGER 0x00000001 /* integer pragma */ #define HINT_STRICT_REFS 0x00000002 /* strict pragma */ #define HINT_LOCALE 0x00000004 /* locale pragma */