DBCS versus skip_backward
Whilst attempting to implement DBCS encoding, I have discovered that skip_backward cannot be implemented for this encoding style, due to the mixture of 1-byte and 2-byte characters. Some of the available options: 1) Throw an exception if somebody tries to skip_backward in a DBCS string 2) Standardise on a single Unicode format for all internal string processing 3) Convert all strings in DBCS encoding to another format, either always or only when skip_backward is invoked 4) Pass additional context information to skip_backward, so it can fall back to counting forward when required 5) Remove skip_backward completely 6) Do not support DBCS encoding 7) Create an index for DBCS strings (i.e. a map of character offset versus byte offset) - this would also require that skip_backward receive additional data More options, preferences, comments, etc all welcome. Regards Peter Gibbs EmKel Systems
[perl #24391] [PATCH] P6C closures use 'newsub' instead of assigning integer address
# New Ticket Created by Allison Randal # Please include the string: [perl #24391] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt2/Ticket/Display.html?id=24391 Several tests in t/compiler/call.t were failing with the error: set_integer_native() not implemented in class 'Sub' and t/compiler/exceptions.t with the error: set_integer_native() not implemented in class 'Continuation' These are resolved by using the 'newsub' syntax instead of assigning an integer address to the Sub/Continuation PMCs. Allison -- attachment 1 -- url: http://rt.perl.org/rt2/attach/66978/49979/bb19f7/p6c_newsub_syntax.patch Index: languages/perl6/P6C/IMCC.pm === RCS file: /cvs/public/parrot/languages/perl6/P6C/IMCC.pm,v retrieving revision 1.28 diff -d -u -r1.28 IMCC.pm --- languages/perl6/P6C/IMCC.pm 13 Oct 2003 17:00:41 - 1.28 +++ languages/perl6/P6C/IMCC.pm 3 Nov 2003 00:38:07 - @@ -1868,10 +1868,8 @@ # Create a closure. set_function($ofunc); $ret = newtmp 'Sub'; - my $itmp = gentmp 'int'; code(END); - $itmp = addr _$name - $ret = $itmp + newsub $ret, .Sub, _$name END $ret = scalar_in_context($ret, $x-{ctx}); } Index: languages/perl6/P6C/IMCC/prefix.pm === RCS file: /cvs/public/parrot/languages/perl6/P6C/IMCC/prefix.pm,v retrieving revision 1.17 diff -d -u -r1.17 prefix.pm --- languages/perl6/P6C/IMCC/prefix.pm 13 Oct 2003 17:00:48 - 1.17 +++ languages/perl6/P6C/IMCC/prefix.pm 3 Nov 2003 00:38:07 - @@ -747,14 +747,12 @@ my $catch; my $result; my $ret = gentmp 'pmc'; -my $addr = newtmp 'int'; if ($catcher) { $catch = genlabel 'catch'; $label = $catch; } code(END); - $addr = addr $label - $cont = $addr + newsub $cont, .Continuation, $label find_lex $subtmp, install_catch .pcc_begin non_prototyped .arg $cont
[perl #24392] [PATCH] P6C xor really does return a value
# New Ticket Created by Allison Randal # Please include the string: [perl #24392] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt2/Ticket/Display.html?id=24392 This patch changes the test instead of the code. The code is actually correct. (We decided earlier this year that xor should be consistent with the other binary logical operators and return the value of the operand when it evalates as true.) The symbol '~~' is out-of-date, it should be '^^' now, but that's better fixed in one sweeping operator update patch. This is the last failing test except for the regex tests. I'm leaving that section assuming Steve's changes will make it obsolete. Allison -- attachment 1 -- url: http://rt.perl.org/rt2/attach/66980/49982/ee2905/p6c_xor_returns_value.patch Index: languages/perl6/t/compiler/basic.t === RCS file: /cvs/public/parrot/languages/perl6/t/compiler/basic.t,v retrieving revision 1.1 diff -d -u -r1.1 basic.t --- languages/perl6/t/compiler/basic.t 13 Oct 2003 17:00:57 - 1.1 +++ languages/perl6/t/compiler/basic.t 3 Nov 2003 01:32:16 - @@ -154,8 +154,8 @@ 0 -1 -1 +2 +2 0 0 0
Strings PDD
In an attempt to understand what the plan is with regard to ICU and Parrot strings in general, I've been gathering together links to previous bits of discussion on: http://www.vendian.org/parrot/wiki/bin/view.cgi/Main/ ParrotDistributionUnicodeSupport Obviously what is still needed is a Strings PDD. I wonder could we write it interactively on the wiki? Mike On 3 Nov 2003, at 11:17, Peter Gibbs wrote: Whilst attempting to implement DBCS encoding, I have discovered that skip_backward cannot be implemented for this encoding style, due to the mixture of 1-byte and 2-byte characters. Some of the available options: 1) Throw an exception if somebody tries to skip_backward in a DBCS string 2) Standardise on a single Unicode format for all internal string processing 3) Convert all strings in DBCS encoding to another format, either always or only when skip_backward is invoked 4) Pass additional context information to skip_backward, so it can fall back to counting forward when required 5) Remove skip_backward completely 6) Do not support DBCS encoding 7) Create an index for DBCS strings (i.e. a map of character offset versus byte offset) - this would also require that skip_backward receive additional data More options, preferences, comments, etc all welcome. Regards Peter Gibbs EmKel Systems
[perl #24396] FAIL parrot-0.0.13 MSWin32-x86-multi-thread
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #24396] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt2/Ticket/Display.html?id=24396 ... t\src\io..NOK 9# Failed test (t\src\io.t at line 242) # got: 'temp.file should have opened # temp.file should have opened # temp.file + should have opened # temp.file + should have opened # does_not_exist should have opened # does_not_exist + should have opened # does_not_exist + should have opened # done # ' # expected: 'done # ' t\src\io..NOK 10# Failed test (t\src\io.t at line 293) # got: 'should have read . not .#9786;/done # ' # expected: 'done # ' t\src\io..ok 16/16# Looks like you failed 2 tests of 16. t\src\io..dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 9-10 Failed 2/16 tests, 87.50% okay (less 1 skipped test: 13 okay, 81.25%) t\src\listok t\src\manifestok 2/4 skipped: No CVS version t\src\sprintf.ok Failed Test Stat Wstat Total Fail Failed List of Failed --- t\src\io.t 2 512162 12.50% 9-10 5 subtests skipped. Failed 1/9 test scripts, 88.89% okay. 2/59 subtests failed, 96.61% okay. NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0xff' Stop. Summary of my parrot 0.0.13 configuration: configdate='Mon Nov 3 06:07:45 2003' Platform: osname=MSWin32, archname=MSWin32-x86-multi-thread jitcapable=1, jitarchname=i386-MSWin32, jitosname=MSWIN32, jitcpuarch=i386 execcapable=0 perl=C:\Perl\bin\perl.exe Compiler: cc='cl', ccflags='-nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT ', Linker and Libraries: ld='link', ldflags='-nologo', cc_ldflags='/link', libs='oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib' Dynamic Linking: so='.dll', ld_shared='-dll', ld_shared_flags='-def:libparrot.def' Types: iv=long, intvalsize=4, intsize=4, opcode_t=long, opcode_t_size=4, ptrsize=4, ptr_alignment=4 byteorder=1234, nv=double, numvalsize=8, doublesize=8 __ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/
Re: [perl #24391] [PATCH] P6C closures use 'newsub' instead of assigning integer address
thanks, applied. /s
Re: [perl #24392] [PATCH] P6C xor really does return a value
applied thanks. /s
docs
Hello. I have several questions about parrot dosc. I have noticed that docs\parrot_assembly.pod is old version of \docs\pdds\pdd06_pasm.pod file. Will these files be distinguished in the future? Catalog docs\ops is empty in 0.0.13 version. Is it bug? Nick.
Re: docs
On Mon, 3 Nov 2003, Nick Kostirya wrote: Hello. I have several questions about parrot dosc. I have noticed that docs\parrot_assembly.pod is old version of \docs\pdds\pdd06_pasm.pod file. Will these files be distinguished in the future? And they're both wrong, unfortunately. :( pdd06 is supposed to be canonical, so parrot_assembly.pod will be going away at some point. And PDD06 will be updated. Catalog docs\ops is empty in 0.0.13 version. Is it bug? I think that's leftover cruft. Dan --it's like this--- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk
Re: [perl #24257] [PATCH] Integration of ICU to the build system
Jürgen Bömmels (via RT) [EMAIL PROTECTED] writes: The attached patch makes it an optional part of the normal build system. By using the switch --buildicu the ./configure of icu/source is run and the makefile is extended with rules for building and cleaning icu. This option is not enabled by default. Solving Warnocks dilemma by appling the patch. boe
Re: docs
On Mon, 3 Nov 2003, Dan Sugalski wrote: On Mon, 3 Nov 2003, Nick Kostirya wrote: Catalog docs\ops is empty in 0.0.13 version. Is it bug? I think that's leftover cruft. Well, we used to generate a .pod file for each .ops file, at build time, which lived in here. However, we don't appear to be doing this anymore (although I'm not sure when this changed). Simon
From the Interesting, but is it useful? department
I've been playing with an uncommitted op version of invoke that takes a method or sub by name like below: invoke foo, 0 The 0 is irrelevant to the eye, but it is a placeholder for the self-modifying instruction. Upon call, invoke by name does: op invoke(STR, INT) PMC sub if($2 == 0) { sub = lookup $1 $2 = sub # store the ref in the immediate data of the instruction } else { sub = (PMC*)$2 } sub-vtable-invoke() } Basically it is just caching the lookup into the immediate data portion of the bytecode instruction. It isn't really anything new, this has been done before in VMs, but the problem becomes the PMC that is stored in the bytecode is unknown to the GC/DOD. Easy enough to fix, rather than store the PMC * itself, simply keep a method_cache[] that the DOD can traverse, and store only the array slot in the bytecode. Maybe this is only syntactic sugar, I don't know. The case is a win for loops that call the same method. P0 = find_method foo # Lookup by name LOOP: invoke P0 if something goto LOOP becomes: LOOP invoke foo # Lookup by name only the 1st execution if something goto LOOP There is no register usage for the method PMC. Already, we are going to have a method_cache[] structure, so it follows that we could allow for this shortcut simply to hide the cache for some cases. This shortcut has the same challenges as the non-shortcut with notifiying/invalidating PMC method references, so the same solutions apply. The other question is: does this little trick apply to other things that do lookups by name with constant strings? -Melvin
Re: docs
Simon Glover [EMAIL PROTECTED] writes: On Mon, 3 Nov 2003, Dan Sugalski wrote: On Mon, 3 Nov 2003, Nick Kostirya wrote: Catalog docs\ops is empty in 0.0.13 version. Is it bug? I think that's leftover cruft. Well, we used to generate a .pod file for each .ops file, at build time, which lived in here. However, we don't appear to be doing this anymore (although I'm not sure when this changed). It's some left over error from The Great Move. The ops files were searched at the root of parrot not in the new ops directory. I'm just testing a fix, if it works I will commit it. bye boe -- Juergen Boemmels[EMAIL PROTECTED] Fachbereich Physik Tel: ++49-(0)631-205-2817 Universitaet Kaiserslautern Fax: ++49-(0)631-205-3906 PGP Key fingerprint = 9F 56 54 3D 45 C1 32 6F 23 F6 C7 2F 85 93 DD 47