1. There are tests in t/pmc as well as t/op now.
2. Adds a comment about Parrot::Test
Simon
--- docs/tests.pod.old Tue Mar 19 10:27:52 2002
+++ docs/tests.pod Tue Mar 19 10:38:52 2002
-8,9 +8,17
=head2 How to write a test
-First, find an appropriate file in Ct/op/*.t, or create a
The description in core.ops is a little terse. How about this:
--
Set $1 to the portion of $2 starting at (zero-based) character position
$3 and having length $4.
Optionally pass in string $5 for replacement. If the length of $5 is
different from the length specified in
The enclosed patch demangles the documentation of the Cnew opcode.
Simon
--- core.ops.oldMon Mar 18 18:49:07 2002
+++ core.opsMon Mar 18 18:51:28 2002
-2526,16 +2526,18
=item Bnew(out PMC, in INT, in INT)
-Create a new PMC of class Ci; look in Fpmc.h for the base
+Create a
It's FLOATVAL, not NUMVAL.
Simon
--- README.old Tue Jan 29 01:01:40 2002
+++ README Mon Mar 18 20:11:50 2002
-33,7 +33,7
make, but you'll be unable to assemble anything.) You can find
what types are support by typing 'perl -V', and examining the
values for ivtype and nvtype.
I thought I'd try out newasm on the test suite - this is how we do:
Failed Test Status Wstat Total Fail Failed List of failed
-
t/op/basic.t 2 512 82 25.00% 3, 7
t/op/bitwise.t 15 384015 15 100.00% 1-15
I'm a bit confused about the relationship between PDD6 and Simon's new
Assembler PDD. Is the latter supposed to replace the former, or are
they supposed to be addressing different aspects of Parrot Assembler?
Simon
Enclosed patch gets rid of these warnings:
default.pmc: In function `Parrot_default_get_integer_keyed':
default.pmc:50: warning: control reaches end of non-void function
default.pmc: In function `Parrot_default_get_number_keyed':
default.pmc:58: warning: control reaches end of non-void
On Fri, 15 Mar 2002, Simon Cozens wrote:
Here's how to play with it:
1) CVS update and build Parrot
2) make packout.o
This step spews a load of warnings of the form:
packout.c:22: warning: no previous prototype for `PackFile_pack_size'
packout.c: In function
On Fri, 15 Mar 2002, Simon Cozens wrote:
You didn't resync. I just updated packout.c to take this function out.
There's a reason step 1 included CVS updating. :)
Yep, just figured that out for myself - I rsync'd, rather than doing a
cvs checkout, and not realizing it doesn't do quite the
OK, I've finished trying it out on all of the files in examples/assembly.
Most of them assemble and run fine. The ones that don't are:
call.pasm: it has problems with things like [D - - 3] in the macros
fact.pasm, local_label.pasm: it doesn't handle local labels like $ok
On Fri, 15 Mar 2002, Simon Glover wrote:
stack.pasm: it can't handle the expanded opcode names like set_i_ic
This actually seems to be quite easy to fix - we just return early from
expand_op is the opcode is already in expanded form. Patch again newasm
attached.
Simon
--- newasm.old
Enclosed patch updates the manifest to match reality.
Simon
--- MANIFEST.oldWed Mar 13 18:43:05 2002
+++ MANIFESTWed Mar 13 18:43:43 2002
-56,6 +56,7
docs/pdds/pdd11_extending.pod
docs/pdds/pdd12_assembly.pod
docs/pdds/pdd13_bytecode.pod
+docs/pdds/pdd14_bignum.pod
For more fun in the same vein, try this:
length S0
end
In both cases the problem is that we're not checking the STRING*
pointer passed to the function before we start trying to dereference it.
This seems to be a fairly generic problem in the string functions,
unfortunately - a brief
On Mon, 11 Mar 2002, Nicholas Clark wrote:
On Sat, Feb 16, 2002 at 10:32:10PM +, Simon Glover wrote:
^
Should I apply the revised patch as appended?
Looks like a few bits have already been patched. Try the attached
instead.
Simon
--- core.ops.oldMon Mar
This is a repost of another rather ancient patch, but should be
uncontroversial - basically, the PerlUndef tests appear to have
been committed twice; the patch just removes the duplicates.
Simon
--- t/pmc/pmc.t.old Tue Feb 12 15:23:30 2002
+++ t/pmc/pmc.t Tue Feb 12 15:25:07 2002
-1,6
Should be self-explanatory.
Simon
--- rx.ops.old Sun Mar 10 12:54:51 2002
+++ rx.ops Sun Mar 10 12:55:18 2002
-16,7 +16,7
# NOTE: This looks a LOT scarier than it really is
# zzabbBBcdcdcdzz =~ /ab*[cd]+/i
- rx_allocateinfo P0, zzabbBBcdcdcdzz
+
Enclosed patch fixes up a few more holes in our test coverage.
Simon
--- t/op/rx.t.old Sun Mar 10 13:14:34 2002
+++ t/op/rx.t Sun Mar 10 13:36:01 2002
-1,4 +1,4
-use Parrot::Test tests = 22;
+use Parrot::Test tests = 27;
use Test::More;
sub gentest($$;$$) {
-64,6
Self-explanatory.
Simon
--- time.t.old Sun Mar 10 13:47:03 2002
+++ time.t Sun Mar 10 13:48:46 2002
-1,6 +1,6
#! perl -w
-use Parrot::Test tests = 3;
+use Parrot::Test tests = 4;
output_is('CODE', 'OUTPUT', time_i);
timeI0
-64,4 +64,10
start
done
OUTPUT
+
More tests for the PerlString test-suite.
Simon
--- t/pmc/perlstring.t.old Sun Mar 10 14:14:16 2002
+++ t/pmc/perlstring.t Sun Mar 10 17:14:29 2002
-1,8 +1,51
#! perl -w
-use Parrot::Test tests = 6;
+use Parrot::Test tests = 8;
use Test::More; # Included for skip().
+my
In Parrot's standard operational mode, the following code[1]:
set N2, -2147483648.0
set I2, N2
print I2
print \n
end
produces the output:
-2147483648
but in JIT mode (on an x86) it produces:
-0
This smacks of some kind of
The enclosed patch fixes a few of the holes in our test coverage
uncovered by Josh Wilmes
Simon
--- t/op/integer.t.old Sat Mar 9 15:38:21 2002
+++ t/op/integer.t Sat Mar 9 15:55:33 2002
-1,6 +1,6
#! perl -w
-use Parrot::Test tests = 30;
+use Parrot::Test tests = 32;
Enclosed patch fixes a few small bugs in the core.ops documentation.
Simon
--- core.ops.oldSat Feb 16 17:08:02 2002
+++ core.opsSat Feb 16 17:29:12 2002
@@ -575,7 +575,7 @@
=head2 Conditional branch operations
-These opertions perform a conditional relative branch. If the
Most of the PerlUndef tests in pmc.t appear to have been added twice.
Enclosed patch removes the duplicates.
Simon
--- t/pmc/pmc.t.old Tue Feb 12 15:23:30 2002
+++ t/pmc/pmc.t Tue Feb 12 15:25:07 2002
@@ -1,6 +1,6 @@
#! perl -w
-use Parrot::Test tests = 61;
+use Parrot::Test tests =
Currently the add, subtract, multiply and divide methods in perlnum.pmc
are all coded along the lines of:
void add (PMC * value, PMC* dest) {
if(value-vtable == Parrot_base_vtables[enum_class_PerlInt]) {
*dest-vtable = Parrot_base_vtables[enum_class_PerlNum];
*
On Mon, 4 Feb 2002, Alex Gough wrote:
On Mon, 4 Feb 2002, Simon Glover wrote:
Re the former, am I right in thinking that assignment from a PerlArray
to a non-PMC register should always be in scalar context; ie that:
new P0, PerlArray
set S0, P0
should lead to S0
On Fri, 1 Feb 2002, Alex Gough wrote:
On Fri, 1 Feb 2002, Simon Glover wrote:
The enclosed patch implements the last of these, and adds tests for
PerlUndefs and PerlStrings (and implicitly PerlInts and PerlNums -
should we also add explicit tests for these?). I haven't added tests
On Wed, 30 Jan 2002, Steve Fink wrote:
On Wed, Jan 30, 2002 at 09:32:45PM +, Nicholas Clark wrote:
Should I add classes/array.c classes/array.h docs/embed.pod docs/io_ops.pod
to MANIFEST?
*.pod, yes. classes/*.[ch], no. Autogenerated.
Erm, io_ops.pod is also autogenerated,
Enclosed patch fixes this warning:
embed.c: In function `Parrot_runcode':
embed.c:174: warning: int format, INTVAL arg (arg 3)
Simon
--- embed.c.old Fri Feb 1 13:49:46 2002
+++ embed.c Fri Feb 1 13:49:48 2002
@@ -171,7 +171,7 @@
for(i=0; i argc; i++) {
Slight fix to the string-int test that we're currently skipping in
pmc.t; the test still fails, but no longer makes Parrot segfault.
Simon
--- t/pmc/pmc.t.old Fri Feb 1 17:20:22 2002
+++ t/pmc/pmc.tFri Feb 1 17:24:49 2002
@@ -558,6 +558,7 @@
set I0, P0
print
There are a number of set ops documented in core.ops that haven't
actually been implemented - conversion from STR to INT/NUM (and
vice versa), plus conversion from PMCs to STR.
The enclosed patch implements the last of these, and adds tests for
PerlUndefs and PerlStrings (and implicitly
Enclosed patch adds the new SPARC-based JIT files to the manifest,
and also puts it back into alphabetical order.
Simon
--- MANIFEST.oldWed Jan 30 11:42:42 2002
+++ MANIFESTWed Jan 30 11:46:42 2002
@@ -6,35 +6,9 @@
MANIFEST
Makefile.in
NEWS
-lib/Parrot/Assembler.pm
In embed.h, we declare a function:
struct Parrot_Interp *interp_new();
that's never subsequently used. On the other hand, in embed.c,
we use a function
struct Parrot_Interp * Parrot_new() { ...
that isn't previously declared. Are these supposed to be the same thing?
If so, the patch
This patch clears up warnings in embed.c and test_main.c coming
from function declarations of the form:
void
foobar();
which should properly be
void
foobar(void);
Simon
--- test_main.c.old Tue Jan 29 20:00:01 2002
+++ test_main.c Wed Jan 30 12:05:36 2002
@@ -18,10 +18,10 @@
Many of the Perl scripts in the distribution (including assemble.pl !)
can no longer find the Parrot::* modules. Enclosed patch fixes (although
it would be nice if there were an easier way to do this).
Simon
--- languages/scheme/Scheme/Test.pm.old Wed Jan 30 17:42:08 2002
+++
Oops, scratch a couple of those; the pmc2c.pl one's not necessary,
and I see Daniel's already patched pbc2c.pl
Simon
I posted this patch a while back, but it seems to have slipped
through the cracks. It fixes the POD in Parrot::Assember so that perldoc
can read it and just tidies it up generally. It also adds documentation
for the constantize_integer and constantize_number functions.
Simon
---
You forgot to declare the class_init function in global_setup.h
Enclosed patch fixes.
Simon
--- global_setup.h.old Tue Jan 29 12:11:59 2002
+++ global_setup.h Tue Jan 29 12:12:29 2002
@@ -15,6 +15,7 @@
#define PARROT_GLOBAL_SETUP_H_GUARD
/* Needed because this might get compiled
As written, the tests of the new neg op will pass even if neg does
nothing. Enclosed patch fixes by extending the tests.
Simon
--- integer.t.old Tue Jan 29 14:48:54 2002
+++ integer.t Tue Jan 29 14:49:51 2002
@@ -1014,11 +1014,14 @@
output_is(CODE, OUTPUT, neg_i);
neg I0,3
+
There is no opcodes.pod; I'm assuming the pointer should actually be to
parrot_assembly.pod, as the canonical documentation.
Simon
--- overview.pod.oldMon Jan 28 19:42:55 2002
+++ overview.podMon Jan 28 19:43:06 2002
@@ -65,7 +65,7 @@
These areas will roughly map to compilation
From interpreter.h:
INTVAL flags;/* Various
interpreter flagBut whBut what
that signal that runops
should do something */
I'd supply a patch, but I'm not
At the moment, the assembler doesn't seem to like single character
labels. For instance, this code:
bsr aa
print Didn't branch \n
end
aa: print Branched \n
end
prints Branched, as one would expect, but this code:
bsr a
print Didn't branch
Please, people, if you create new files, remember to add them to the
MANIFEST.
Simon
--- MANIFEST.oldMon Jan 21 12:17:34 2002
+++ MANIFESTMon Jan 21 12:18:47 2002
@@ -75,6 +75,7 @@
examples/assembly/call.pasm
examples/assembly/euclid.pasm
examples/assembly/fact.pasm
While you're online: now that you've split the io ops into their
own separate file, their documentation isn't going to core_ops.pod
any more. The enclosed patch fixes this by autogenerating io_ops.pod
in the same fashion that core_ops.pod is generated, but I'm not sure
whether this is the
If you decide to apply the last patch, you should probably apply this
one as well, so that people know about the new file. If not, then junk
'em both.
Simon
--- parrot.pod.old Mon Jan 21 12:56:15 2002
+++ parrot.pod Mon Jan 21 12:57:11 2002
@@ -31,6 +31,10 @@
A description of the
Enclosed patch fixes the POD brokenness in Parrot::Assembler reported
by Steve Fink, and generally makes it more aesthetically pleasing.
I've also supplied the missing documentation for the
constantize_number and constantize_integer functions - could someone
who knows check that I've
Enclosed patch fixes a couple of bugs in the optimizer. The first was
that the parser wasn't correctly recognising register names - it needs
to check for these _before_ checking for labels, or else they're
incorrectly identified as labels. Strangely, this wasn't causing
any problems with
On Mon, 21 Jan 2002, Simon Glover wrote:
The other bug is a misplaced ? in the regex checking for integers.
This makes the match non-greedy, so 1.0 (for example) gets
split up into 1000 (which matches the regex) and 0.0 (which matches
as a float the next time around the loop
Right: the real cause of the second bug is similar to what I thought it
was - when it sees a float, the regex engine first checks to see if it
is an integer by trying the substitution:
s/^(-?\d+)(?!\.)//
The problem is that when, say, 1.0 gets fed to this, and fails
to match,
On Mon, 21 Jan 2002, Brent Dax wrote:
If the problem is backtracking, can't you just use the (?)
no-backtracking syntax?
Didn't think of that. I'm a bit concerned at the large warning
signs attached to it in perlre.pod, though.
Simon
Enclosed patch attempts to resynchronize the core.ops documentation
with the actual code. It also fixes a few typos and overlong lines.
Simon
--- core.ops.oldSat Jan 19 16:36:59 2002
+++ core.opsSat Jan 19 18:19:36 2002
@@ -218,8 +218,13 @@
=item Bprint(in INT, in NUM)
On Mon, 14 Jan 2002, Nicholas Clark wrote:
On Sun, Jan 13, 2002 at 02:14:08PM -0500, Dan Sugalski wrote:
So, I'm turning off the unused parameter warning for now to shut the .ops
file compiles up. After that point, all submitted patches must generate no
more warnings than were
On Tue, 15 Jan 2002, Dan Sugalski wrote:
At 04:39 PM 1/15/2002 +, Alex Gough wrote:
On Tue, 15 Jan 2002, Simon Glover wrote:
warning: control reaches end of non-void function
I'm not sure what to do about the former. The latter generally seem to
arise from
These are happening because although pmc2c.pl is writing out a header
file, it isn't putting an #include directive into the C code to tell
it to use the file - this is only happening for the superclasses of the
PMC (which is generally only default at the moment). Patch below fixes.
NB.
Enclosed test checks that
if Px, ...
works with PerlString PMCs; these should be false if they are , 0, or
are undefined, and true in every other case.
Simon
--- t/op/pmc_perlstring.t.old Sun Jan 13 12:30:21 2002
+++ t/op/pmc_perlstring.t Sun Jan 13 13:15:13 2002
@@ -1,6
It should be make, not make parrot.
Simon
--- docs/intro.pod.old Sun Jan 13 13:28:00 2002
+++ docs/intro.pod Sun Jan 13 13:28:12 2002
@@ -101,7 +101,7 @@
You'll then be asked a series of questions about your local
configuration; you can almost always hit return for each one.
On Fri, 11 Jan 2002, Gopal Rajaraman wrote:
There seems to be a typo in either pmc.h or parrotpointer.pmc
pmc.h has:
PMC_private_GC_FLAG = 2 12
but parrotpointer.pmc has
void init () {
SELF-data=NULL;
SELF-flags=PMC_private_gc_FLAG; ## you get a compile error at
The latest version of jit2h.pl is taking a very long time to run on my
machine - upwards of two minutes, which is longer than the rest of the
build put together! It doesn't appear to be broken, as Parrot still
builds fine, but it is rather annoying. Any idea what's causing this
Adds rx.t, removes duplicated rx.c and puts everything back in
alphabetical order.
Simon
--- MANIFEST.oldThu Jan 10 13:41:59 2002
+++ MANIFESTThu Jan 10 13:42:38 2002
@@ -187,10 +187,9 @@
pmc_pm.pl
register.c
resources.c
-rx.c
-rx.ops
runops_cores.c
rx.c
+rx.ops
stacks.c
This fixes a couple of nits in rx.c:
1. There's no newline at the end, which makes gcc unhappy.
2. We should use NULL, not 0 or , for creating null pointers.
Simon
--- rx.c.oldWed Jan 9 22:35:14 2002
+++ rx.cThu Jan 10 14:14:36 2002
@@ -76,9 +76,9 @@
As the subject line says.
Simon
--- macro.t.old Tue Nov 13 02:00:01 2001
+++ macro.t Thu Jan 10 15:52:28 2002
@@ -1,6 +1,6 @@
#! perl -w
-use Parrot::Test tests = 8;
+use Parrot::Test tests = 9;
output_is( 'CODE', OUTPUT, macro, zero parameters );
answer macro
@@ -47,19 +47,19 @@
The enclosed patch allows one to use the if op with a PerlArray,
as in:
new P0, PerlArray
if P0, TRUE
print false\n
end
TRUE: print true\n
end
Currently, this works the same way that if(@array) does in Perl, ie
it's false if and only if the array
Well, actually two bugs.
The first is an off-by-one error in key.c than can cause parrot
to segfault if hash % NUM_BUCKETS happens to be zero.
The other is a bug in the PerlHash init() code that causes new PerlHash
PMCs to start with the wrong size.
Both fixed below; also tests to
fromsize and tosize are both UINTVALs, so copysize should be one too.
Simon
--- memory.c.oldWed Jan 9 17:36:41 2002
+++ memory.cWed Jan 9 17:37:44 2002
@@ -81,7 +81,7 @@
void *
mem_realloc(void *from, UINTVAL fromsize, UINTVAL tosize) {
-INTVAL copysize = (fromsize
Two separate bugs:
1. The index checks should use and not ||, or else they'll always be
true.
2. The check in key_inc has an off-by-one error.
Simon
--- key.c.old Wed Jan 9 17:58:59 2002
+++ key.c Wed Jan 9 18:01:33 2002
@@ -225,7 +225,7 @@
INTVAL key_element_type(struct
On Wed, 9 Jan 2002, Simon Glover wrote:
Two separate bugs:
1. The index checks should use and not ||, or else they'll always be
true.
2. The check in key_inc has an off-by-one error.
Simon
Better hold off on applying this patch; it makes test 5 in perlhash.t
fail
On Wed, 9 Jan 2002, Dan Sugalski wrote:
At 06:39 PM 1/9/2002 +, Simon Glover wrote:
On Wed, 9 Jan 2002, Simon Glover wrote:
Two separate bugs:
1. The index checks should use and not ||, or else they'll always be
true.
2. The check in key_inc has an off-by-one
On Wed, 9 Jan 2002, Dan Sugalski wrote:
At 07:15 PM 1/9/2002 +, Simon Glover wrote:
OK, I think I've got it this time. The previous patch uncovered a bug in
perlhash.pmc; index is actually the offset of a particular key pair
within the perlhash structure, so we need to ensure
This time in perlarray.pmc; they're both simple off-by-one errors.
Patch below fixes.
I've also added a regression test to guard against the reoccurence of
the bug. I've put this, plus the existing PerlArray tests, in a separate
file, pmc_perlarray.t, in line with what we've done for
Enclosed patch fixes this warning:
io/io.c: In function `PIO_copy_stack':
io/io.c:277: warning: declaration of `new_stack' shadows global
declaration
Simon
--- io.c.oldTue Jan 8 17:40:19 2002
+++ io.cTue Jan 8 17:41:49 2002
@@ -274,11 +274,11 @@
* IO object. Later we
We changed from index to idx in the code, but not in the comments.
Simon
--- key.c.old Tue Jan 8 08:00:00 2002
+++ key.c Tue Jan 8 17:52:36 2002
@@ -217,7 +217,7 @@
/*=for api key key_element_type
-return the type of element index of KEY key
+return the type of element idx of
In amongst all the unused parameter warnings, gcc throws up these two for
key.c:
key.c: In function `key_element_value_s':
key.c:275: warning: passing arg 2 of `find_bucket' from incompatible
pointer type
key.c: In function `key_set_element_value_s':
key.c:339: warning: assignment
Subject line says it all.
Simon
--- global_setup.c.old Sat Jan 5 14:00:01 2002
+++ global_setup.c Mon Jan 7 20:07:20 2002
@@ -15,6 +15,7 @@
#include parrot/parrot.h
/* Needed because this might get compiled before pmcs have been built */
+void Parrot_PerlUndef_class_init(void);
We're missing a couple of files from the MANIFEST.
Simon
--- MANIFEST.oldSun Jan 6 15:06:12 2002
+++ MANIFESTSun Jan 6 15:07:09 2002
@@ -85,6 +85,7 @@
examples/mops/mops.rb
examples/mops/mops.scheme
global_setup.c
+hints/cygwin.pl
hints/darwin.pl
hints/mswin32.pl
As is perhaps not surprising, given the speed at which Parrot is
evolving, our introduction could do with a bit of an update. The
enclosed patch is a first attempt at this; in it, I've tried to
remove some of the most out-of-date information. Specifically:
* IVs and NVs are now INTVALs
The recent removal of the iton/ntoi ops in favour of an extended meaning
of set causes jakoc to break. Enclosed patch fixes.
Cheers,
Simon
--- jakoc.old Sat Jan 5 21:29:10 2002
+++ jakoc Sat Jan 5 22:29:03 2002
@@ -625,7 +625,7 @@
#
if (substr($a, 0, 1) eq 'I' and
The enclosed patch brings the list of documentation in parrot.pod
up to date.
Simon
--- parrot.pod.old Sat Dec 8 21:24:15 2001
+++ parrot.pod Fri Jan 4 16:44:02 2002
@@ -36,6 +36,10 @@
Describes what PMCs are and how they work.
+=item Fjit.pod
+
+A brief description of Parrot's
The entry in core.ops for puts(s|sc) is missing a =cut and so
writes a load of junk in core_ops.pod. Applied patch fixes.
Simon
--- core.ops.oldThu Jan 3 15:46:20 2002
+++ core.opsThu Jan 3 15:46:54 2002
@@ -370,6 +370,8 @@
Print $1 to standard output stream
+=cut
+
op
201 - 277 of 277 matches
Mail list logo