[perl #56440] [PATCH] printf functions in extend.c
Applied in r29171
[perl #54384] [BUG] split opcode gives "failed assertion" when source string is null
Patch applied in r29201, keep ticket open for some days.
[perl #56110] [CAGE] Warnings on Solaris
Closing ticket
[perl #56750] [PATCH] Function Parrot_string_empty to create emtpy strings
After some discussion on irc, rejected, it only hides problems.
[perl #56678] [PATCH] DOD_registry initialization
Applied in r29250
[perl #54384] [BUG] split opcode gives "failed assertion" when source string is null
Hearing no objections, ticket closed.
[perl #39930] [BUG] concat unicode+iso-8859-1 doesn't work w/o ICU
Closing ticket
[perl #50092] [TODO] pct - explicit transcode in PCT::Grammar::string_literal
Closing ticket
[perl #56542] [PATCH] rename disassemble to pbc_disassemble
fperraud fixed an issue in lib/Parrot/Docs/Section/C.pm in r29329 Closing ticket
[perl #56678] [PATCH] DOD_registry initialization
Closing ticket
[perl #56868] [PATCH] Another attempt to add a function for empty const string
The const string bug has been solved, so this patch is less useful. Also, some benchmarking shows no significant improvements. So, ticket rejected.
[perl #39669] [TODO] No PIR Compiler Available for Embedded Parrot
imcc_init is now called during interpreter initialization. Does that solve this problem?
[perl #41827] ICU endian issues causing test failures.
On Mie. Mar. 14 11:46:38 2007, [EMAIL PROTECTED] wrote: > I keep getting a test failure on t/op/stringu.t with test 25 on > ppc-darwin(and likely all big endian systems with icu installed). > Parrot outputs "\x00A\x00B" when the test expects "A\x00B\x00" to be > printed. Is this still a problem? Recent changes makes that the expected output of a test like that is utf8 and then endianess independent, but don't know if there are others with utf16 or ucs2 output.
[perl #44811] Abort in t/op/string.t 91 with JIT on x86
This problem is fixed by other similar problem whose ticket was not linked to this. r29358 unskip the test. Closing ticket.
[perl #39669] [TODO] No PIR Compiler Available for Embedded Parrot
Comments on irc confirms the problems are solved. Closing ticket.
[perl #56558] [PATCH] pdb rename to parrot_pdb
Added NEWS entry in r29587. Closing ticket.
[perl #57476] [pdb] parrot version
Closing ticket.
[perl #46109] [TODO] Where does string get freed in PDB_get_command()?
Solved in r30203, debugger command line buffers are now created and destroyed during creation and destruction of the debugger instance.
[perl #57930] [BUG] Smolder failure
Fixed
[perl #46121] [TODO] Add while loop to increment through commands correctly in PDB_cond()
Fixed in r30533
[perl #57474] [pdb] parrot debugger segfault
Closing ticket
[perl #58358] parrot_debugger - Undefined com mand: "ñì¶ñì¶"
Fixed in r30537, closing ticket.
[perl #46117] [TODO] Handle command error and print out script line in PDB_script_file()
Done in r30570
[perl #46115] [TODO] Avoid the verbose output in PDB_script_file() or add a -v flag?
Verbose output is now controlled by the 'echo' command. If more debugger output control is needed, create specific tickets.
[perl #46125] [TODO] Verify that register is in range in PDB_check_condition()
Done in r30574
[perl #46119] [TODO] Handle resume opcodes in PDB_next()
PDB_next no longer executes opcodes by himself, now is done in the debugger runloop. Closing ticket.
[perl #58438] [PATCH] nci can't pass NULL string arguments
No objections and no problems, closing ticket.
[perl #53926] [BUG] :optional and :slurpy :named fails when called with :named :flat
Fixed in r30870, added a test in r30900. Closing ticket.
[perl #54860] [BUG] problem with optional named parameters
Added a test in r30902. Closing ticket.
[perl #46457] [BUG][IMCC] long sub invocation with named parameters
The code in this ticket does not parse. Is using obsolete syntax? Can someone provide an updated version?
[perl #58680] [PATCH] new PLATFORM Linux S/390
Applied in r30907, thanks.
[perl #54800] ignoring named arguments if there is an optional positional argument missing
> >rakudo: sub foo($x?, :$y = 2){ say "$x"~"|"~"$y"}; foo(:y(3)); > >exp_evalbot > >OUTPUT[|] > > This appears to be a bug in Parrot (now RT#54860). When that's fixed > this one should be fixed also. RT#54860 is fixed, verified: rakudo: sub foo($x?, :$y = 2){ say "$x"~"|"~"$y"}; foo(:y(3)); OUTPUT[Use of uninitialized value|3]
[perl #51262] [BUG] Segfault in pdump
I've recently commited a fix on null string constants. I think it was the same problem described here. I compiled the pir file and pdumped without a problem, it shows the DATA => NULL my fix introduced. Can you verify the problem is gone?
[perl #55196] [BUG] print/say opcodes have different float precision
> This falls under the I/O PDD, the next milestone. Hold for a couple of > days. I've added it to the tasklist for the milestone: The print and say opcodes had already been changed some weeks ago, now both call PIO_printf on INT and NUM. By the way, now FLOATVAL_FMT is used instead of "%f"
[perl #54220] [BUG] Segfault when iterating with PMCs instead of strings
> It turns out that the namespace was a red herring. The real problem is > that when iterating over a hash, you cannot assign to a PMC register; it > must be a string register. So if the base collection is a hash, this > segfaults: > > $P0 = shift iterator > > But this works fine: > > $S0 = shift iterator > > Of course, segfaulting is still *bad*, so this ticket should remain open > and switch focus to the real problem. Is this still a problem? I do a few tests and all seems to work.
[perl #46667] [TODO] [C] Do we need properties in the default object system?
> This check can be removed from default.pmc. Property values should not > be returned by get_attr_str. Done in r31509
[perl #57690] [BUG] make headerizer breaks build
On Mar. Ago. 12 15:05:57 2008, Whiteknight wrote: > This probably isn't headerizer's fault, it's more likely the fault of > IMCC for being so damn complicated. We could change all the function > definitions in the IMCC related files to use "struct _IMC_Unit" instead > of "IMC_Unit" which would resolve the problem. Alternatively, we could > rearrange the way the header files are ordered/created, and ensure all > function prototypes are included after all data type definitions. Or we can declare the typedef for IMC_Unit in imc.h before the #include of the other imcc headers, with a forward declaration of _IMC_Unit. Done in r31517. Ticket let opened to hear possible problems.
[perl #46083] [TODO] Fix memory leak in src/pmc/parrotio.pmc:open()
Fixed in r31508
[perl #59532] say typeof(namespace) gives a segfault
The problem is that the vtable function get_class return NULL. This is easily fixable, but the root of the problem is that the _class attribute is set in init as PMCNULL, but later it contains NULL.
[perl #46629] [TODO] [C] Implement multiplication of integers with complex numbers
Done in r31684 after MMD changes, adding the test from the previous patch.
[perl #48108] [BUG] downcase opcode fails on unicode strings w/o icu
Updated information: we added recently a workaround to the utf8 downcase function, by moving code already present out of the ICU #if block. This workaround delegates to the ascii downcase when the string has only codepoints in the ascii range (the way used to do that check is debatable, must be revisited during strings pdd work). Extend it to codepoints in the iso-8859-1 range is not so easy, will need to check the string content. Attempt to transcode will be not helpful if the transcode function used also require ICU.
[perl #59630] [BUG] Complex subtraction fails for subclasses of Complex
I've done some work in this problem. The attached patch is a way to make the examples work but I think this is not the way to go, or a lot of functions in a lot of pmc will need changes. Index: src/pmc/complex.pmc === --- src/pmc/complex.pmc (revision 31697) +++ src/pmc/complex.pmc (working copy) @@ -758,14 +758,21 @@ */ MULTI PMC *subtract(Complex value, PMC *dest) { -if (dest) -VTABLE_morph(INTERP, dest, SELF->vtable->base_type); +if (dest) { + if(! VTABLE_isa(INTERP, dest, CONST_STRING(INTERP, 'Complex'))) +VTABLE_morph(INTERP, dest, SELF->vtable->base_type); +} else -dest = pmc_new(INTERP, SELF->vtable->base_type); +dest = VTABLE_clone(INTERP, SELF); -RE(dest) = RE(SELF) - RE(value); -IM(dest) = IM(SELF) - IM(value); - +{ +FLOATVAL re1 = VTABLE_get_number_keyed_int(INTERP, SELF, 0); +FLOATVAL im1 = VTABLE_get_number_keyed_int(INTERP, SELF, 1); +FLOATVAL re2 = VTABLE_get_number_keyed_int(INTERP, value, 0); +FLOATVAL im2 = VTABLE_get_number_keyed_int(INTERP, value, 1); +VTABLE_set_number_keyed_int(INTERP, dest, 0, re1 - re2); +VTABLE_set_number_keyed_int(INTERP, dest, 1, im1 - im2); +} return dest; }
[perl #59544] open(null) kills parrot
Problem fixed and test added, closing ticket.
[perl #60166] [BUG] Exception handling in parrot doesn't unwind stack.
This example fails because the op find_method uses Parrot_ex_throw_from_c_args, that handles the exception in an inner runloop. From an opcode is better to use Parrot_ex_throw_from_op, wich jumps to the handler in the current runloop. I'm working on a patch that defines the helper function Parrot_ex_throw_from_op_args to simplfy the throwing in cases like this. But we still need a way to handle the exceptions thrown from C.
[perl #45977] [TODO] Create all class structures in constant PMC pool
Closed.
[perl #45971] [TODO] Get printable name for real_exception() in fail_if_exist()
Closed.
[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 #54920] [PATCH] Compiling pcc.c on Solaris10-x86
Given that the patch has been applied, and the hcf issue is explained and reflected in #55040, I close this ticket.
[perl #52886] [BUG] including gmp.h causes build break in C++ build
Hearing no opposition, ticket closed.
[perl #55620] [PATCH] Fix crash in src/ops/object.ops
Another attempt: this is a minimalistic change that does not broke any test in parrot nor in rakudo, and can avoid segfaulting in other related usages. Index: src/pmc/namespace.pmc === --- src/pmc/namespace.pmc (revisión: 28239) +++ src/pmc/namespace.pmc (copia de trabajo) @@ -74,6 +74,7 @@ PMC_data(SELF) = mem_allocate_zeroed_typed(Parrot_NameSpace); PARROT_NAMESPACE(SELF)->vtable = PMCNULL; +PARROT_NAMESPACE(SELF)->_class = PMCNULL; } /*
[perl #55620] [PATCH] Fix crash in src/ops/object.ops
On Mie. Jun. 11 06:48:06 2008, bacek wrote: > Trivial reproducible bug: in rakudo 'say 1 ~~ Perl6Scalar'. > > There is patch for src/ops/object.ops I tried another way: less checks, not more. See attached patch. $ ./perl6 -e'say 1 ~~ Perl6Scalar' Null PMC access in invoke() current instr.: 'infix:~~' pc 8890 (src/gen_builtins.pir:5982) called from Sub '_block11' pc 44 (EVAL_12:21) called from Sub 'parrot;PCT::HLLCompiler;eval' pc 783 (src/PCT/HLLCompiler.pir:458) called from Sub 'parrot;PCT::HLLCompiler;command_line' pc 1282 (src/PCT/HLLCompiler.pir:685) called from Sub 'parrot;Perl6::Compiler;main' pc 11068 (perl6.pir:186) Index: src/ops/object.ops === --- src/ops/object.ops (revisión: 28239) +++ src/ops/object.ops (copia de trabajo) @@ -61,18 +61,6 @@ opcode_t *dest = NULL; interp->current_args= current_args; - if (PMC_IS_NULL(method_pmc)) { -PMC * const _class = VTABLE_get_class(interp, object); - -if (PMC_IS_NULL(_class)) -real_exception(interp, next, METH_NOT_FOUND, -"Method '%Ss' not found for non-object", meth); -else -real_exception(interp, next, METH_NOT_FOUND, -"Method '%Ss' not found for invocant of class '%Ss'", meth, -VTABLE_get_string(interp, _class)); - } - interp->current_object = object; interp->current_cont = NEED_CONTINUATION; dest = VTABLE_invoke(interp, method_pmc, next); @@ -104,12 +92,6 @@ opcode_t *dest = NULL; interp->current_args= current_args; - - if (PMC_IS_NULL(method_pmc)) { -real_exception(interp, next, METH_NOT_FOUND, -"Method '%Ss' not found for invocant of class '%Ss'", meth, -VTABLE_get_string(interp, VTABLE_get_class(interp, object))); - } interp->current_object = object; interp->current_cont = $3; dest = (opcode_t *)VTABLE_invoke(interp, method_pmc, next); @@ -137,11 +119,6 @@ opcode_t *dest; - if (PMC_IS_NULL(method_pmc)) { -real_exception(interp, next, METH_NOT_FOUND, -"Method '%Ss' not found for invocant of class '%Ss'", meth, -VTABLE_get_string(interp, VTABLE_get_class(interp, object))); - } interp->current_cont = CONTEXT(interp)->current_cont; PObj_get_FLAGS(interp->current_cont) |= SUB_FLAG_TAILCALL; interp->current_object = object;
[perl #55640] [BUG] [PATCH] oo_get_class segfaults
By chromatic's suggestion, here is a different approach: change pmc_type signature to allow a null string argument, returning enum_type_undef in that case. Other changes in this patch are replacing 0 with enum_type_undef in the same function, and adding a test in t/pmc/namespace.t checking that get_class return a null pmc for the root namespace. This test segfault if the patch is not applied. Index: src/pmc.c === --- src/pmc.c (revisión: 28476) +++ src/pmc.c (copia de trabajo) @@ -422,20 +422,24 @@ PARROT_API PARROT_WARN_UNUSED_RESULT INTVAL -pmc_type(PARROT_INTERP, ARGIN(STRING *name)) +pmc_type(PARROT_INTERP, ARGIN_NULLOK(STRING *name)) { -PMC * const classname_hash = interp->class_hash; -PMC * const item = -(PMC *)VTABLE_get_pointer_keyed_str(interp, classname_hash, name); +if (! name) +return enum_type_undef; +else { +PMC * const classname_hash = interp->class_hash; +PMC * const item = +(PMC *)VTABLE_get_pointer_keyed_str(interp, classname_hash, name); -/* nested namespace with same name */ -if (item->vtable->base_type == enum_class_NameSpace) -return 0; +/* nested namespace with same name */ +if (item->vtable->base_type == enum_class_NameSpace) +return enum_type_undef; -if (!PMC_IS_NULL(item)) -return VTABLE_get_integer(interp, item); +if (!PMC_IS_NULL(item)) +return VTABLE_get_integer(interp, item); -return Parrot_get_datatype_enum(interp, name); +return Parrot_get_datatype_enum(interp, name); +} } /* Index: include/parrot/pmc.h === --- include/parrot/pmc.h (revisión: 28476) +++ include/parrot/pmc.h (copia de trabajo) @@ -82,9 +82,8 @@ PARROT_API PARROT_WARN_UNUSED_RESULT -INTVAL pmc_type(PARROT_INTERP, ARGIN(STRING *name)) -__attribute__nonnull__(1) -__attribute__nonnull__(2); +INTVAL pmc_type(PARROT_INTERP, ARGIN_NULLOK(STRING *name)) +__attribute__nonnull__(1); PARROT_API INTVAL pmc_type_p(PARROT_INTERP, ARGIN(PMC *name)) Index: t/pmc/namespace.t === --- t/pmc/namespace.t (revisión: 28476) +++ t/pmc/namespace.t (copia de trabajo) @@ -6,7 +6,7 @@ use warnings; use lib qw( . lib ../lib ../../lib ); use Test::More; -use Parrot::Test tests => 62; +use Parrot::Test tests => 63; use Parrot::Config; =head1 NAME @@ -1058,6 +1058,20 @@ Found root namespace. OUTPUT +pir_output_is( <<'CODE', <<'OUTPUT', 'root namespace is not a class' ); +.sub main :main +.local pmc root_ns +root_ns = get_root_namespace +.local pmc root_class +root_class = get_class root_ns +.local int is_class +is_class = defined root_class +say is_class +.end +CODE +0 +OUTPUT + pir_output_is( <<'CODE', <<'OUTPUT', 'get_root_namespace "Foo"' ); .sub main :main .local pmc foo_ns
[perl #46669] [TODO] [C] Throw an AttributeError if a PMC is NULL in get_attr_str()
Given the previous comments, and having now some working code that depends of *not* throwing, I will close this ticket in a few days if no one objects.
[perl #39930] [BUG] concat unicode+iso-8859-1 doesn't work w/o ICU
The attached patch changes string_rep_compatible so that when called with utf8_encoding and iso_8859_1_encoding returns utf8. Looks that this solves the problem and breaks nothing. Index: src/string.c === --- src/string.c (revisión: 28527) +++ src/string.c (copia de trabajo) @@ -397,7 +397,8 @@ /* a table could possibly simplify the logic */ if (a->encoding == Parrot_utf8_encoding_ptr && -b->charset == Parrot_ascii_charset_ptr) { +(b->charset == Parrot_ascii_charset_ptr || + b->charset == Parrot_iso_8859_1_charset_ptr)) { if (a->strlen == a->bufused) { *e = Parrot_fixed_8_encoding_ptr; return Parrot_ascii_charset_ptr; @@ -406,7 +407,8 @@ return a->charset; } if (b->encoding == Parrot_utf8_encoding_ptr && -a->charset == Parrot_ascii_charset_ptr) { +(a->charset == Parrot_ascii_charset_ptr || + a->charset == Parrot_iso_8859_1_charset_ptr)) { if (b->strlen == b->bufused) { *e = Parrot_fixed_8_encoding_ptr; return a->charset;
[perl #55960] [BUG] [PATCH] Hash declarations broken in c++ build
This is a cleaner version. Index: src/string.c === --- src/string.c (revisión: 28553) +++ src/string.c (copia de trabajo) @@ -265,7 +265,7 @@ /* Set up the cstring cache, then load the basic encodings and charsets */ if (!interp->parent_interpreter) { parrot_new_cstring_hash(interp, &const_cstring_hash); -interp->const_cstring_hash = (struct Hash *)const_cstring_hash; +interp->const_cstring_hash = (Hash *)const_cstring_hash; Parrot_charsets_encodings_init(interp); } /* initialize the constant string table */ Index: include/parrot/parrot.h === --- include/parrot/parrot.h (revisión: 28553) +++ include/parrot/parrot.h (copia de trabajo) @@ -274,6 +274,7 @@ #define PACKAGE "parrot" #define LOCALEDIR "." +typedef struct _hash Hash; #include "parrot/settings.h" #include "parrot/enums.h" Index: include/parrot/interpreter.h === --- include/parrot/interpreter.h (revisión: 28553) +++ include/parrot/interpreter.h (copia de trabajo) @@ -388,7 +388,7 @@ struct _Caches * caches; /* see caches.h */ STRING **const_cstring_table; /* CONST_STRING(x) items */ -struct Hash *const_cstring_hash; /* cache of const_string items */ +Hash*const_cstring_hash; /* cache of const_string items */ struct QUEUE* task_queue; /* per interpreter queue */ struct _handler_node_t *exit_handler_list;/* exit.c */
[perl #55960] [BUG] [PATCH] Hash declarations broken in c++ build
Forget previous patch, is broken. I'll keep working on it.
[perl #55960] [BUG] [PATCH] Hash declarations broken in c++ build
Another try. Builds and pass tests both with C and C++. Index: src/string.c === --- src/string.c (revisión: 28565) +++ src/string.c (copia de trabajo) @@ -265,7 +265,7 @@ /* Set up the cstring cache, then load the basic encodings and charsets */ if (!interp->parent_interpreter) { parrot_new_cstring_hash(interp, &const_cstring_hash); -interp->const_cstring_hash = (struct Hash *)const_cstring_hash; +interp->const_cstring_hash = (Hash *)const_cstring_hash; Parrot_charsets_encodings_init(interp); } /* initialize the constant string table */ Index: include/parrot/parrot.h === --- include/parrot/parrot.h (revisión: 28565) +++ include/parrot/parrot.h (copia de trabajo) @@ -274,6 +274,7 @@ #define PACKAGE "parrot" #define LOCALEDIR "." +typedef struct _hash Hash; #include "parrot/settings.h" #include "parrot/enums.h" Index: include/parrot/hash.h === --- include/parrot/hash.h (revisión: 28565) +++ include/parrot/hash.h (copia de trabajo) @@ -56,7 +56,7 @@ void *value; } HashBucket; -typedef struct _hash { +struct _hash { HashBucket *bs; /* store of buckets */ HashBucket **bi;/* list of Bucket pointers */ HashBucket *free_list; /* empty buckets */ @@ -69,7 +69,7 @@ updated for each new hash */ hash_comp_fn compare; /* compare two keys, 0 = equal */ hash_hash_key_fn hash_val; /* generate a hash value for key */ -} Hash; +}; /* HEADERIZER BEGIN: src/hash.c */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ Index: include/parrot/interpreter.h === --- include/parrot/interpreter.h (revisión: 28565) +++ include/parrot/interpreter.h (copia de trabajo) @@ -388,7 +388,7 @@ struct _Caches * caches; /* see caches.h */ STRING **const_cstring_table; /* CONST_STRING(x) items */ -struct Hash *const_cstring_hash; /* cache of const_string items */ +Hash*const_cstring_hash; /* cache of const_string items */ struct QUEUE* task_queue; /* per interpreter queue */ struct _handler_node_t *exit_handler_list;/* exit.c */
[perl #46669] [TODO] [C] Throw an AttributeError if a PMC is NULL in get_attr_str()
Rejected TODO item, closing ticket.