[netlabs #653] PATCH: P14[I3] support
# New Ticket Created by Leon Brocard # Please include the string: [netlabs #653] # in the subject line of all future correspondence about this issue. # http://bugs6.perl.org/rt2/Ticket/Display.html?id=653 > This little patchette lets the new shiny assembler cope with using an I register as a PMC key, eg "P14[I3]". Obviously brainf*ck needs to be in the testsuite ;-) roo% cvs diff assemble.pl Index: assemble.pl === RCS file: /cvs/public/parrot/assemble.pl,v retrieving revision 1.58 diff -u -r1.58 assemble.pl --- assemble.pl 3 Jun 2002 04:20:14 - 1.58 +++ assemble.pl 3 Jun 2002 08:05:00 - @@ -701,6 +701,10 @@ $_->[0][0] .= "_ic"; push @{$_->[0]}, ['ic',0+$1]; } + elsif($temp=~s/^\[I(\d+)\]//) { # P14[I3] +$_->[0][0] .= "_i"; +push @{$_->[0]}, ['i',0+$1]; + } elsif($temp=~s/^($bin_re)//) { # 0b1101 my $val = $1;$val=~s/0b//; $_->[0][0] .= "_ic"; Leon -- Leon Brocard.http://www.astray.com/ Nanoware...http://www.nanoware.org/ .. Confucius say: Those who quote me are fools
RE: [netlabs #653] PATCH: P14[I3] support
Leon Brocard: # This little patchette lets the new shiny assembler cope with # using an I register as a PMC key, eg "P14[I3]". Obviously # brainf*ck needs to be in the testsuite ;-) See my comment on a previous, similar patch by Simon Glover. --Brent Dax <[EMAIL PROTECTED]> @roles=map {"Parrot $_"} qw(embedding regexen Configure) blink: Text blinks (alternates between visible and invisible). Conforming user agents are not required to support this value. --The W3C CSS-2 Specification
RE: [netlabs #653] PATCH: P14[I3] support
At 01:29 AM 6/3/2002 -0700, Brent Dax wrote: >Leon Brocard: ># This little patchette lets the new shiny assembler cope with ># using an I register as a PMC key, eg "P14[I3]". Obviously ># brainf*ck needs to be in the testsuite ;-) > >See my comment on a previous, similar patch by Simon Glover. If you are saying we can't use basic integers as keys I don't understand the reason why. -Melvin
[netlabs #655] [PATCH] Squash some warnings on Solaris
# New Ticket Created by David Lloyd # Please include the string: [netlabs #655] # in the subject line of all future correspondence about this issue. # http://bugs6.perl.org/rt2/Ticket/Display.html?id=655 > The casting from const char * to char * make me nervous though... maybe it introduces warnings on other platforms? - D <[EMAIL PROTECTED]>
Re: [netlabs #655] [PATCH] Squash some warnings on Solaris
># New Ticket Created by David Lloyd ># Please include the string: [netlabs #655] ># in the subject line of all future correspondence about this issue. ># http://bugs6.perl.org/rt2/Ticket/Display.html?id=655 > > > >The casting from const char * to char * make me nervous though... maybe it >introduces warnings on other platforms? I would cast the opposite way. dlopen/dlsym can take a const char * so just declare s as const char * s instead. -Melvin Smith IBM :: Atlanta Innovation Center [EMAIL PROTECTED] :: 770-835-6984
Warnings pass the 1 000 mark
This morning's compilation on Solaris 8, with gcc-2.8.1, and with perl-5.8.0-RC1 compiled with -Duse64bitint gave the following 1066 warnings. Many of these are, in fact, due to real, complicated, issues about what integral types to use when, and shouldn't be blindly casted away. Others, however, are not. Once perl-5.8.0 is done, I may have some time to look into some of these. In the meantime, It would be helpful if folks making patches would check that they at least don't make matters worse than they already are. Most of these warnings also show up regularly in the Alpha tinderbox clients, so it's not too hard to check if any have been added recently. A SPARC's not required either -- with the same configuration on x86, I get 921 warnings. Here are today's warnings. This is on a system with INTVAL='long long' (64 bits) but with 32-bit pointers. Casts from pointer to integer are ok, but casts the other way are suspect. (An examination of the surrounding context is necessary.) global_setup.c:23: warning: passing arg 1 of `Parrot_Array_class_init' with different width due to prototype global_setup.c:24: warning: passing arg 1 of `Parrot_PerlUndef_class_init' with different width due to prototype global_setup.c:25: warning: passing arg 1 of `Parrot_PerlInt_class_init' with different width due to prototype global_setup.c:26: warning: passing arg 1 of `Parrot_PerlNum_class_init' with different width due to prototype global_setup.c:27: warning: passing arg 1 of `Parrot_PerlString_class_init' with different width due to prototype global_setup.c:28: warning: passing arg 1 of `Parrot_PerlArray_class_init' with different width due to prototype global_setup.c:29: warning: passing arg 1 of `Parrot_PerlHash_class_init' with different width due to prototype global_setup.c:30: warning: passing arg 1 of `Parrot_ParrotPointer_class_init' with different width due to prototype global_setup.c:31: warning: passing arg 1 of `Parrot_IntQueue_class_init' with different width due to prototype interpreter.c:484: warning: passing arg 1 of `mem_sys_allocate' with different width due to prototype interpreter.c:506: warning: passing arg 2 of `pmc_new' with different width due to prototype interpreter.c:588: warning: passing arg 3 of `string_make' with different width due to prototype interpreter.c:588: warning: passing arg 5 of `string_make' with different width due to prototype interpreter.c:590: warning: passing arg 3 of `string_make' with different width due to prototype interpreter.c:590: warning: passing arg 5 of `string_make' with different width due to prototype core.ops:89: warning: cast to pointer from integer of different size core.ops:113: warning: passing arg 3 of `string_make' with different width due to prototype core.ops:113: warning: passing arg 5 of `string_make' with different width due to prototype core.ops:133: warning: cast from pointer to integer of different size core.ops:133: warning: cast from pointer to integer of different size core.ops:143: warning: cast from pointer to integer of different size core.ops:143: warning: cast from pointer to integer of different size core.ops:143: warning: cast from pointer to integer of different size core.ops:143: warning: cast from pointer to integer of different size core.ops:171: warning: cast to pointer from integer of different size core.ops:174: warning: passing arg 3 of `string_make' with different width due to prototype core.ops:174: warning: passing arg 5 of `string_make' with different width due to prototype core.ops:171: warning: cast to pointer from integer of different size core.ops:174: warning: passing arg 3 of `string_make' with different width due to prototype core.ops:174: warning: passing arg 5 of `string_make' with different width due to prototype core.ops:201: warning: passing arg 2 of `string_ord' with different width due to prototype core.ops:201: warning: passing arg 2 of `string_ord' with different width due to prototype core.ops:273: warning: cast to pointer from integer of different size core.ops:273: warning: cast to pointer from integer of different size core.ops:273: warning: cast to pointer from integer of different size core.ops:273: warning: cast to pointer from integer of different size core.ops:288: warning: cast to pointer from integer of different size core.ops:288: warning: cast to pointer from integer of different size core.ops:288: warning: cast to pointer from integer of different size core.ops:288: warning: cast to pointer from integer of different size core.ops:304: warning: cast to pointer from integer of different size core.ops:304: warning: cast to pointer from integer of different size core.ops:304: warning: cast to pointer from integer of different size core.ops:304: warning: cast to pointer from integer of different size core.ops:323: warning: cast to pointer from integer of different size core.ops:323: warning: cast to pointer from integer of different size core.ops:349: warning: passing arg
[netlabs #656] [PATCH] Better patch to plug warnings
# New Ticket Created by David Lloyd # Please include the string: [netlabs #656] # in the subject line of all future correspondence about this issue. # http://bugs6.perl.org/rt2/Ticket/Display.html?id=656 > Replaces my previous patch. This essentially changes the Parrot_dlsym funcs to take a const char * for the symbol, which is more consistant with the way that dlsym works anyway (at least on *NIX), thereby eliminating warnings in core.ops (under the loadlib stuff). Also adds in the (void *) cast that gets rid of zillion-line warnings that solaris CC likes to hand out in such cases. - D <[EMAIL PROTECTED]>
Fixing up PMC vtables
Okay, a little while back I updated the vtable PDD. Anyone care to take on the task of getting the PMC class files and the .pmc processor up to snuff? -- Dan --"it's like this"--- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even Perl class: stemsystems.com/class teddy bears get drunk
[netlabs #657] [PATCH] Change BIGINT/BIGFLOAT to BIGNUM
# New Ticket Created by David Lloyd # Please include the string: [netlabs #657] # in the subject line of all future correspondence about this issue. # http://bugs6.perl.org/rt2/Ticket/Display.html?id=657 > Start to mutate vtables into something vaguely conforming to PDD02. This one nukes BIGINT and BIGFLOAT and replaces with BIGNUM, fixing a couple warnings in process. - D <[EMAIL PROTECTED]>
Re: [netlabs #648] [PATCH] keyed ops renaming
># New Ticket Created by Simon Glover ># Please include the string: [netlabs #648] ># in the subject line of all future correspondence about this issue. ># http://bugs6.perl.org/rt2/Ticket/Display.html?id=648 > > > > > The patch below renames the set_keyed and get_keyed ops simply to set, > as Jeff suggested, as well as documenting them (slightly). It also > adjusts the tests accordingly. All tests still pass. > > Simon Applied, thanks. (with a perl -p -i -e 's/[gs]et_keyed/set/' *.t first) Daniel Grunblatt.
Re: [netlabs #650] [PATCH] Assembler documentation tweaks
On 1 Jun 2002, Simon Glover wrote: > # New Ticket Created by Simon Glover > # Please include the string: [netlabs #650] > # in the subject line of all future correspondence about this issue. > # http://bugs6.perl.org/rt2/Ticket/Display.html?id=650 > > > > > A few small fixes to the assembler documentation. NB This patch assumes > that my previous keyed ops renaming patch has been applied. > > Simon Applied, thanks.
New assembler problem, with fix.
I'm not at a system where diff/patch runs, but here's a fix for you. In _string_constant you're trying to expand \n and friends with: $constant = eval "qq($constant)"; This breaks if the token ) appears in $constant. Changing () to anything else breaks if that anything else is in the string too. After thinking on this long and hard, here's a replacement bit of code: local $_=substr($constant,0,1); $constant =~ s/\$/\\\$/g; $constant = $_ . eval("qq$constant") . $_; warn "Constant: $@ " if $@; This uses the constant's own delimiter (" or even ') as the delimiter for the eval. It also escapes $'s so that things like $a don't interpolate or cause other errors. (I suppose @ should be guarded against too. Ah well..) With this fix and the recently committed changes I made to BASIC... it now compiles and runs fine.
Re: New assembler problem, with fix.
Clinton A Pierce wrote: > > I'm not at a system where diff/patch runs, but here's a fix for you. In > _string_constant you're trying to expand \n and friends with: > > $constant = eval "qq($constant)"; > > This breaks if the token ) appears in $constant. Changing () to anything > else breaks if that anything else is in the string too. > > After thinking on this long and hard, here's a replacement bit of code: > >local $_=substr($constant,0,1); >$constant =~ s/\$/\\\$/g; >$constant = $_ . eval("qq$constant") . $_; >warn "Constant: $@ " if $@; Testing right now, if it passes tests I'll commit it. Many thanks. -- Jeff <[EMAIL PROTECTED]><[EMAIL PROTECTED]>
Re: [COMMIT] New Assembler in place
Melvin Smith wrote: > > At 02:25 PM 6/1/2002 -0400, Clinton A. Pierce wrote: > >Looks great. Converted over with little sweat, noted below. > > Moving in the right direction. mandelbrot.cola -> mandel.pasm > > Old assembler: > > time assemble.pl mandel.pasm > mandel.pbc | grep real > real0m0.390s > > New assembler: > > time ./assemble.pl mandel.pasm > mandel.pbc | grep real > real0m0.147s > > Thats about 37% of the old assemble time. Yay! I wasn't intending to make it faster than the original, but I'm glad that it worked out nicely. After the final patches are in place, we'll do a round or so of testing and get ready for release. -- Jeff <[EMAIL PROTECTED]><[EMAIL PROTECTED]>
Re: New assembler problem, with fix.
Jeff wrote: > > Clinton A Pierce wrote: > > > > I'm not at a system where diff/patch runs, but here's a fix for you. In > > _string_constant you're trying to expand \n and friends with: > > > > $constant = eval "qq($constant)"; > > > > This breaks if the token ) appears in $constant. Changing () to anything > > else breaks if that anything else is in the string too. > > > > After thinking on this long and hard, here's a replacement bit of code: > > > >local $_=substr($constant,0,1); > >$constant =~ s/\$/\\\$/g; > >$constant = $_ . eval("qq$constant") . $_; > >warn "Constant: $@ " if $@; > > Testing right now, if it passes tests I'll commit it. > Many thanks. > -- > Jeff <[EMAIL PROTECTED]><[EMAIL PROTECTED]> Committed, with thanks. -- Jeff <[EMAIL PROTECTED]><[EMAIL PROTECTED]>
[netlabs #658] Disassembler will not disassemble BASIC
# New Ticket Created by "Clinton A. Pierce" # Please include the string: [netlabs #658] # in the subject line of all future correspondence about this issue. # http://bugs6.perl.org/rt2/Ticket/Display.html?id=658 > The disassembler will take apart small .pbc files, but will not tackle BASIC's pbc. I don't think I've actually posted a real bug for this (just whined before) so here it is. The error generated is: C:\projects\parrot\parrot>disassemble.pl languages\BASIC\basic.pbc Use of uninitialized value in modulus (%) at lib/Parrot/Types.pm line 102, line 11. Use of uninitialized value in addition (+) at lib/Parrot/Types.pm line 103, line 11. Use of uninitialized value in substr at lib/Parrot/Types.pm line 105, line 11. PackFile::ConstTable: Internal error: Unpacked Constant returned bad byte count '52'! at lib/Parrot/ PackFile/ConstTable.pm line 73 Parrot::PackFile::ConstTable::unpack('Parrot::PackFile::ConstTable=HASH(0x1d3d334)', 'l^@^@^ @s^@^@^@^T^@^@^@^@^@^@^@^@^@^@^@^A^@^@^@^A^@^@^@-^@^@^@s^@^@^@^T^@^@^@^@^@^@^@^@^@^@^@^A^@^@^@^A^@^@ ^@A^@^@^@s^@^@^@...') called at lib/Parrot/PackFile.pm line 226 Parrot::PackFile::unpack('Parrot::PackFile=HASH(0x1d3d358)', '^D^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@M-!U1^ALREP^@^@^@^@M-h^N^@^@l^@^@^@s^@^@^@^T^@^@^@^@^@^@^@^@^@^@^@^A^@^@^@^A^@^@^@-^@^@^@...') cal led at lib/Parrot/PackFile.pm line 283 Parrot::PackFile::unpack_filehandle('Parrot::PackFile=HASH(0x1d3d358)', 'FileHandle=GLOB(0x1 d3d418)') called at lib/Parrot/PackFile.pm line 299 Parrot::PackFile::unpack_file('Parrot::PackFile=HASH(0x1d3d358)', 'languages\BASIC\basic.pbc ') called at C:\projects\parrot\parrot\disassemble.pl line 248 main::disassemble_file('languages\BASIC\basic.pbc') called at C:\projects\parrot\parrot\disa ssemble.pl line 284 To recreate the error, run the basic.pl script, QUIT out of BASIC and then attempt to disassemble the basic.pbc file.