Re: I need Windows OpenGL headers for study/testing
Geoffrey Broadwell a écrit : Thanks to tetragon++, I've now got OpenGL header parsing (mostly) working on both Debian Linux/i386 and Mac OS X 10.5. Now I need headers for Windows to continue the porting work. For each of MSVC, MinGW, and cygwin, I need: 1. Path globs [1] for all OpenGL headers, in the form '/path/to/dir1/*.h', '/path/to/dir2/*.h' 2. A tarball or zip archive of all of these headers Any volunteers who can send me the above for one or more of the Windows compiler environments? Thanks in advance! when I tried OpenGL on MinGW, I found some information on : http://www.transmissionzero.co.uk/computing/using-glut-with-mingw/ http://www.xmission.com/~nate/glut.html I compiled with success the configure step, but not the full wrapper. François. -'f [1] No really, I need the full path globs. I'm actually parsing the headers myself, not just trying to get C code to compile. :-)
[perl #54414] Test failure on Windows (R# 27624)
# New Ticket Created by Alan Rocker # Please include the string: [perl #54414] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=54414 > t\benchmark\benchmarks..28/37 # Failed test 'examples/benchmarks/primes2.pasm' # at t\benchmark\benchmarks.t line 219. # Exited with error code: 1 # Received: # error:imcc:syntax error, unexpected IDENTIFIER, expecting PARROT_OP ('save') # in file 'C:\parrot\t\benchmark\benchmarks_29.pasm' line 29 # # Expected: # (?x-ism:^N\sprimes\scalculated\sto\s5000\sis\s670\n # last\sis:\s4999\n$) # Failed test 'examples/benchmarks/primes2_i.pasm' # at t\benchmark\benchmarks.t line 219. # Exited with error code: 1 # Received: # error:imcc:syntax error, unexpected IDENTIFIER, expecting PARROT_OP ('save') # in file 'C:\parrot\t\benchmark\benchmarks_30.pasm' line 25 # # Expected: # (?x-ism:^N\sprimes\scalculated\sto\s1\s # is\s1230\nlast\sis:\s9973\n$) -- Email and shopping with the feelgood factor! 55% of income to good causes. http://www.ippimail.com
[perl #54428] [CAGE] [PATCH] Static function rebuild_attrib_stuff is never used
# New Ticket Created by NotFound # Please include the string: [perl #54428] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=54428 > The static function rebuild_attrib_stuff in src/oo.c is never used, and looks like a remain of the old object system. Parrot builds and pass all test without it. This patch gets rid of it. -- Salu2 Index: src/oo.c === --- src/oo.c (revisión: 27625) +++ src/oo.c (copia de trabajo) @@ -107,10 +107,6 @@ __attribute__nonnull__(3) __attribute__nonnull__(5); -static void rebuild_attrib_stuff(PARROT_INTERP, ARGIN(PMC *_class)) -__attribute__nonnull__(1) -__attribute__nonnull__(2); - /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ /* HEADERIZER END: static */ @@ -506,89 +502,6 @@ /* -=item C - -Take the class and completely rebuild the attribute stuff for -it. Horribly destructive, and definitely not a good thing to do if -there are instantiated objects for the class - -=cut - -*/ - -static void -rebuild_attrib_stuff(PARROT_INTERP, ARGIN(PMC *_class)) -{ -INTVALattr_count, cur_offset, n_class, n_mro, offset; -PMC *attr_offset_hash, *mro, *attribs; -SLOTTYPE *class_slots; - -#ifndef NDEBUG -PMC * const orig_class = _class; -#endif - -/* attrib count isn't set yet, a GC caused by concat could - * corrupt data under construction */ -Parrot_block_DOD(interp); - -class_slots = PMC_data_typed(_class, SLOTTYPE *); -attr_offset_hash = pmc_new(interp, enum_class_Hash); -set_attrib_num(_class, class_slots, PCD_ATTRIBUTES, attr_offset_hash); - -mro = _class->vtable->mro; -n_mro = VTABLE_elements(interp, mro); - -/* walk from oldest parent down to n_class == 0 which is this class */ -cur_offset = 0; - -for (n_class = n_mro - 1; n_class >= 0; --n_class) { -STRING *classname; - -_class = VTABLE_get_pmc_keyed_int(interp, mro, n_class); - -/* this Class isa PMC - no attributes there */ -if (!PObj_is_class_TEST(_class)) -continue; - -class_slots = PMC_data_typed(_class, SLOTTYPE *); -classname = VTABLE_get_string(interp, -get_attrib_num(class_slots, PCD_CLASS_NAME)); -attribs = get_attrib_num(class_slots, PCD_CLASS_ATTRIBUTES); -attr_count = VTABLE_elements(interp, attribs); - -if (attr_count) { -STRING * const partial_name = string_concat(interp, classname, -CONST_STRING(interp, "\0"), 0); - -for (offset = 0; offset < attr_count; offset++) { - STRING * const attr_name = -VTABLE_get_string_keyed_int(interp, attribs, offset); - STRING * const full_name = -string_concat(interp, partial_name, attr_name, 0); - -/* store this attribute with short and full name */ - -VTABLE_set_integer_keyed_str(interp, attr_offset_hash, -attr_name, cur_offset); -VTABLE_set_integer_keyed_str(interp, attr_offset_hash, -full_name, cur_offset); -cur_offset++; -} -} -} - -#ifndef NDEBUG -PARROT_ASSERT(_class == orig_class); -#endif - -/* And note the totals */ -CLASS_ATTRIB_COUNT(_class) = cur_offset; -Parrot_unblock_DOD(interp); -} - - -/* - =item C Return the method name for the given MMD enum.
Parrot Bug Summary
Parrot Bug Summary http://rt.perl.org/rt3/NoAuth/parrot/Overview.html Generated at Mon May 19 13:00:04 2008 GMT --- * Numbers * New Issues * Overview of Open Issues * Ticket Status By Version * Requestors with most open tickets --- Numbers Ticket Counts: 18 new + 676 open = 694 Created this week: 17 Closed this week: 21 --- New Issues New issues that have not been responded to yet 1 - 2 weeks old 53956 [BUG] copy opcode inappropriate for copying a literal 53926 [BUG] :optional and :slurpy :named fails when called with :named :flat 53896 Re: [rt.cpan.org #35695] increment() not implemented in class 'ParrotLibrary' 2 - 3 weeks old 53610 [BUG] Extra libraries on CC build command. 3 - 4 weeks old 53396 [BUG] Miscellaneous test failures on Windows 53394 [BUG] Divide-by-zero error in test on Windows 53392 [BUG] Sign tests failing on Windows 4 - 5 weeks old 52886 [BUG] including gmp.h causes build break in C++ build 5 - 6 weeks old 6 - 7 weeks old 7 - 8 weeks old 8 - 9 weeks old 9 - 10 weeks old 10 - 11 weeks old 11 - 12 weeks old 51330 [TODO] dynext - dll versioning 12 - 13 weeks old 13 - 14 weeks old 14 - 15 weeks old 15 - 16 weeks old 50360 [RFE] Redesign Parrot NCI callback functionality 16 - 17 weeks old 17 - 18 weeks old 18 - 19 weeks old 19 - 20 weeks old 20 - 21 weeks old --- Overview of Open Issues PlatformSeverity Tag Lang aix0abandoned 05005threads 0 Amber 0 All1fatal 2bounce0 BASIC 0 bsdos 0High 0Bug 85 bc 0 cygwin 2low 1compiler 0 befunge 0 cygwin_nt 0medium0configure 3 bf 0 darwin10none 1core 2 cola0 dec_osf0Normal2dailybuild0 forth 0 dgux 0unknown 0docs 3 jako0 dos0Wishlist 3duplicate 0 Lisp0 dynixptx 0 install 2 lolcode 0 freebsd8 library 0 m4 0 generic0 notabug 0 ook 0 gnu0 notok 0 perl6 1 HPUX 2 ok0 plot0 irix 0 Patch35 punie 0 irix64 0 regex 2 pynie 0 Linux 3 sendToCPAN0 python 0 lynxos 0 Todo344 ruby0 mac0 unknown 0 scheme 0 machten0 utilities 0 tcl 0 macos 0 wontfix 0 urm 0 MacOS X8 Zcode 0 mswin321 netbsd 1 next 0 openbsd2 os20 os390 0 other 0 powerux0 qnx0 riscos 0 sco0 Solaris4 sunos 1 svr4 0 svr5 0 sysv 0 unicos 0 unicosmk 0 unix 0 unknown0 uts0 vms0 VOS0 Win32 10 --- Ticket Status By Version New or OpenResolved --- Requestors with most open tickets Paul Cochrane 254 Will Coleda61 Patrick R. Michaud 33 chromatic 31 Jerry Gay 28 James Keenan 24 Klaas-Jan Stol 19 Mark Glines19 Bernhard Schmalhofer 15 Allison Randal 11 --- * Total Issues * New Issues * Overview of Open Issues * Ticket Status By Version * Requestors with most open tickets --- This page is CPU intensive to create, it will be updated only once every 30 minutes
Re: I need Windows OpenGL headers for study/testing
2008/5/19 Geoffrey Broadwell <[EMAIL PROTECTED]>: > Thanks to tetragon++, I've now got OpenGL header parsing (mostly) > working on both Debian Linux/i386 and Mac OS X 10.5. Now I need headers > for Windows to continue the porting work. > > For each of MSVC, MinGW, and cygwin, I need: > > 1. Path globs [1] for all OpenGL headers, in the form > '/path/to/dir1/*.h', '/path/to/dir2/*.h' > > 2. A tarball or zip archive of all of these headers > > Any volunteers who can send me the above for one or more of the Windows > compiler environments? > > Thanks in advance! > > > -'f > > [1] No really, I need the full path globs. I'm actually parsing the > headers myself, not just trying to get C code to compile. :-) The cygwin paths are here: http://cygwin.com/cgi-bin2/package-cat.cgi?file=opengl%2Fopengl-1.1.0-8-src&grep=opengl To download the src choose a cygwin mirror. The filename is opengl/opengl-1.1.0-8-src.tar.bz2 http://repo.fedoramd.org/mirrors/cygwin/release/opengl/opengl-1.1.0-8-src.tar.bz2 for example -- Reini Urban http://phpwiki.org/ http://murbreak.at/
[perl #54428] [CAGE] [PATCH] Static function rebuild_attrib_stuff is never used
Applied in r27644, thanks! Pm
[perl #54448] unicode and macosx
# New Ticket Created by Stephane Payrard # Please include the string: [perl #54448] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=54448 > On a macintel 10.5 I have some problem with unicode. unicode characters are not recognized as such. See the rakudo test below The configuring phase gives : Determining whether ICU is installed...yes. The compiling phase finish with an error but it apprently causes no problems except I can't run 'make test' because of the dependance on a successful compilation. ar: blib/lib/libparrot.a is a fat file (use libtool(1) or lipo(1) and ar(1) on it) ar: blib/lib/libparrot.a: Inappropriate file type or format make: *** [blib/lib/libparrot.a] Error 1 rakudo is generated without problem But the following test fails. I pasted the content of the literal string with a character that emacs says to be #x8a0 > my $s = " "; say $s.chars # $s == "\x8a0" 2 I expected one. -- cognominal stef
Re: [perl #54448] unicode and macosx
On Mon, May 19, 2008 at 10:29:29AM -0700, Stephane Payrard wrote: > But the following test fails. I pasted the content of the literal > string with a character that emacs says to be #x8a0 > > > my $s = " "; say $s.chars # $s == "\x8a0" > 2 > > I expected one. Because Parrot's primary support for unicode is utf-8 encoding, and because utf-8 greatly slows down parsing of long strings (such as program source code), we've elected for the time being to have rakudo use "fixed8" for its default input encoding. When Parrot becomes faster at processing unicode strings, we'll likely switch the default to utf8.(*) This doesn't mean that unicode can't be used in rakudo programs, though. One can always encode the character explicitly: $ ./parrot perl6.pbc > my $s = "€"; say $s.chars; # doesn't work 3 > my $s = "\x20ac"; say $s.chars; # works 1 Also, rakudo understands the --encoding=utf8 option to specify that the source code is coming in as UTF-8: $ ./parrot perl6.pbc --encoding=utf8 > my $s = "€"; say $s.chars; # works 1 For now I'll mark this ticket as "stalled", awaiting faster Parrot unicode support or a decision that we're going to live with slower parsing of source code. Thanks! Pm (*) Another option we might have could be to default to utf8 and transcode to ucs2 on platforms that have ICU present (which can be faster), but stay at a fixed8 default for systems without ICU. But at this stage I think consistency and explicit options are better, otherwise people will be confused as to why a particular program works on some systems but not others.
[perl #54454] [CAGE] [PATCH] static function parrot_class_register is never used
Applied in r27648, thanks! Pm
[perl #48513] [TODO][PCT] Use of int registers in PCT.
On Wed Dec 12 06:07:47 2007, kjs wrote: > It would be helpful if PCT knew how to handle integer registers if needed. > > A typical example is for using the "isgt" or any other isXX op: > > a = 1 > b = 2 > $I0 = isgt a, b # returns 0, as 1 is not greater than 2 > > > In PCT this is helpful, if you want to translate a HLL statement like this: > > if a > b then {some thing you want to do if a > b } > > This can then be compiled to: > > $I0 = isgt a, b > if $I0 goto _then123 This is now possible as of r27505. Opcodes in %piropsig are able to specify "I" as the return value type, which means that the opcode is to return its value into a unique I register. The "pirop" attribute of PAST::Op nodes is also able to override the signature to be used for a given opcode. For example, a string comparison can be specified as :pirop("isgt ISs") which coerces the operands into string values before executing the opcode and returning the result in an I register. By contrast, :pirop("isgt INn") will coerce the operands to num values before performing the opcode. The other nodes all understand various register mappings -- for example, an "if" or other conditional node will use an I, S, or N register directly if that's ultimately shorter than converting to a PMC first. As an example, here's the difference in PIR code generated for "if $x == 'hello' { say(1); }" before and after the changes in r27505: r27504: ... find_lex $P14, "$x" unless_null $P14, vivify_22 new $P14, "Undef" vivify_22: new $P15, "String" assign $P15, "hello" ## inline infix:eq $S0 = $P14 $S1 = $P15 $I0 = iseq $S0, $S1 $P16 = new 'Integer' $P16 = $I0 if $P16, if_13 goto if_13_end if_13: get_global $P20, "_block17" newclosure $P20, $P20 $P19 = $P20() if_13_end: r27505: ... find_lex $P15, "$x" unless_null $P15, vivify_10 new $P15, "Undef" vivify_10: set $S16, $P15 iseq $I17, $S16, "hello" unless $I17, if_14_end get_global $P10, "_block18" newclosure $P10, $P10 $P10() if_14_end: Note that as of r27505 we avoid the creation of an extra String PMC for the 'hello' constant, the Integer PMC for the result of the 'isgt' opcode, and the extra 'goto' in the "else" portion of the test. Optimizing something like $I0 = iseq $S0, $S1 if $I0 goto label1 to eq $S0, $S1, label1 is left as an optimization for a later stage (probably either in POST or IMCC). For now, if anyone wants more details about this, the best place to look is at the changes that occurred in NQP in r27505. I expect to be writing more about this feature in PDD26 and on my use.perl journal in the next few days. Thanks! Pm
Re: [perl #54444] AutoReply: [rakudo] 'No such caller depth' with pure perl mod_perl6
On Mon, 19 May 2008, Parrot via RT wrote: while converting mod_perl6 from PIR to pure perl6, i encountered the following error when running a handler: No such caller depth current instr.: 'parrot;ModParrot;HLL;perl6;handler' pc 62 (EVAL_13:46) i tracked down the error to this block in perl6's actions.pm: unless $?BLOCK.symbol('$/') { $init.push( PAST::Var.new( :name('$/'), :isdecl(1) ) ); $?BLOCK.symbol( '$/', :scope('lexical') ); $init.push( PAST::Op.new( :inline( "%r = getinterp\n" ~ "%r = %r['lexpad';1]\n" ~ "if null %r goto no_match_to_copy\n" ~ "%r = %r['$/']\n" ~ "store_lex '$/', %r\n" ~ " no_match_to_copy:\n" ) ) ); } this code assumes there is a previous call frame which might contain a lexpad, which is always true when called from PIR or the PCT command line. however, in a pure perl mod_perl6, a perl6 sub is called directly from C, and therefore lives in the top level call frame. any reference to the nonexistent previous frame using the interpreter object bombs out. you can reproduce this problem in pure PIR with this: .sub main :main $P0 = getinterp $P1 = $P0['lexpad';1] .end if we want perl6 subs to be directly invokable from an embedded environemnt, we either need to teach perl6 to be smarter about this or change how parrot handles this kind of exception. -jeff After further investigation, it looks like the parrotinterpreter PMC is validating caller depth before looking up the keyed item. So for $P0['lexpad';1] it verifies there's a call frame 1 level up before doing anything else. A backtrace reveals that the exception occurs at parrotinterpreter.pmc:426: if (!ctx->current_sub) real_exception(interp, NULL, E_ValueError, "No such caller depth"); So it *does* find a valid context one level up, but no current_sub since we're calling from C. Is it necessary for this to be fatal? Should we return NULL here instead of bombing out?
[perl #54478] [RFE] trace should be a number that can be decremented and incremented
# New Ticket Created by Stephane Payrard # Please include the string: [perl #54478] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=54478 > Request for enhancement: At the PIR level, trace should be a number that can be decremented and incremented with two new opcodes inc_trace and dec_trace. trace mode would be active when the trace variable is strictly positive. This is useful for tracing recursive calls. A :trace flag should be implemented for routine and methods to prepend inc_trace and append dec_trace. A the Perl6 level, this could be a trait 'is :pirtrace' and and 'is :pirtrace. for functions and methods. :pirtrace would cause subcalls to be wrapped: trace 0; subcall(); trace 1. :pirtrace would cause a whole method function PIR code wrapped by inc_trace and dec_trace. -- cognominal stef
Re: [perl #54478] [RFE] trace should be a number that can be decremented and incremented
On Mon, May 19, 2008 at 03:29:33PM -0700, Stephane Payrard wrote: > # New Ticket Created by Stephane Payrard > # Please include the string: [perl #54478] > # in the subject line of all future correspondence about this issue. > # http://rt.perl.org/rt3/Ticket/Display.html?id=54478 > > > Request for enhancement: > [...] > > A the Perl6 level, this could be a trait 'is :pirtrace' and and > 'is :pirtrace. for functions and methods. > :pirtrace would cause subcalls to be wrapped: trace 0; subcall(); trace 1. > :pirtrace would cause a whole method function PIR code wrapped by > inc_trace and dec_trace. Rakudo already offers a "trace" builtin that enables/disables tracing in Parrot. I'm not sure it needs to be a trait. One can implement the equivalent of inc_trace and dec_trace in rakudo with something like: our $tracevalue = 0; sub inc_trace { our $tracevalue; $tracevalue++; trace(1); } sub dec_trace { our $tracevalue; $tracevalue-- if $tracevalue > 0; trace($tracevalue > 0); } Pm
[perl #54384] [BUG] [PATCH] split opcode gives "failed assertion" when source string is null
> The split opcode gives "failed assertion 's'" when given a > null string argument. Perhaps it should pretend it got the > null string, or at least throw a more "normal" exception. A problem is that the string_split functions declares his parameter as non null. This function is used in several pmc, so chnaging his signature risk to break things or slow down. This patch creates a new function called Parrot_split_string and uses it in the opcode instead of split_string. It returns PMCNULL if the string or the deilimiter argument is NULL, and calls split_string otherwise. -- Salu2 Index: src/ops/string.ops === --- src/ops/string.ops (revisión: 27651) +++ src/ops/string.ops (copia de trabajo) @@ -452,7 +452,7 @@ } op split(out PMC, in STR, in STR) :base_core { -$1 = string_split(interp, $2, $3); +$1 = Parrot_string_split(interp, $2, $3); } Index: src/string.c === --- src/string.c (revisión: 27651) +++ src/string.c (copia de trabajo) @@ -2933,6 +2933,31 @@ /* +=item C + +Split a string with a delimiter. +Returns PMCNULL if the string or the delimiter is NULL, +else is the same as string_split. + +=cut + +*/ + +PARROT_API +PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL +PMC* +Parrot_string_split(PARROT_INTERP, +ARGIN_NULLOK(STRING *delim), ARGIN_NULLOK(STRING *str)) +{ +if (! delim || ! str) +return PMCNULL; +else +return string_split(interp, delim, str); +} + +/* + =item C Returns C converted to a Parrot C. Index: include/parrot/string_funcs.h === --- include/parrot/string_funcs.h (revisión: 27651) +++ include/parrot/string_funcs.h (copia de trabajo) @@ -426,6 +426,14 @@ PARROT_API PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL +PMC* Parrot_string_split(PARROT_INTERP, +ARGIN_NULLOK(STRING *delim), +ARGIN_NULLOK(STRING *str)) +__attribute__nonnull__(1); + +PARROT_API +PARROT_WARN_UNUSED_RESULT INTVAL string_str_index(PARROT_INTERP, ARGIN(const STRING *s), ARGIN(const STRING *s2),
[perl #54454] [CAGE] [PATCH] static function parrot_class_register is never used
# New Ticket Created by NotFound # Please include the string: [perl #54454] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=54454 > The static function parrot_class_register in src/oo.c is never used. This patch removes it. -- Salu2 Index: src/oo.c === --- src/oo.c (revisión: 27646) +++ src/oo.c (copia de trabajo) @@ -97,16 +97,6 @@ static void invalidate_type_caches(PARROT_INTERP, UINTVAL type) __attribute__nonnull__(1); -static void parrot_class_register(PARROT_INTERP, -ARGIN(PMC *name), -ARGIN(PMC *new_class), -ARGIN_NULLOK(PMC *parent), -ARGIN(PMC *mro)) -__attribute__nonnull__(1) -__attribute__nonnull__(2) -__attribute__nonnull__(3) -__attribute__nonnull__(5); - /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ /* HEADERIZER END: static */ @@ -695,125 +685,6 @@ /* -=item C - -This is the way to register a new Parrot class as an instantiable -type. Doing this involves putting it in the class hash, setting its -vtable so that the C method initializes objects of the class rather than -the class itself, and adding it to the interpreter's base type table so -you can create a new C in PASM like this: C. - -=cut - -*/ - -static void -parrot_class_register(PARROT_INTERP, ARGIN(PMC *name), -ARGIN(PMC *new_class), ARGIN_NULLOK(PMC *parent), ARGIN(PMC *mro)) -{ -PMC*vtable_pmc; -const INTVAL new_type = Parrot_oo_register_type(interp, name); - -/* check if we already have a NameSpace */ -PMC *top = CONTEXT(interp)->current_namespace; -PMC *ns = VTABLE_get_pmc_keyed(interp, top, name); - -/* Build a new vtable for this class - * The child class PMC gets the vtable of its parent class or - * a ParrotClass vtable - */ -VTABLE *parent_vtable = -(parent && PObj_is_class_TEST(parent)) -? parent->vtable -: new_class->vtable; - -VTABLE *new_vtable = Parrot_clone_vtable(interp, parent_vtable); - -/* Set the vtable's type to the newly allocated type */ -new_vtable->base_type = new_type; - -/* And cache our class PMC in the vtable so we can find it later */ -new_vtable->pmc_class = new_class; -new_vtable->mro = mro; - -if (parent_vtable->ro_variant_vtable) -new_vtable->ro_variant_vtable = -Parrot_clone_vtable(interp, parent_vtable->ro_variant_vtable); - -/* Reset the init method to our instantiation method */ -new_vtable->init = Parrot_instantiate_object; -new_vtable->init_pmc = Parrot_instantiate_object_init; -new_class->vtable = new_vtable; - -/* Put our new vtable in the global table */ -interp->vtables[new_type] = new_vtable; - -/* RT#45979 nested, use current as base ? */ -if (PMC_IS_NULL(ns)) { -/* RT#45983 try HLL namespace too */ -top = Parrot_get_ctx_HLL_namespace(interp); -ns = VTABLE_get_pmc_keyed(interp, top, name); -} - -if (PMC_IS_NULL(ns)) { -ns = pmc_new(interp, enum_class_NameSpace); -VTABLE_set_pmc_keyed(interp, top, name, ns); -} - -/* attach namespace to vtable */ -new_vtable->_namespace = ns; - -if (new_vtable->ro_variant_vtable) { -VTABLE * const ro_vt = new_vtable->ro_variant_vtable; - -ro_vt->base_type = new_vtable->base_type; -ro_vt->pmc_class = new_vtable->pmc_class; -ro_vt->mro= new_vtable->mro; -ro_vt->_namespace = new_vtable->_namespace; -} - -/* - * prepare object vtable - again that of the parent or - * a ParrotObject vtable - */ -if (parent && PObj_is_class_TEST(parent)) { -vtable_pmc= -get_attrib_num((SLOTTYPE *)PMC_data(parent), PCD_OBJECT_VTABLE); -parent_vtable = (VTABLE *)PMC_struct_val(vtable_pmc); -} -else -parent_vtable = interp->vtables[enum_class_Object]; - -new_vtable = Parrot_clone_vtable(interp, parent_vtable); - -if (parent_vtable->ro_variant_vtable) -new_vtable->ro_variant_vtable = -Parrot_clone_vtable(interp, parent_vtable->ro_variant_vtable); - -new_vtable->base_type = new_type; -new_vtable->mro = mro; -new_vtable->pmc_class = new_class; - -set_attrib_num(new_class, (SLOTTYPE*)PMC_data(new_class), PCD_OBJECT_VTABLE, -vtable_pmc = constant_pmc_new(interp, enum_class_VtableCache)); -PMC_struct_val(vtable_pmc) = new_vtable; - -/* attach namespace to object vtable too */ -new_vtable->_namespace = ns; - -if (new_vtable->ro_variant_vtable) { -VTABLE * const ro_vt = new_vtable->ro_variant_vtable; - -ro_vt->base_type = new_vtable->base_type; -ro_vt->pmc_class = new_vtable->pmc_class; -ro_vt->mro= new_vtable->mro; -ro_vt->_namespace = new_
[perl #54474] [BUG] cmp doesn't works for integers
# New Ticket Created by Vasily Chekalkin # Please include the string: [perl #54474] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=54474 > Parrot's op cmp doesn't work for integers. $ cat v.pir .sub main :main $P99 = subclass 'Integer', 'Int' .local pmc a, b a = new 'Int' a = 1 b = new 'Int' b = 2 $I0 = cmp a, b say $I0 $I0 = cmp b, a say $I0 .end $ ./parrot v.pir 1 1 $ Expected results -1 1 (Thanks to pmichaud for clean version of test case)
[perl #52222] [BUG] Test 3 of t/dynoplibs/myops.t crashes with a bus error
The opcode tested crash parrot intentionally, a crash is the intended result, not a bug.
[perl #54444] [rakudo] 'No such caller depth' with pure perl mod_perl6
# New Ticket Created by Jeff Horwitz # Please include the string: [perl #5] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=5 > while converting mod_perl6 from PIR to pure perl6, i encountered the following error when running a handler: No such caller depth current instr.: 'parrot;ModParrot;HLL;perl6;handler' pc 62 (EVAL_13:46) i tracked down the error to this block in perl6's actions.pm: unless $?BLOCK.symbol('$/') { $init.push( PAST::Var.new( :name('$/'), :isdecl(1) ) ); $?BLOCK.symbol( '$/', :scope('lexical') ); $init.push( PAST::Op.new( :inline( "%r = getinterp\n" ~ "%r = %r['lexpad';1]\n" ~ "if null %r goto no_match_to_copy\n" ~ "%r = %r['$/']\n" ~ "store_lex '$/', %r\n" ~ " no_match_to_copy:\n" ) ) ); } this code assumes there is a previous call frame which might contain a lexpad, which is always true when called from PIR or the PCT command line. however, in a pure perl mod_perl6, a perl6 sub is called directly from C, and therefore lives in the top level call frame. any reference to the nonexistent previous frame using the interpreter object bombs out. you can reproduce this problem in pure PIR with this: .sub main :main $P0 = getinterp $P1 = $P0['lexpad';1] .end if we want perl6 subs to be directly invokable from an embedded environemnt, we either need to teach perl6 to be smarter about this or change how parrot handles this kind of exception. -jeff
Re: [perl #52222] [BUG] Test 3 of t/dynoplibs/myops.t crashes with a bus error
On Mon, May 19, 2008 at 5:17 PM, NotFound via RT <[EMAIL PROTECTED]> wrote: > The opcode tested crash parrot intentionally, a crash is the intended > result, not a bug. It should be pointed out that this is not a serious opcode. ISTR we tried to squeeze it in for an April Fool's some years ago; there was no real purpose behind it (nothing educational). Unless we can come up with a reason to keep it, I would not be sad to see it go. -- Will "Coke" Coleda
[perl #54478] [RFE] trace should be a number that can be decremented and incremented
On Mon May 19 15:29:33 2008, cognominal wrote: > Request for enhancement: > > At the PIR level, trace should be a number that can be decremented > and incremented with two new opcodes > inc_trace and dec_trace. trace mode would be active when the trace > variable is strictly positive. This is useful > for tracing recursive calls. There are already multiple meanings for various positive trace levels; see, for example, 'trace 1' vs 'trace 4' vs. the and-itive 'trace 5'. > A :trace flag should be implemented for routine and methods to > prepend inc_trace and append dec_trace. I would prefer to see a more generic mechanism that allowed us to add pre- and post- sub execution hooks. (Tcl needs this to be feature complete anyway); You could then wrap up sub invocation with this mechanism to get your desired effect.