[perl #60332] src/exceptions.c: '_CONST_STRING_' undeclared
# New Ticket Created by HG # Please include the string: [perl #60332] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=60332 > Build errors with parrot-0.8.0 :- % gmake Compiling with: xx.c cc -I./include -DNO_HASH_SEED -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -D_GNU_SOURCE -DHASATTRIBUTE_CONST -DHASATTRIBUTE_MALLOC -DHASATTRIBUTE_NORETURN -DHASATTRIBUTE_PURE -DHASATTRIBUTE_UNUSED -falign-functions=16 -maccumulate-outgoing-args -W -Wall -Waggregate-return -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wformat -Wimplicit -Wimport -Winline -Wmissing-braces -Wpacked -Wparentheses -Wpointer-arith -Wreturn-type -Wno-shadow -Wsign-compare -Wswitch -Wtrigraphs -Wundef -Wunknown-pragmas -Wno-unused -Wwrite-strings -Wbad-function-cast -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -DHAS_GETTEXT -g -DHAS_JIT -DI386 -DHAVE_COMPUTED_GOTO -fpic -fPIC -I. -o xx.o -c xx.c /nfs/src/arudev/arch/i686-linux/bin/perl5.8.6 tools/build/nativecall.pl src/call_list.txt /nfs/src/arudev/arch/i686-linux/bin/perl5.8.6 tools/build/c2str.pl src/nci.c > src/nci.str /nfs/src/arudev/arch/i686-linux/bin/perl5.8.6 tools/build/c2str.pl --all src/string.c src/ops/core_ops.c src/ops/core_ops_switch.c src/charset.c src/core_pmcs.c src/cpu_dep.c src/debug.c src/dynext.c src/embed.c src/encoding.c src/events.c src/exceptions.c src/exceptions.c: In function `Parrot_ex_build_exception': src/exceptions.c:74: `_CONST_STRING_74' undeclared (first use in this function) src/exceptions.c:74: (Each undeclared identifier is reported only once src/exceptions.c:74: for each function it appears in.) src/exceptions.c:76: `_CONST_STRING_76' undeclared (first use in this function) src/exceptions.c: In function `find_exception_handler': src/exceptions.c:106: `_CONST_STRING_106' undeclared (first use in this function) src/exceptions.c:125: `_CONST_STRING_125' undeclared (first use in this function) src/exceptions.c: In function `Parrot_ex_throw_from_c': src/exceptions.c:274: `_CONST_STRING_274' undeclared (first use in this function) src/exceptions.c: In function `Parrot_ex_mark_unhandled': src/exceptions.c:400: `_CONST_STRING_400' undeclared (first use in this function) gmake: *** [src/exceptions.o] Error 1 [Please do not change anything below this line] - --- Flags: category=core severity=low --- This perlbug was built using Perl v5.8.6 - Mon Jun 27 01:35:37 PDT 2005 It is being executed now by Perl v5.8.6 - Thu Aug 4 00:18:57 PDT 2005. Site configuration information for perl v5.8.6: Configured by pvnaik at Thu Aug 4 00:18:57 PDT 2005. Summary of my perl5 (revision 5 version 8 subversion 6) configuration: Platform: osname=linux, osvers=2.4.9-e.25kmap1enterprise, archname=i686-linux uname='linux ap601ses 2.4.9-e.25kmap1enterprise #1 smp thu jun 26 10:52:16 pdt 2003 i686 unknown ' config_args='-de -Dprefix=/arudev -Dmake=/usr/bin/make -Dbin=/arudev/bin/ -Uinstallusrbinperl -Dstartperl=#!/arudev/bin/perl -Dinc_version_list=none -Dscriptdir=/nfs/group/arudev/arch/share/bin -Dsitebin=/arudev/bin -Accflags=-DNO_HASH_SEED' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-DNO_HASH_SEED -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm', optimize='-O2', cppflags='-DNO_HASH_SEED -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/include/gdbm' ccversion='', gccversion='2.96 2731 (Red Hat Linux 7.2 2.96-118.7.2)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc libc=/lib/libc-2.2.4.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.2.4' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Locally applied patches: --- @INC for perl v5.8.6: /arudev/pm /arudev/lib/perl5/5.8.6/i686-linux /arudev/lib/perl5/5.8.6 /arudev/lib/perl5/site_perl/5.8.6/i686-linux /arudev/lib/perl5/site_perl/5.8.6 /arudev/lib/perl5/site_perl . --- Environment for perl v5.8.6
Re: [perl #60330] [BUG][PATCH] if statement should explicitely call 'prefix:?'
On Mon, Nov 03, 2008 at 06:07:54PM -0800, Vasily Chekalkin via RT wrote: > Sorry, this patch broke Rakudo. Shouldn't be applied. It's also the wrong approach. The boolean tests (including prefix: ) all use the get_bool vtable function in order to check boolean-ness. What's missing is the correct mapping for some classes into the boolean type. Since the handling of boolean (and the Bool enum type) wasn't really fleshed out until August or so, we just haven't caught up with getting it all implemented. Pm
[perl #59104] export sub from used module is broken if make pir
On Sat Sep 20 01:25:09 2008, moritz wrote: > On Fri Sep 19 22:45:29 2008, ihrd wrote: > > Hi, > > I compile parrot r31282 and November do not export sub from modules on > > pir (in r31264 the same situation): > > I suspect that could be related to > > r31226 | jonathan | 2008-09-18 12:46:58 +0200 (Thu, 18 Sep 2008) | 1 line > > [rakudo] Make use happen at BEGIN time. This lets us use modules that > contain classes. However, we still have various issues to follow up on > with this (for example, making it work when you use a module that does a > use itself, which gives very odd errors at the moment, and making this > play well when a pre-compiled modul > e does a use). > Yes, it was. I've now in r32325 done something that gives us the best of both worlds, so you can still use classes written in modules (pre-compiled ones too) but pre-compiled PIR modules work again. We'll want to re-visit it at some point in the future, but for now this un-breaks what was broken before. Hope this helps! Jonathan
[perl #57446] Enums of only one element don't work i rakudo
On Sat Aug 02 13:02:39 2008, pmichaud wrote: > On Wed, Jul 30, 2008 at 10:46:27PM -0700, Carl Mäsak wrote: > > $ svn info | grep Revi > > Revision: 29902 > > > > $ ./perl6 -e 'enum Weekday;' # works > > $ ./perl6 -e 'enum Weekday;' # doesn't > > get_pmc_keyed() not implemented in class 'Perl6Str' > > [...] > > > > Likewise, > > > > $ ./perl6 -e 'enum ' # works > > $ ./perl6 -e 'enum ' # doesn't > > get_pmc_keyed() not implemented in class 'Perl6Str' > > [...] > > > > I suspect the problem is that the enum code is expecting > the angles to always return a List. Instead it should > probably be evaluating what it gets in list context. > Yes, indeedy. Fixed in r32329, plus added some tests for this case. Jonathan
[perl #59928] Calling methods in many-jointed classes doesn't work
On Thu Oct 16 10:22:06 2008, masak wrote: > Moritz (>), Carl (>>): > >> Rakudo r31994 can call methods on classes without :: in them, but not > >> on classes having them. > >> > >> $ perl6 -e 'class A { method foo { say "OH HAI" } }; A.new.foo' > >> OH HAI > >> > >> $ perl6 -e 'class A::B { method foo { say "OH HAI" } }; A::B.new.foo' > >> Method 'foo' not found for invocant of class 'A;B' > >> [...] > > > > We clearly need more OO tests. Care to add that one (as TODO) to one of > > the S12 tests that is included in `make spectest`? > > I added the new test file t/spec/S12-class/namespaced.t -- feel free > to merge it (and its single test) into another test file. I'm not sure > I got the TODO fudging right. > In r32333 I got this passing and added the (now unfudged) test to spectest_regression. Thanks, Jonathan
Re: assign to Scalar with hash
Илья wrote: > Rakudo> my $i = { a => 1 }; $i = $i.keys; > Odd number of elements found where hash expected. It's a bug, and already reported: http://rt.perl.org/rt3/Ticket/Display.html?id=59382 "[BUG] Scalars never give up their container type" > Rakudo> my $a = {a => 1}; my $b = {b => 1}; $a = $b; > Cannot morph a Perl6Scalar. I didn't know about that, but it could be another manifestation of this bug. Cheers, Moritz -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/
[perl #60176] Rakudo fails on defining classes with core roles
On Mon Oct 27 10:55:52 2008, masak wrote: > Rakudo r32151 can't create classes with roles from the Rakudo-defined > classes. > > $ ./perl6 -e 'role B {}; class A does B {}' # this works > > $ perl6 -e 'class A does Int {}' # this doesn't > Method 'methods' not found > [...] > > Now, Int is a class in Rakudo, so I'm not 100% sure this should work. > Still, strange error message. > At the moment Int is not a Role, so I would not expect this to work. The error message sucked, I agree - it's now as of r32335 'does keyword can only be used with roles'. I'm not sure what to do with this ticket now - the error message is improved. But should Int become a role? If so, maybe we rename the ticket to do that? Jonathan
[perl #60008] @array ~~ / regexp / do not work properly, look like array stratification there
On Mon Oct 20 06:11:17 2008, ihrd wrote: > my @a = ('a', 'b' ); > say @a ~~ / 'b' /?? ':)' !! ':('; # :) > say @a ~~ / ^ 'b' /?? ':)' !! ':('; # :( > say @a ~~ / ^ 'a' /?? ':)' !! ':('; # :) > say @a ~~ / ^ 'a' $ / ?? ':)' !! ':('; # :( > They're all smiling as of r32328. Spasibo, Jonathan
Re: [perl #60332] src/exceptions.c: '_CONST_STRING_' undeclared
On Tuesday 04 November 2008 03:30:16 HG wrote: > Build errors with parrot-0.8.0 :- > src/exceptions.c > src/exceptions.c: In function `Parrot_ex_build_exception': > src/exceptions.c:74: `_CONST_STRING_74' undeclared (first use in this > function) src/exceptions.c:74: (Each undeclared identifier is reported only > once src/exceptions.c:74: for each function it appears in.) > src/exceptions.c:76: `_CONST_STRING_76' undeclared (first use in this > function) src/exceptions.c: In function `find_exception_handler': > src/exceptions.c:106: `_CONST_STRING_106' undeclared (first use in > this function) > src/exceptions.c:125: `_CONST_STRING_125' undeclared (first use in > this function) > src/exceptions.c: In function `Parrot_ex_throw_from_c': > src/exceptions.c:274: `_CONST_STRING_274' undeclared (first use in > this function) > src/exceptions.c: In function `Parrot_ex_mark_unhandled': > src/exceptions.c:400: `_CONST_STRING_400' undeclared (first use in > this function) > gmake: *** [src/exceptions.o] Error 1 > Summary of my perl5 (revision 5 version 8 subversion 6) configuration: > Platform: > ccversion='', gccversion='2.96 2731 (Red Hat Linux 7.2 > 2.96-118.7.2)' Hm, I'm not sure it's worth our time to work around bugs in an eight year old GCC (and RH 7.2 is ... well, Fedora is at version 10). If we're not seeing a similar problem in GCC 4.x, we're happy to suggest a workaround, but I lean toward marking this as "wontfix". -- c
Re: [perl #60332] src/exceptions.c: '_CONST_STRING_' undeclared
On Tue, Nov 04, 2008 at 11:23:54AM -0700, chromatic wrote: > On Tuesday 04 November 2008 03:30:16 HG wrote: > > ccversion='', gccversion='2.96 2731 (Red Hat Linux 7.2 > > 2.96-118.7.2)' > > Hm, I'm not sure it's worth our time to work around bugs in an eight year old > GCC (and RH 7.2 is ... well, Fedora is at version 10). If we're not seeing a > similar problem in GCC 4.x, we're happy to suggest a workaround, but I lean > toward marking this as "wontfix". http://gcc.gnu.org/gcc-2.96.html It has come to our attention that some GNU/Linux distributions are currently shipping with ``GCC 2.96''. We would like to point out that GCC 2.96 is not a formal GCC release nor will there ever be such a release. Rather, GCC 2.96 has been the code- name for our development branch that will eventually become GCC 3.0. If you encounter a bug in a compiler labeled 2.96, we suggest you contact whoever supplied the compiler as we can not support 2.96 versions that were not issued by the GCC team. And indeed, from my memory, it was initially very buggy, although RedHat managed to fix quite a few bugs in their later releases of it. I was dis-inclined to support it even when it was brand new, because it was buggy as hell, and because it was an upstart vendor manouver completely counter to what the authors of the software wanted. But in the end, the real victims of corporate stupidity are the users :-( Nicholas Clark
assign to Scalar with hash
Hi there, Rakudo> my $i = { a => 1 }; $i = $i.keys; Odd number of elements found where hash expected. Rakudo> my $a = {a => 1}; my $b = {b => 1}; $a = $b; Cannot morph a Perl6Scalar. I missed something or that`s bugs? Ilya
.perl and other methods on Junctions?
Consider the code: my $x = 3 | 'foo'; my $y = $x.perl; Does $y end up as a junction of strings or as a single string? Asking more directly, does .perl autothread over a Junction? If .perl does not autothread, then is there some way of knowing which methods autothread and which do not? (The question of method autothreading over junctions came up at the OSCON 2008 hackathon, but I don't know that it was ever resolved. If it was and I've just forgotten or overlooked the resolution, I'll be happy to have it pointed out to me.) Thanks! Pm
[perl #60330] [BUG][PATCH] if statement should explicitely call 'prefix:?'
Sorry, this patch broke Rakudo. Shouldn't be applied. -- Bacek
[perl #60330] [BUG][PATCH] if statement should explicitely call 'prefix:?'
# New Ticket Created by Vasily Chekalkin # Please include the string: [perl #60330] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=60330 > Hello. During investigation of problems with #60168 if found that "if" doensn't call 'prefix:?'. Simple test case: perl6: if (Bool::True&Bool::False) { say "foo" } else { say "bar" } pugs: OUTPUT[bar] ..elf 22847, rakudo 32323: OUTPUT[foo] Attached patch solve this. (We probably have to add 'prefix:?' to other statements aswell. E.g. "while", etc) -- Bacek diff --git a/languages/perl6/src/parser/actions.pm b/languages/perl6/src/parser/actions.pm index 803fbce..055430e 100644 --- a/languages/perl6/src/parser/actions.pm +++ b/languages/perl6/src/parser/actions.pm @@ -167,7 +167,13 @@ method if_statement($/) { $then.blocktype('immediate'); declare_implicit_immediate_vars($then); my $past := PAST::Op.new( -$expr, $then, +PAST::Op.new( +$expr, +:name('prefix:?'), +:pasttype('call'), +:node( $/ ) +), +$then, :pasttype('if'), :node( $/ ) ); @@ -184,7 +190,13 @@ method if_statement($/) { $then.blocktype('immediate'); declare_implicit_immediate_vars($then); $past := PAST::Op.new( -$expr, $then, $past, +PAST::Op.new( +$expr, +:name('prefix:?'), +:pasttype('call'), +:node( $/ ) +), +$then, $past, :pasttype('if'), :node( $/ ) );
Re: [perl #59880] DOD crash in r31926, t/op/bitwise.t #27 on linux/x86_64
On Monday 20 October 2008 10:25:06 Mark Glines wrote: > chromatic wrote: > > 2) What's setting an invalid pointer-to-a-PMC here? > > This question is answered at the end of the following dump. (This is > one of the things I nopasted during our IRC discussion last week, thanks > for your guidance in producing it.) > > One interesting question: the pointer-to-a-PMC is written a couple times > by the CPointer class, and then written by BigInt once. Was that expected? Fixed in r32065. -- c
Re: [perl #60178] Commit r32189 breaks Parrot on Mac OS X 10.5.4
On Monday 27 October 2008 11:41:22 Carl Mäsak wrote: > I'm running Mac OS X 10.5.4, and can't compile Parrot >r32189. I > managed to compile the latest revision (r32196), but only after > "updating" src/multidispatch.c down to r32188. > > The make output for the failing builds is long and not evidently > informative, so I hesitate to post it. Fixed in r32347. -- c
[perl #57438] [DEPRECATED] [PDD19] .pragma n_operators
On Wed Jul 30 13:06:06 2008, coke wrote: > From PDD19: > > =item .pragma n_operators [deprecated] > > This appears to be the only .pragma; should we leave a placeholder or just remove .pragma entirely when we remove this particular one? -- Will "Coke" Coleda
[perl #58918] [BUG] Can't use a subdir class twice
On Tue Sep 16 05:36:02 2008, stifynsemons wrote: > In r31096, use allows a program to use module A and module B, and allows > module B to use module A, when module A defines a method as long as all > three files are in the same directory. However, when you try and put module > A and module B in the Lib subdirectory and use them as Lib::A and Lib::B, > then rakudo complains with: > A method named 'test' already exists in class 'A'. It may have been supplied > by a role. > current instr.: 'parrot;PCT::HLLCompiler;evalpmc' pc 10631758 ((unknown > file):-1) > perl6(18090) malloc: *** error for object 0x315ad60: double free > *** set a breakpoint in malloc_error_break to debug > Segmentation fault > > The attached file illustrates the problem. > I unpacked those and ran it, and it runs without errors now (I added a print statement in test.p6 to make sure that it actually survived too!) I did a fix for a related issue earlier today, so that one may have done it, or it may have been something someone else did. But this appears to be resolved. Thanks, Jonathan
[perl #60160] [BUG] [PATCH] recursive "use" causes infinite loop.
On Sun Oct 26 19:55:51 2008, [EMAIL PROTECTED] wrote: > The following simple test involves two .pm files that depend on each > other. In revision 32120, this causes an infinite loop. The > attached trivial patch prevents the loop by making Rakudo mark the > modules as loaded before parsing them. This is how Perl5 behaves. > Looks good to me; applied in r32327. Thanks! Jonathan
Re: [perl #60176] Rakudo fails on defining classes with core roles
On Tuesday 04 November 2008 09:05:13 [EMAIL PROTECTED] via RT wrote: > On Mon Oct 27 10:55:52 2008, masak wrote: > > Rakudo r32151 can't create classes with roles from the Rakudo-defined > > classes. > > > > $ ./perl6 -e 'role B {}; class A does B {}' # this works > > > > $ perl6 -e 'class A does Int {}' # this doesn't > > Method 'methods' not found > > [...] > > > > Now, Int is a class in Rakudo, so I'm not 100% sure this should work. > > Still, strange error message. > At the moment Int is not a Role, so I would not expect this to work. The > error message sucked, I agree - it's now as of r32335 'does keyword can > only be used with roles'. I'm not sure what to do with this ticket now - > the error message is improved. But should Int become a role? If so, > maybe we rename the ticket to do that? Every Class implies the existence of a Role. Rakudo may not do that now, but it should do that in the future *even if* Int remains a Class. -- c
[svn:perl6-synopsis] r14599 - doc/trunk/design/syn
Author: larry Date: Tue Nov 4 15:14:32 2008 New Revision: 14599 Modified: doc/trunk/design/syn/S02.pod Log: Define () as the Nil type Modified: doc/trunk/design/syn/S02.pod == --- doc/trunk/design/syn/S02.pod(original) +++ doc/trunk/design/syn/S02.podTue Nov 4 15:14:32 2008 @@ -12,9 +12,9 @@ Maintainer: Larry Wall <[EMAIL PROTECTED]> Date: 10 Aug 2004 - Last Modified: 14 Oct 2008 + Last Modified: 4 Nov 2008 Number: 2 - Version: 139 + Version: 140 This document summarizes Apocalypse 2, which covers small-scale lexical items and typological issues. (These Synopses also contain @@ -860,6 +860,7 @@ built-in C and C functions. (See S04 for how failures are handled.) +Nil Empty list viewed as an item Object Uninitialized (derivatives serve as protoobjects of classes) WhateverWildcard (like undef, but subject to do-what-I-mean via MMD) Failure Failure (lazy exceptions, thrown if not handled properly) @@ -875,6 +876,13 @@ type is also undefined, but excludes C so that autothreading may be dispatched using normal multiple dispatch rules.) +The C type is officially undefined as an item but interpolates +as a null list into list context, and an empty capture into slice +context. A C object may also carry failure information, +but if so, the object behaves as a failure only in item context. +Use C/C when you want to return a hard failure that +will not evaporate in list context. + =head2 Immutable types Objects with these types behave like values, i.e. C<$x === $y> is true
Re: [perl #57438] [DEPRECATED] [PDD19] .pragma n_operators
I'd say kill it, and if we ever want to introduce new pragmas into PIR, we reintroduce. This way, .pragma keyword is not recognized without a reason. (recently I've become a great fan of being able to override commandline options with directives in the file processed; .pragma directive would be good to do this in PIR. You'll see my PROPOSALS whenever the time is ripe for that :-) I was thinking: .pragma output "out.pbc" # pbc output is written to out.pbc .pragma noregallocation # no register optimization .pragma nostrengthreduction # no strength reduction (add $I0,1 -> inc $I0) .pragma warningson and so on. kjs On Tue, Nov 4, 2008 at 9:05 PM, Will Coleda via RT < [EMAIL PROTECTED]> wrote: > On Wed Jul 30 13:06:06 2008, coke wrote: > > From PDD19: > > > > =item .pragma n_operators [deprecated] > > > > > > This appears to be the only .pragma; should we leave a placeholder or > just remove .pragma entirely when we remove this particular one? > > -- > Will "Coke" Coleda >
[svn:parrot-pdd] r32356 - in trunk: . compilers/imcc docs/book docs/imcc docs/pdds editor
Author: coke Date: Tue Nov 4 17:46:38 2008 New Revision: 32356 Modified: trunk/docs/pdds/pdd19_pir.pod Changes in other areas also in this revision: Modified: trunk/DEPRECATED.pod trunk/compilers/imcc/imc.h trunk/compilers/imcc/imcc.l trunk/compilers/imcc/imcc.y trunk/compilers/imcc/imclexer.c trunk/compilers/imcc/imcparser.c trunk/compilers/imcc/imcparser.h trunk/compilers/imcc/parser_util.c trunk/docs/book/ch13_reference.pod trunk/docs/imcc/imcfaq.pod trunk/editor/pir-mode.el Log: Remove .pragma n_operators, closing out RT #57438. This leaves no .pragma remaining, so remove .pragma support. Modified: trunk/docs/pdds/pdd19_pir.pod == --- trunk/docs/pdds/pdd19_pir.pod (original) +++ trunk/docs/pdds/pdd19_pir.pod Tue Nov 4 17:46:38 2008 @@ -396,19 +396,6 @@ Closes the scope block that was opened with .namespace . -=item .pragma n_operators [deprecated: RT #57438] - -Convert arithmethic infix operators to n_infix operations. The unary opcodes -C, C, C, C, and C are also changed to use a C -prefix. - - .pragma n_operators 1 - .sub foo - ... - $P0 = $P1 + $P2 # n_add $P0, $P1, $P2 - $P2 = abs $P0 # n_abs $P2, $P0 - - =back =head3 Subroutine flags
"::" in namespaces
Thanks to Jonathan for working on the :: bug. I'm still having problems, however. The code below worked before I switched all of my "__" class separators to "::". I'm not sure how to tell whether it's failing to find my .pm (I moved the .pm from lib/ PDF__Grammar__Actions.pm to lib/PDF/Grammar/Actions.pm at the same time) or if there's a lingering flaw in the namespace code. What SVN revision did that change go in? In r32354 on Mac 10.4 ppc I'm getting: invoke() not implemented in class 'Undef' The Perl6 code that triggers that looks like this: method is_string(Str $src, Str $expected, Str $msg) { my $method = PDF::Grammar::literal_string; my $m = $src.$method(:action(PDF::Grammar::Actions.new)); is($m, $expected, $msg) || diag("got: $m, expected: $expected"); } and the corresponding PIR is: find_lex $P111, "$src" unless_null $P111, vivify_19 new $P111, "Perl6Scalar" vivify_19: get_hll_global $P112, ["PDF";"Grammar"], "Actions" unless_null $P112, vivify_20 new $P112, "Failure" vivify_20: $P113 = $P112."new"() $P114 = $P111.$P110($P113 :named("action")) # <-- this line fails Thanks, Chris
Re: "::" in namespaces
Replying to myself: I think the flaw is in my use of "PDF::Grammar::literal_string" as a method pointer. This worked fine when it was "PDF__Grammar::literal_string", but now the following PIR: get_hll_global $P108, ["PDF";"Grammar"], "literal_string" is returning undef. The answer appears to be that the PIR for PDF/ Grammmar.pm includes this: .namespace ["PDF::Grammar"] .sub "literal_string" :method instead of .namespace ["PDF";"Grammar"] .sub "literal_string" :method So, does that mean teaching PGE/Exp.pir about double-colon separators? Or does namespace separator need to be some sort of compreg flag? Chris On Nov 4, 2008, at 9:10 PM, Chris Dolan wrote: Thanks to Jonathan for working on the :: bug. I'm still having problems, however. The code below worked before I switched all of my "__" class separators to "::". I'm not sure how to tell whether it's failing to find my .pm (I moved the .pm from lib/ PDF__Grammar__Actions.pm to lib/PDF/Grammar/Actions.pm at the same time) or if there's a lingering flaw in the namespace code. What SVN revision did that change go in? In r32354 on Mac 10.4 ppc I'm getting: invoke() not implemented in class 'Undef' The Perl6 code that triggers that looks like this: method is_string(Str $src, Str $expected, Str $msg) { my $method = PDF::Grammar::literal_string; my $m = $src.$method(:action(PDF::Grammar::Actions.new)); is($m, $expected, $msg) || diag("got: $m, expected: $expected"); } and the corresponding PIR is: find_lex $P111, "$src" unless_null $P111, vivify_19 new $P111, "Perl6Scalar" vivify_19: get_hll_global $P112, ["PDF";"Grammar"], "Actions" unless_null $P112, vivify_20 new $P112, "Failure" vivify_20: $P113 = $P112."new"() $P114 = $P111.$P110($P113 :named("action")) # <-- this line fails Thanks, Chris