[perl #43343] [TODO] config/inter/charset.pm: Write unit tests
With a modest amount of refactoring and two test files (written tonight at the Peculier Pub while waiting for honored guests to arrive at ny.pm meeting!), we have achieved 100% test coverage of code for this configuration step class. Resolving ticket.
Re: [svn:parrot-pdd] r22465 - in trunk: . compilers/json compilers/json/JSON compilers/past-pm/POST compilers/pct/src compilers/pct/src/POST compilers/pge/PGE compilers/pirc/src compilers/tge/TGE docs
[EMAIL PROTECTED] wrote: Author: tewk Date: Wed Oct 24 17:11:20 2007 New Revision: 22465 tewk: Could you see if something in this commit led to the breakage described in http://rt.perl.org/rt3/Ticket/Display.html?id=46869? I've resolved 3 of the 4 test failures described there but haven't yet diagnosed the 4th. This is otherwise a very impressive chunk of work. Thank you very much. kid51
[perl #46869] [BUG] t/tools/ops2pmutils/: Failures in 4 test files
I took Coke's suggestion as to how to renumber the ops and it did indeed clear up 3 of the 4 failing tests. I'm not sure how to correct. I have (hopefully temporarily) placed the failing test in a TODO block so that this failure doesn't prevent me from running coverage analysis. kid51
Re: Dynamic variable scoping
From: Allison Randal <[EMAIL PROTECTED]> Date: Tue, 23 Oct 2007 23:11:51 -0700 Bob Rogers wrote: > > All I am talking about is the equivalent of what "local $var" provides > for Perl 5, i.e. dynamically-scoped binding of scalar "package > variables." Perl 5 locals and Perl 6 temps are quite different than Lisp special variables. I don't immediately see a way to explain this any more clearly than I explained it last time. You did explain it clearly; that's why I said "scalar package variables" (and didn't mention "temp" except to disavow it). AFAICS, these have semantics nearly identical [1] to Lisp special variables, and I don't see anything in last fall's discussion to the contrary. Much of that discussion was spent curing my ignorance of the difference between binding and assignment, and how that applies to "temp", plus other discussion related to localizing/temping registers and structure members, but I thought I stated clearly that I was not going to consider such things. >If the problem is simply "implement Common Lisp special variables", then >the most likely solution is to create a LispSpecialVar PMC. In the same >way that a MultiSub acts like a sub but internally stores a list of >subs, the LispSpecialVar would act like an ordinary variable to Parrot >internals and to all other languages, but would internally store a stack >of previous dynamic bindings. > > How would continuations capture dynamic bindings, then? What information do the continuations need to capture? i.e. what do they need to restore when invoked? In general, continuations capture globals, but don't capture the values of the globals. Invoking a continuation doesn't restore the value of a global. In a nutshell, a "special" binding changes the dynamic environment, in the same sort of way that pushing an error handler does -- both are inherited by subs called in that environment. Exiting from that environment, by whatever means, must return to the previous environment at the point where the continuation was taken. In fact, if Parrot were to provide an implementation of dynamically scoped global variables in which invoking a continuation did *not* fully restore them, then I would not be able to use such an implementation. If I tried to, the nonlocal transfer-of-control features of Lisp (implemented with continuations) would break [2]. This should not surprise anyone. (Does it??) One such nonlocal transfer-of-control feature is "catch/throw". Here is some Lisp code (albeit somewhat contrived) that illustrates the matter: (defun main () (format t "*print-base* is ~D.~%" *print-base*) (let ((*print-base* 16)) ;; Because I want output in hex. (format t "*print-base* is now ~D.~%" *print-base*) (catch 'done (let ((*print-base* 2)) ;; Well, I really want it in binary. (format t "*print-base* is now ~D.~%" *print-base*) (dotimes (i 16) (format t "~S~%" (generate-row i 0 (format t "We never get here.~%")) (format t "*print-base* is still ~D.~%" *print-base*))) (defun generate-row (i j) (cond ((> i 5) ;; Gratuitous nonlocal exit. (throw 'done nil)) ((>= j i) nil) (t (let ((*print-base* j)) ;; Since nothing is printed in this dynamic scope, ;; the only effect is to create a binding that must ;; be popped when exiting this frame (or throwing ;; through it). (cons (* i j) (generate-row i (1+ j))) *print-base* is a global variable that controls the output radix in the obvious way, and it's initial default value is 10 (decimal); all of the numbers in the source code are decimal. This global is rebound twice in the "main" function, and once in the generate-row function. The special "throw" operator transfers control to the innermost "catch" with a matching tag, unwinding the dynamic environment to the point of the catch, where "dynamic environment" means the state of all error handlers and dynamic variable bindings [3]. The output looks like this (where "PARROT" just happens to be the name of the package I'm in): PARROT> (main) *print-base* is 10. *print-base* is now 16. *print-base* is now 2. NIL (0) (0 10) (0 11 110) (0 100 1000 1100) (0 101 1010 10100) *print-base* is still 16. NIL PARROT> On the sixth time through the loop, "throw" has to unwind out of 6 stack frames (and the *print-base* bindings in 5 of them) to get back to the "catch", but must unwind only the innermost of the two *print-base* bindings in "main". As I sai
[svn:parrot-pdd] r22493 - in trunk: . docs/pdds docs/pdds/draft
Author: allison Date: Thu Oct 25 16:07:20 2007 New Revision: 22493 Added: trunk/docs/pdds/pdd26_ast.pod - copied unchanged from r22492, /trunk/docs/pdds/draft/pdd26_ast.pod Removed: trunk/docs/pdds/draft/pdd26_ast.pod Changes in other areas also in this revision: Modified: trunk/MANIFEST Log: [pdd] Launching AST PDD out of draft after review.
[perl #46927] [PATCH] Remove integer - pointer comparison in slice.pmc
# New Ticket Created by Paul Cochrane # Please include the string: [perl #46927] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=46927 > The attached patch removes a compiler warning about comparing an integer to a pointer. Given the well commented code it was easy to work out another way to write the code with the same meaning as that given in the comment. However, since I'm not 100% sure that I got everything right (make test passed btw) I thought I'd post this to the list. Comments most certainly welcome! If no complaints turn up, I'll commit this in about three days. Paul slice_pmc.patch Description: Binary data
[perl #46925] [TODO] [C] Call pmc slicing functions from PackFiles thaw()
# New Ticket Created by Paul Cochrane # Please include the string: [perl #46925] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=46925 > In src/pmc/slice.pmc there is the todo item: * XXX self is a key chain (PMC constant), which shouldn't be modified * finally this stuff should be call from packfiles thaw It seems as though the routines following this comment (set_slice_start, set_slice_next) are intended to be called from within PackFile's thaw() functionality. The note about the fact that the 'self' variable shouldn't be modified probably means that there should be a check in these routines that this is the case.
[perl #46923] [TODO] [C] Check flags of parrot_range object in elements() method Slice PMC
# New Ticket Created by Paul Cochrane # Please include the string: [perl #46923] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=46923 > In src/pmc/slice.pmc:elements() there is the todo item: /* only start .. end supported so: * TODO check flags somewhere * */ I think this means that the flags of the parrot_range object need to be checked. Where, is a good question. Is anyone able to elaborate further on this issue? Anyway, this checking needs to be done, and it would be really appreciated if it could be implemented.
[perl #46915] [TODO] [Perl] Handle MMD vtable entries in tools/build/jit2c.pl (?)
# New Ticket Created by Paul Cochrane # Please include the string: [perl #46915] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=46915 > In tools/build/jit2c.pl there is the todo item: next if $entry->[4] =~ /MMD_/;# TODO all Which looks like if a vtable entry matches MMD then we skip this. My guess is that we shouldn't be skipping such things here, although it's not too clear from the todo comment exactly what should be done.
[perl #46913] [TODO] [Perl] Correct svn_id test in t/perl/Parrot_IO.t
# New Ticket Created by Paul Cochrane # Please include the string: [perl #46913] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=46913 > In t/perl/Parrot_IO.t there is the todo item (and test): # XXX doesn not work aftern switch to svn #ok($f->svn_id() =~ /File.pm,v/, 'svn_id'); This needs to be corrected to play with svn nicely; it is obviously a leftover from the days when Parrot development was contained within a CVS repository.
[perl #46911] [TODO] [Perl] Investigate todo item within tools/dev/install_files.pl
# New Ticket Created by Paul Cochrane # Please include the string: [perl #46911] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=46911 > In tools/dev/install_files.pl there is the todo item: next unless $package =~ /main|library/;# XXX -lt I have no idea what this means. Does -lt mean less than? Or does it mean Leo Toetsch?
Re: [perl #46901] [TODO] [Perl] Use Data::Dumper when looking for missing or extra files in manicheck.pl
Paul Cochrane (via RT) writes: # New Ticket Created by Paul Cochrane # Please include the string: [perl #46901] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=46901 > In tools/dev/manicheck.pl there is the todo item: # TODO: Use Data::Dumper This is in the context of looking for missing files from the MANIFEST and extra files not found in the MANIFEST. Exactly how Data::Dumper is supposed to help here isn't 100% clear to me, however it might to someone else I hope. A brief look at this makes me think it was to nicely format the missing files. However, we're already formatting them. To resolve this ticket, remove the comment & the 'use Data::Dumper' call.
[perl #46909] [TODO] [Perl] Cope with escaped quotes in tools/build/c2str.pl
# New Ticket Created by Paul Cochrane # Please include the string: [perl #46909] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=46909 > In tools/build/c2str.pl there is the todo item: # TODO maybe cope with escaped \" Do this.
[perl #46907] [TODO] Resolve Copyright in tools/build/pbc2c.pl
# New Ticket Created by Paul Cochrane # Please include the string: [perl #46907] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=46907 > In tools/build/pbc2c.pl there is the todo item: # TODO: Resolve copyright. See ADDITIONAL section at end of file. Where the ADDITIONAL section looks like: =begin ADDITIONAL =head1 AUTHOR Gregor N. Purdy E[EMAIL PROTECTED] =head1 COPYRIGHT Copyright (C) 2001-2005, The Perl Foundation. This program is free software. It is subject to the same license as the Parrot interpreter. =head1 LICENSE This program is free software. It is subject to the same license as the Parrot interpreter. =end ADDITIONAL The copyright-related issues need to be resolved and the copyright info updated.
[perl #46905] [TODO] [C] Make a shared variant of PackFile_new()
# New Ticket Created by Paul Cochrane # Please include the string: [perl #46905] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=46905 > In tools/build/pbc2c.pl there is the todo item: /* TODO make also a shared variant of PackFile_new */ in the context of creating a new PackFile. This needs to be implemented.
[perl #46903] [TODO] [Perl] Implement todo items mentioned in tools/dev/extract_file_descriptions.pl
# New Ticket Created by Paul Cochrane # Please include the string: [perl #46903] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=46903 > In tools/dev/extract_file_descriptions.pl there are many todo items mentioned (all except one in the TODO section of the file's pod). These todo items need to be completed.
[perl #46901] [TODO] [Perl] Use Data::Dumper when looking for missing or extra files in manicheck.pl
# New Ticket Created by Paul Cochrane # Please include the string: [perl #46901] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=46901 > In tools/dev/manicheck.pl there is the todo item: # TODO: Use Data::Dumper This is in the context of looking for missing files from the MANIFEST and extra files not found in the MANIFEST. Exactly how Data::Dumper is supposed to help here isn't 100% clear to me, however it might to someone else I hope.
[perl #46899] [TODO] [Perl] Integrate smartlink info and emit html in smartlinks.pl
# New Ticket Created by Paul Cochrane # Please include the string: [perl #46899] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=46899 > In tools/util/smartlinks.pl there is the todo item: ## TODO: integrate smartlink info, emit html Do this.
[perl #46897] [TODO] [Pir/C] Figure out how to test the pc opcode type
# New Ticket Created by Paul Cochrane # Please include the string: [perl #46897] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=46897 > In t/op/01-parse_ops.t there is the todo item: pc => undef, ## TODO: figure out how to test this type Work out how to test this type and then test it as thoroughly as you can.
[perl #46895] [TODO] [Pir/C] Investigate and correct incorrect recursion depth counting in debug backtrace
# New Ticket Created by Paul Cochrane # Please include the string: [perl #46895] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=46895 > In t/op/debuginfo.t there is the todo item: # XXX # in plain functional run-loop result is 999 # other run-loops report 998 # TODO investigate this after interpreter strtup is done # see also TODO in src/embed.c which is associated with counting the number of recursions during a debug backtrace (I think...). This needs correction.
[perl #46893] [TODO] [Perl] Complete test coverage of Parrot::Test
# New Ticket Created by Paul Cochrane # Please include the string: [perl #46893] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=46893 > In t/perl/Parrot_Test.t there are the todo item comments: # TODO test write_code_to_file(), plan(), skip(), slurp_file() # test the test functions from Parrot::Test # TODO: test the untested test functions This is all (realistically speaking) todo item. That is: test all functions contained within the Parrot::Test module.
[perl #46891] [TODO] [Perl] Test Parrot::Test::run_command
# New Ticket Created by Paul Cochrane # Please include the string: [perl #46891] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=46891 > In t/perl/Parrot_Test.t there is the todo item: # TODO test run_command() Do this please :-)
[perl #46889] [TODO] [Perl] Move post environment test code into an END block (Parrot::Test)
# New Ticket Created by Paul Cochrane # Please include the string: [perl #46889] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=46889 > In t/perl/Parrot_Test.t there is the todo item: # XXX Shouldn't this be in an END block Which is associated with testing environment settings. This code should be moved into an END block if appropriate (currently it's inside a BEGIN block)
[svn:parrot-pdd] r22465 - in trunk: . compilers/json compilers/json/JSON compilers/past-pm/POST compilers/pct/src compilers/pct/src/POST compilers/pge/PGE compilers/pirc/src compilers/tge/TGE docs doc
Author: tewk Date: Wed Oct 24 17:11:20 2007 New Revision: 22465 Modified: trunk/docs/pdds/pdd23_exceptions.pod Changes in other areas also in this revision: Added: trunk/t/op/exceptions.t Modified: trunk/DEPRECATED.pod trunk/compilers/json/JSON/pge2pir.tg trunk/compilers/json/postalcodes.pir trunk/compilers/past-pm/POST/Grammar.tg trunk/compilers/pct/src/HLLCompiler.pir trunk/compilers/pct/src/POST/Grammar.tg trunk/compilers/pge/PGE/Exp.pir trunk/compilers/pirc/src/pirutil.c trunk/compilers/tge/TGE/Compiler.pir trunk/docs/compiler_faq.pod trunk/editor/pir-mode.el trunk/languages/APL/src/parse2past.tg trunk/languages/PIR/docs/PROPOSALS trunk/languages/PIR/lib/pasm_core.pg trunk/languages/PIR/lib/pasm_instr.pg trunk/languages/WMLScript/src/wmlsstdlibs.pir trunk/languages/cardinal/src/OSTGrammar.tg trunk/languages/dotnet/doc/constructs/exceptions.pod trunk/languages/dotnet/src/translator.pir trunk/languages/forth/forth.pir trunk/languages/forth/test.pir trunk/languages/lisp/internals.pir trunk/languages/lisp/system.pir trunk/languages/lua/lib/lfs.pir trunk/languages/perl6/perl6.pir trunk/languages/pheme/lib/PhemeSymbols.pir trunk/languages/pheme/pheme.pir trunk/languages/tcl/runtime/builtin/append.pir trunk/languages/tcl/runtime/builtin/catch.pir trunk/languages/tcl/runtime/builtin/dict.pir trunk/languages/tcl/runtime/builtin/file.pir trunk/languages/tcl/runtime/builtin/foreach.pir trunk/languages/tcl/runtime/builtin/info.pir trunk/languages/tcl/runtime/builtin/inline.pir trunk/languages/tcl/runtime/builtin/lappend.pir trunk/languages/tcl/runtime/builtin/lindex.pir trunk/languages/tcl/runtime/builtin/namespace.pir trunk/languages/tcl/runtime/builtin/proc.pir trunk/languages/tcl/runtime/builtin/scan.pir trunk/languages/tcl/runtime/builtin/source.pir trunk/languages/tcl/runtime/builtin/string.pir trunk/languages/tcl/runtime/builtin/uplevel.pir trunk/languages/tcl/runtime/builtin/vwait.pir trunk/languages/tcl/runtime/conversions.pir trunk/languages/tcl/runtime/hacks.pir trunk/languages/tcl/runtime/string_to_list.pir trunk/languages/tcl/runtime/tcllib.pir trunk/languages/tcl/runtime/variables.pir trunk/languages/tcl/src/builtin/expr.pir trunk/languages/tcl/src/builtin/for.tmt trunk/languages/tcl/src/builtin/while.tmt trunk/languages/tcl/src/grammar/expr/functions.pir trunk/languages/tcl/src/grammar/expr/operators.pir trunk/languages/tcl/src/grammar/expr/past2pir.tg trunk/languages/tcl/src/macros.pir trunk/languages/tcl/src/tclsh.pir trunk/languages/tcl/t/internals/select_option.t trunk/languages/tcl/t/internals/select_switches.t trunk/lib/Parrot/PIR/Formatter.pm trunk/runtime/parrot/library/Iter.pir trunk/runtime/parrot/library/PGE/P6Grammar.pir trunk/runtime/parrot/library/PGE/Perl6Grammar.pir trunk/runtime/parrot/library/Parrot/HLLCompiler.pir trunk/src/ops/core.ops trunk/src/ops/ops.num trunk/t/compilers/pge/p5regex/p5rx.t trunk/t/compilers/pge/p6regex/01-regex.t trunk/t/compilers/pge/perl6regex/01-regex.t trunk/t/library/coroutine.t trunk/t/library/iter.t trunk/t/library/pg.t trunk/t/library/range.t trunk/t/oo/composition.t trunk/t/oo/ops.t trunk/t/op/cmp-nonbranch.t trunk/t/op/gc.t trunk/t/op/sprintf.t trunk/t/pmc/bigint.t trunk/t/pmc/class.t trunk/t/pmc/complex.t trunk/t/pmc/exception.t trunk/t/pmc/exporter.t trunk/t/pmc/float.t trunk/t/pmc/io_status.t trunk/t/pmc/object.t trunk/t/pmc/parrotio.t trunk/t/pmc/pmcproxy.t trunk/t/pmc/resizablestringarray.t trunk/t/pmc/super.t Log: [exceptions] Adds pop_eh and push_eh_p ** MAKE REALCLEAN REQUIRED DUE TO NEW OPS ** Modified: trunk/docs/pdds/pdd23_exceptions.pod == --- trunk/docs/pdds/pdd23_exceptions.pod(original) +++ trunk/docs/pdds/pdd23_exceptions.podWed Oct 24 17:11:20 2007 @@ -54,16 +54,18 @@ exception (i.e. the call stack is I unwound first). See below for more detail. -If a I is provided, Parrot creates and pushes a continuation that +If a I or is provided, Parrot creates and pushes a continuation that resumes execution at I if invoked, which has the effect of unconditionally handling all errors, and unwinding the stack to that label. +If a I is provided, Parrot pushes the pmc which will execute +if invoked, which has the effect of unconditionally handling all errors, +replacing the stack with that execution context of the invocable pmc. + =item B Pop the most recently pushed exception handler off the exception handler stack. -{{ TODO: Provide exception handler stack introspection. }} - =item B> Throw an exception consisting of the given I PMC. Active exception @@ -131,6 +133,28 @@ =back +=head2 Exception Introspection Opcodes +{{ TODO: Provide exception handler sta
Re: [perl #46823] [TODO] [Pir] Rewrite ResizeablePMCArray tests properly when exceptions are implemented
On 25/10/2007, Allison Randal <[EMAIL PROTECTED]> wrote: > Paul Cochrane wrote: > > > > I updated the subject of this ticket to substitute PMC with * as this > > issue occurs more often than I first guessed (the problems one has > > when going through code serially...). This issue is actually more > > general and *any* ResizeableArray needs the > > exceptions-related tests updated when we have exceptions implemented. > > Could you explain more fully what the problem is? Since we're currently > implementing the exceptions PDD, it would be helpful to know any edge > cases that need to be fixed. To be totally honest I wish I knew. I'm just going through converting the todo items in code into RT tickets and sometimes the todo comments aren't necessarily all that clear as to what needs to be done. I'm also (unfortunately) not familiar enough with pir to see in the code of the tests what needs fixing otherwise I might have been able to expand a little in the ticket. I'm really sorry I can't be of more help here! Paul