Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bleadperl v5.21.6-336-gfedf30e breaks TOKUHIROM/B-Tap-0.14.tar.gz #14316

Closed
p5pRT opened this issue Dec 8, 2014 · 17 comments
Closed

Bleadperl v5.21.6-336-gfedf30e breaks TOKUHIROM/B-Tap-0.14.tar.gz #14316

p5pRT opened this issue Dec 8, 2014 · 17 comments

Comments

@p5pRT
Copy link

p5pRT commented Dec 8, 2014

Migrated from rt.perl.org#123390 (status was 'resolved')

Searchable as RT123390$

@p5pRT
Copy link
Author

p5pRT commented Dec 8, 2014

From @andk

bisect


commit fedf30e
Author​: David Mitchell <davem@​iabyn.com>
Date​: Fri Oct 24 16​:26​:38 2014 +0100

  Add OP_MULTIDEREF

report


http​://www.cpantesters.org/cpan/report/5f687062-7e1f-11e4-a49a-1b5452b25338

also affected


VPIT/autovivification-0.14.tar.gz
http​://www.cpantesters.org/cpan/report/c8ad0228-7e32-11e4-ba79-834552b25338

perl -V


Summary of my perl5 (revision 5 version 21 subversion 7) configuration​:
  Commit id​: fedf30e
  Platform​:
  osname=linux, osvers=3.16.0-4-amd64, archname=x86_64-linux-thread-multi
  uname='linux k83 3.16.0-4-amd64 #1 smp debian 3.16.7-2 (2014-11-06) x86_64 gnulinux '
  config_args='-Dprefix=/home/sand/src/perl/repoperls/installed-perls/perl/v5.21.6-336-gfedf30e/9980 -Dmyhostname=k83 -Dinstallusrbinperl=n -Uversiononly -Dusedevel -des -Ui_db -Duseithreads -Uuselongdouble -DDEBUGGING=-g'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=define, usemultiplicity=define
  use64bitint=define, use64bitall=define, uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2',
  optimize='-O2 -g',
  cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
  ccversion='', gccversion='4.9.2', gccosandvers=''
  intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3
  ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='cc', ldflags =' -fstack-protector-strong -L/usr/local/lib'
  libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
  libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat
  perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
  libc=libc-2.19.so, so=so, useshrplib=false, libperl=libperl.a
  gnulibc_version='2.19'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
  cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib -fstack-protector-strong'

Characteristics of this binary (from libperl)​:
  Compile-time options​: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
  PERL_DONT_CREATE_GVSV
  PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
  PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
  PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV
  PERL_USE_DEVEL USE_64_BIT_ALL USE_64_BIT_INT
  USE_ITHREADS USE_LARGE_FILES USE_LOCALE
  USE_LOCALE_COLLATE USE_LOCALE_CTYPE
  USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO
  USE_PERL_ATOF USE_REENTRANT_API
  Built under linux
  Compiled at Dec 7 2014 10​:50​:56
  %ENV​:
  PERL5LIB=""
  PERL5OPT=""
  PERL5_CPANPLUS_IS_RUNNING="24920"
  PERL5_CPAN_IS_RUNNING="24920"
  PERL_MM_USE_DEFAULT="1"
  @​INC​:
  /home/sand/src/perl/repoperls/installed-perls/perl/v5.21.6-336-gfedf30e/9980/lib/site_perl/5.21.7/x86_64-linux-thread-multi
  /home/sand/src/perl/repoperls/installed-perls/perl/v5.21.6-336-gfedf30e/9980/lib/site_perl/5.21.7
  /home/sand/src/perl/repoperls/installed-perls/perl/v5.21.6-336-gfedf30e/9980/lib/5.21.7/x86_64-linux-thread-multi
  /home/sand/src/perl/repoperls/installed-perls/perl/v5.21.6-336-gfedf30e/9980/lib/5.21.7
  .
--
andreas

@p5pRT
Copy link
Author

p5pRT commented Dec 8, 2014

From perl@profvince.com

Le 08/12/2014 19​:26, (Andreas J. Koenig) (via RT) a écrit :

# New Ticket Created by (Andreas J. Koenig)
# Please include the string​: [perl #123390]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=123390 >

bisect
------
commit fedf30e
Author​: David Mitchell <davem@​iabyn.com>
Date​: Fri Oct 24 16​:26​:38 2014 +0100

 Add OP\_MULTIDEREF

report
------
http​://www.cpantesters.org/cpan/report/5f687062-7e1f-11e4-a49a-1b5452b25338

also affected
-------------
VPIT/autovivification-0.14.tar.gz
http​://www.cpantesters.org/cpan/report/c8ad0228-7e32-11e4-ba79-834552b25338

autovivification.pm needs to be taught about this new op. I won't work
on this before the end of the month, and this is quite some work anyway,
so don't expect a release anytime soon.

Vincent

@p5pRT
Copy link
Author

p5pRT commented Dec 8, 2014

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Dec 9, 2014

From @andk

commit fedf30e
Author​: David Mitchell <davem@​iabyn.com>
Date​: Fri Oct 24 16​:26​:38 2014 +0100

Add OP_MULTIDEREF

One piece of innovation in this commit is the new warning "Use of
reference as array index". It seems there is a bug in the implementation
fo the warning. Starting from my cpantesters report

  http​://www.cpantesters.org/cpan/report/c7ded7f8-7ed8-11e4-aaeb-9f7752b25338

I came to the conclusion[0]​:

  https://metacpan.org/source/GWILLIAMS/RDF-Trine-1.011/lib/RDF/Trine/Store/Hexastore.pm#L308
  https://metacpan.org/source/GWILLIAMS/RDF-Trine-1.011/lib/RDF/Trine/Store/Hexastore.pm#L38

  The two relevant lines are 308 and 38 and the term NODEMAP->{ $_ }
  is always a scalar in the range 0..3, never a reference. So the
  warning looks wrong.

--
andreas
[0] https://rt.cpan.org/Ticket/Display.html?id=100709

@p5pRT
Copy link
Author

p5pRT commented Dec 10, 2014

From @cpansprout

On Tue Dec 09 13​:25​:44 2014, andreas.koenig.7os6VVqR@​franz.ak.mind.de wrote​:

commit fedf30e
Author​: David Mitchell <davem@​iabyn.com>

For once, it was not one of my commits. :-)

Date​: Fri Oct 24 16​:26​:38 2014 +0100

Add OP_MULTIDEREF

One piece of innovation in this commit is the new warning "Use of
reference as array index". It seems there is a bug in the
implementation
fo the warning. Starting from my cpantesters report

http​://www.cpantesters.org/cpan/report/c7ded7f8-7ed8-11e4-aaeb-
9f7752b25338

I came to the conclusion[0]​:

https://metacpan.org/source/GWILLIAMS/RDF-Trine-
1.011/lib/RDF/Trine/Store/Hexastore.pm#L308
https://metacpan.org/source/GWILLIAMS/RDF-Trine-
1.011/lib/RDF/Trine/Store/Hexastore.pm#L38

The two relevant lines are 308 and 38 and the term NODEMAP->{ $_ }
is always a scalar in the range 0..3, never a reference. So the
warning looks wrong.

Confirmed​:

use constant NODEMAP
  => { subject => 0, predicate => 1, object => 2, context => 3 };
() = $_[ NODEMAP->{ subject } ];

$ pbpaste|./perl -Ilib -w -MO=Concise
Use of reference "HASH(0x7fd190915ba8)" as array index at - line 2.
Use of reference "HASH(0x7fd190915ba8)" as array index at - line 2.
b <@​> leave[1 ref] vKP/REFC ->(end)
1 <0> enter ->2
2 <;> nextstate(main 221 -​:2) v​:{ ->3
a <2> aassign[t2] vKS ->b
- <1> ex-list lK ->9
3 <0> pushmark s ->4
8 <2> aelem sK/2 ->9
5 <1> rv2av sKR/1 ->6
4 <#> gv[*_] s ->5
- <1> ex-helem sK/2 ->8
7 <+> multideref(->{"subject"}) sK ->8
- <1> ex-rv2hv sKR/1 ->7
6 <$> const[IV \HASH] s*/FOLD ->7
- <1> ex-list lK ->a
9 <0> pushmark s ->a
- <0> stub lPRM* ->-
- syntax OK

So it is happening at compile time, which seems wrong to me, since this was always a run-time warning.

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Dec 10, 2014

From @iabyn

On Tue, Dec 09, 2014 at 05​:56​:47PM -0800, Father Chrysostomos via RT wrote​:

Confirmed​:

use constant NODEMAP
=> { subject => 0, predicate => 1, object => 2, context => 3 };
() = $_[ NODEMAP->{ subject } ];

$ pbpaste|./perl -Ilib -w -MO=Concise
Use of reference "HASH(0x7fd190915ba8)" as array index at - line 2.
Use of reference "HASH(0x7fd190915ba8)" as array index at - line 2.
b <@​> leave[1 ref] vKP/REFC ->(end)
1 <0> enter ->2
2 <;> nextstate(main 221 -​:2) v​:{ ->3
a <2> aassign[t2] vKS ->b
- <1> ex-list lK ->9
3 <0> pushmark s ->4
8 <2> aelem sK/2 ->9
5 <1> rv2av sKR/1 ->6
4 <#> gv[*_] s ->5
- <1> ex-helem sK/2 ->8
7 <+> multideref(->{"subject"}) sK ->8
- <1> ex-rv2hv sKR/1 ->7
6 <$> const[IV \HASH] s*/FOLD ->7
- <1> ex-list lK ->a
9 <0> pushmark s ->a
- <0> stub lPRM* ->-
- syntax OK

So it is happening at compile time, which seems wrong to me, since this was always a run-time warning.

It's right that its now (also) a compile-time warning, since
S_maybe_multideref() converts the value in an OP_CONST into a UV at
compile-time.

The error is that S_maybe_multideref() does the check as soon as it sees
the OP_CONST, but before seeing whether that's the totality of the index
expression. i.e. it sees

  $_[ NODEMAP->{ subject } ]

and thinks its actually seen

  $_[ NODEMAP ]

and issues the warning. I'm working up a fix right now.

--
"You're so sadly neglected, and often ignored.
A poor second to Belgium, When going abroad."
  -- Monty Python, "Finland"

@p5pRT
Copy link
Author

p5pRT commented Dec 10, 2014

From @iabyn

On Wed, Dec 10, 2014 at 12​:55​:08PM +0000, Dave Mitchell wrote​:

I'm working up a fix right now.

Now done​:

commit b48c4cb
Author​: David Mitchell <davem@​iabyn.com>
AuthorDate​: Wed Dec 10 13​:20​:38 2014 +0000
Commit​: David Mitchell <davem@​iabyn.com>
CommitDate​: Wed Dec 10 13​:25​:57 2014 +0000

  fix spurious 'Use of reference' warning
 
  My recent OP_MULTIDEREF addition introduced a bug where, when
  converting a constant array index into a UV, it checked for a ref
  and issued a "Use of reference "HASH(0x7fd190915ba8)" as array index"
  warning *before* it had confirmed that the OP_CONST was the only op in
  the index expression. So things like
 
  use constant HASHREF => { a => 1 };
  () = $_[HASHREF->{a} ];
 
  would generate two spurious warnings.
 
  The fix is easy. Only test for the warning on the second pass;
  we'll already have abandoned the optimisation attempt on the first pass
  if the index expression isn't a simple constant.

--
Spock (or Data) is fired from his high-ranking position for not being able
to understand the most basic nuances of about one in three sentences that
anyone says to him.
  -- Things That Never Happen in "Star Trek" #19

@p5pRT
Copy link
Author

p5pRT commented Dec 10, 2014

From @cpansprout

On Wed Dec 10 05​:03​:17 2014, davem wrote​:

On Tue, Dec 09, 2014 at 05​:56​:47PM -0800, Father Chrysostomos via RT
wrote​:

So it is happening at compile time, which seems wrong to me, since
this was always a run-time warning.

It's right that its now (also) a compile-time warning, since
S_maybe_multideref() converts the value in an OP_CONST into a UV at
compile-time.

For constant folding, we forego the optimisation if it would change when warnings occur.

For multideref I think we should do something similar, but we don’t need to forego the warning altogether. How about relocating the constant to the pad, even under non-threaded builds, and treating it as a lexical variable?

Another consideration is that an overloaded object may return a different value later on, or an object may lose or gain overloading by the time the code runs, especially if we have not reached the ‘use overload’ statement yet.

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Dec 10, 2014

From @iabyn

On Wed, Dec 10, 2014 at 05​:31​:52AM -0800, Father Chrysostomos via RT wrote​:

On Wed Dec 10 05​:03​:17 2014, davem wrote​:

On Tue, Dec 09, 2014 at 05​:56​:47PM -0800, Father Chrysostomos via RT
wrote​:

So it is happening at compile time, which seems wrong to me, since
this was always a run-time warning.

It's right that its now (also) a compile-time warning, since
S_maybe_multideref() converts the value in an OP_CONST into a UV at
compile-time.

For constant folding, we forego the optimisation if it would change when warnings occur.

For multideref I think we should do something similar, but we don’t need to forego the warning altogether. How about relocating the constant to the pad, even under non-threaded builds, and treating it as a lexical variable?

Another consideration is that an overloaded object may return a different value later on, or an object may lose or gain overloading by the time the code runs, especially if we have not reached the ‘use overload’ statement yet.

I think the idea of evaluating a constant at compile-time is already
well-established, e.g. aelemfast for $a[ZERO], and if (DEBUG) {}.
If someone wants to mess with a "constant" such that it's a continually
varying overloaded something, they deserve everything they get.
What if at compile-time, DEBUG is a false "constant", but at run-time
magically becomes true? Should we not fold 'if (DEBUG) {}' just in case?

Storing the constant in the pad is going to be slower than directly
storing it as a UV; think of all the code that uses arrays as objects,
with symbolic constants for the index​: e.g. $self->[FOO]. It would seem
silly to slow them down just for a rare edge case.

Comparing $r->[0]
with $r->[$i] (where the lexical $i has been initialised to 0)

using bench.pl --raw

  $r->[0] $r->[$i]
  -------- --------
  Ir 150.0 164.0
  Dr 44.0 49.0
  Dw 20.0 21.0
  COND 25.0 29.0
  IND 2.0 2.0
 
COND_m -0.1 -0.2
IND_m 1.0 1.0
 
Ir_m1 0.0 0.0
Dr_m1 0.0 0.0
Dw_m1 0.0 0.0
 
Ir_mm 0.0 0.0
Dr_mm 0.0 0.0
Dw_mm 0.0 0.0

--
The warp engines start playing up a bit, but seem to sort themselves out
after a while without any intervention from boy genius Wesley Crusher.
  -- Things That Never Happen in "Star Trek" #17

@p5pRT
Copy link
Author

p5pRT commented Dec 10, 2014

From @cpansprout

On Wed Dec 10 08​:18​:23 2014, davem wrote​:

On Wed, Dec 10, 2014 at 05​:31​:52AM -0800, Father Chrysostomos via RT
wrote​:

On Wed Dec 10 05​:03​:17 2014, davem wrote​:

On Tue, Dec 09, 2014 at 05​:56​:47PM -0800, Father Chrysostomos via
RT
wrote​:

So it is happening at compile time, which seems wrong to me,
since
this was always a run-time warning.

It's right that its now (also) a compile-time warning, since
S_maybe_multideref() converts the value in an OP_CONST into a UV at
compile-time.

For constant folding, we forego the optimisation if it would change
when warnings occur.

For multideref I think we should do something similar, but we don’t
need to forego the warning altogether. How about relocating the
constant to the pad, even under non-threaded builds, and treating it
as a lexical variable?

Another consideration is that an overloaded object may return a
different value later on, or an object may lose or gain overloading
by the time the code runs, especially if we have not reached the ‘use
overload’ statement yet.

I think the idea of evaluating a constant at compile-time is already
well-established, e.g. aelemfast for $a[ZERO], and if (DEBUG) {}.
If someone wants to mess with a "constant" such that it's a
continually
varying overloaded something, they deserve everything they get.
What if at compile-time, DEBUG is a false "constant", but at run-time
magically becomes true? Should we not fold 'if (DEBUG) {}' just in
case?

Never mind my overloading concern, then. :-)

Storing the constant in the pad is going to be slower than directly
storing it as a UV; think of all the code that uses arrays as objects,
with symbolic constants for the index​: e.g. $self->[FOO]. It would
seem
silly to slow them down just for a rare edge case.

I meant store it in the pad like a lexical only if it is a reference. If we ignore overloading, then we can do that only if we would have warned about it. That would make this optimisation consistent with constant folding.

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Dec 13, 2014

From @cpansprout

On Wed Dec 10 08​:49​:28 2014, sprout wrote​:

I meant store it in the pad like a lexical only if it is a reference.
If we ignore overloading, then we can do that only if we would have
warned about it. That would make this optimisation consistent with
constant folding.

Do you have any objections to the attached patch?

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Dec 13, 2014

From @cpansprout

From 0f03985 Mon Sep 17 00​:00​:00 2001
From​: Father Chrysostomos <sprout@​cpan.org>
Date​: Sat, 13 Dec 2014 05​:59​:13 -0800
Subject​: [PATCH] Make ref-as-array-index solely a run-time warning
MIME-Version​: 1.0
Content-Type​: text/plain; charset=UTF-8
Content-Transfer-Encoding​: 8bit

The multideref optimisation was making it into a compile-time warn-
ing some of the time, making it less predictable when the warning
would occur.

In those cases where we would have (or might have) warned at compile
time (lexical ‘misc’ warnings enabled, or lexical warnings disabled
altogether), relocate the constant to the pad, even under non-threaded
builds, and treat it as a lexical scalar.

Inline Patch
diff --git a/dump.c b/dump.c
index afa40cd..fbc09e5 100644
--- a/dump.c
+++ b/dump.c
@@ -2285,7 +2285,8 @@ S_append_padvar(pTHX_ PADOFFSET off, CV *cv, SV *out, int n,
     if (paren)
         sv_catpvs_nomg(out, "(");
     for (i = 0; i < n; i++) {
-        if (namepad && (sv = padnamelist_fetch(namepad, off + i)))
+        if (namepad && (sv = padnamelist_fetch(namepad, off + i))
+         && PadnameLEN(sv))
         {
             STRLEN cur = SvCUR(out);
             Perl_sv_catpvf(aTHX_ out, "[%"PNf, PNfARG(sv));
diff --git a/lib/B/Deparse.pm b/lib/B/Deparse.pm
index 0535262..6e16387 100644
--- a/lib/B/Deparse.pm
+++ b/lib/B/Deparse.pm
@@ -3994,7 +3994,10 @@ sub pp_multideref {
             }
         }
         elsif (($actions & MDEREF_INDEX_MASK) == MDEREF_INDEX_padsv) {
-            $text .= $self->padname(shift @items);
+            my $pn = $self->padname_sv(my $off = shift @items);
+            $text .= $pn->LEN
+               ? $self->padname($off)
+               : $self->const($self->padval($off), $cx);
         }
         elsif (($actions & MDEREF_INDEX_MASK) == MDEREF_INDEX_gvsv) {
             $text .= '$' .  ($self->stash_variable_name('$', shift @items))[0];
diff --git a/op.c b/op.c
index cef99f2..30bb8a4 100644
--- a/op.c
+++ b/op.c
@@ -12398,11 +12398,22 @@ S_maybe_multideref(pTHX_ OP *start, OP *orig_o, UV orig_action, U8 hints)
                     else {
                         /* it's a constant array index */
                         SV *ix_sv = cSVOPo->op_sv;
-                        if (pass && UNLIKELY(SvROK(ix_sv) && !SvGAMAGIC(ix_sv)
-                                                && ckWARN(WARN_MISC)))
-                        Perl_warner(aTHX_ packWARN(WARN_MISC),
-                                "Use of reference \"%"SVf"\" as array index",
-                                SVfARG(ix_sv));
+                        if (UNLIKELY(  SvROK(ix_sv) && !SvGAMAGIC(ix_sv)
+                                    && (  ckWARN(WARN_MISC)
+                                       || isLEXWARN_off)))
+                        {
+                            if (pass) {
+                                PADOFFSET ix = arg->pad_offset =
+                                    pad_alloc(OP_CONST, SVf_READONLY);
+                                SvREFCNT_dec(PAD_SVl(ix));
+                                PAD_SETSV(ix, ix_sv);
+                                cSVOPo->op_sv = NULL;
+                            }
+                            arg++;
+                            index_type = MDEREF_INDEX_padsv;
+                            o = o->op_next;
+                            break;
+                        }
                         iv = SvIV(ix_sv);
 
                         if (   action_count == 0
diff --git a/t/lib/warnings/pp_hot b/t/lib/warnings/pp_hot
index 702df08..65d2f1a 100644
--- a/t/lib/warnings/pp_hot
+++ b/t/lib/warnings/pp_hot
@@ -350,10 +350,15 @@ use constant FOO => { a => 1 };
 
 EXPECT
 ########
-use warnings 'misc';
 use constant FOO => {};
-() = $_[FOO];
+$^W=1;
+for(1..2){ () = $_[FOO]; }
+use warnings 'misc';
+for(1..2){ () = $_[FOO]; }
 
 EXPECT
 OPTION regex
 Use of reference "HASH\(0x\w+\)" as array index at - line 3.
+Use of reference "HASH\(0x\w+\)" as array index at - line 3.
+Use of reference "HASH\(0x\w+\)" as array index at - line 5.
+Use of reference "HASH\(0x\w+\)" as array index at - line 5.

@p5pRT
Copy link
Author

p5pRT commented Dec 13, 2014

From @iabyn

On Sat, Dec 13, 2014 at 06​:01​:58AM -0800, Father Chrysostomos via RT wrote​:

On Wed Dec 10 08​:49​:28 2014, sprout wrote​:

I meant store it in the pad like a lexical only if it is a reference.
If we ignore overloading, then we can do that only if we would have
warned about it. That would make this optimisation consistent with
constant folding.

Do you have any objections to the attached patch?

Sorry, but I don't like it at all. Its a tricksy special-case (storing
a "const" in a pad in non-threaded builds then pretending its a lexical),
to solve what seems to to me to be a complete non-problem.

If someone has some code that does

  use constant FOO => ....;
  ...
  $a[FOO];

then personally I think warning about a strange value for FOO at compile
time rather than run time is a desirable feature, not a bug.

--
This is a great day for France!
  -- Nixon at Charles De Gaulle's funeral

@p5pRT
Copy link
Author

p5pRT commented Apr 8, 2015

From @tonycoz

On Wed Dec 10 05​:28​:04 2014, davem wrote​:

On Wed, Dec 10, 2014 at 12​:55​:08PM +0000, Dave Mitchell wrote​:

I'm working up a fix right now.

Now done​:

commit b48c4cb
Author​: David Mitchell <davem@​iabyn.com>
AuthorDate​: Wed Dec 10 13​:20​:38 2014 +0000
Commit​: David Mitchell <davem@​iabyn.com>
CommitDate​: Wed Dec 10 13​:25​:57 2014 +0000

fix spurious 'Use of reference' warning

My recent OP\_MULTIDEREF addition introduced a bug where\, when
converting a constant array index into a UV\, it checked for a ref
and issued a "Use of reference "HASH\(0x7fd190915ba8\)" as array index"
warning \*before\* it had confirmed that the OP\_CONST was the only op in
the index expression\. So things like

With that the original problem with the ticket is fixed, but B​::Tap is still
failing tests.

I suspect it's just a case that the tests need to be updated to deal with OP_MULTIDEREF to build a valid op-tree.

Tony

@p5pRT
Copy link
Author

p5pRT commented May 5, 2015

From @iabyn

On Tue, Apr 07, 2015 at 08​:43​:03PM -0700, Tony Cook via RT wrote​:

On Wed Dec 10 05​:28​:04 2014, davem wrote​:

On Wed, Dec 10, 2014 at 12​:55​:08PM +0000, Dave Mitchell wrote​:

I'm working up a fix right now.

Now done​:

commit b48c4cb
Author​: David Mitchell <davem@​iabyn.com>
AuthorDate​: Wed Dec 10 13​:20​:38 2014 +0000
Commit​: David Mitchell <davem@​iabyn.com>
CommitDate​: Wed Dec 10 13​:25​:57 2014 +0000

fix spurious 'Use of reference' warning

My recent OP\_MULTIDEREF addition introduced a bug where\, when
converting a constant array index into a UV\, it checked for a ref
and issued a "Use of reference "HASH\(0x7fd190915ba8\)" as array index"
warning \*before\* it had confirmed that the OP\_CONST was the only op in
the index expression\. So things like

With that the original problem with the ticket is fixed, but B​::Tap is still
failing tests.

I suspect it's just a case that the tests need to be updated to deal
with OP_MULTIDEREF to build a valid op-tree.

B​::Tap 0.15 passes its tests. Is there any reason this ticket can't be
closed now?

--
In England there is a special word which means the last sunshine
of the summer. That word is "spring".

@p5pRT
Copy link
Author

p5pRT commented May 7, 2015

From @rjbs

New B-Tap. Closed!

--
rjbs

@p5pRT p5pRT closed this as completed May 7, 2015
@p5pRT
Copy link
Author

p5pRT commented May 7, 2015

@rjbs - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant