Some tests for stack operations, pushing and popping, except
for pmcs. Suggest: t/op/stacks.t
Alex Gough
--
Hatred is the coward's revenge for being intimidated.
#
#! perl -w
# Tests for stack operations, currently push_*, push_*_c and pop_*
# where * != p.
# Assembler co
This is all done against a snapshot from a few hours ago and is one
big patch as $hacking_machine isn't talking to the internet until next
week...
Alex Gough
--
If history repeats itself, and the unexpected always happens,
how incapable must Man be of learning from experience!
diff -urN pcl
is patch (below) only following ops remain without tests:
print_nc
push_p
pop_p
clear_p
These ops have tests, but are skipped due to problems or being broken:
clear_s
jump_i
Alex Gough
--
If you are not too long, I will wait here for you all my life.
### against a snapshot from a few
Chopn is broken for n < 0, here a fix and tests.
Alex Gough
--
To have the reputation of possessing the most perfect
social tact, talk to every woman as if you loved her,
and to every man as if he bored you.
##
Index: strin
fault.
0x0 in ?? ()
I'm getting tired now, so someone else can inherit this headache.
Alex Gough
--
Tomatoes make you happy. Have you ever met a miserable
Italian? They are irritating but never miserable.
On Thu, 18 Oct 2001, Gregor N. Purdy wrote:
>
> I believe this will resolve the problem. Too bad the GNU tools didn't
> complain at me here when I missed the 'extern'. Oh, well.
>
This is healthy again.
Alex Gough
--
That one never has to vary G or introduce any fu
}
^
3 errors detected in the compilation of "classes/intclass.c".
*** Error code 2 (bu21)
Alex Gough
--
The only man I know who behaves sensibly is my tailor; he
takes my measurements anew each time he sees me. The rest
go on with their old measurements and expect me to fit them.
On Tue, 23 Oct 2001, Simon Cozens wrote:
> On Tue, Oct 23, 2001 at 02:39:37PM +0100, Alex Gough wrote:
> > Parrot_base_vtables[enum_class_int] = (struct _vtable) {
>
> This construct is a little dodgy, but I couldn't think of
> a better way to do it. Alex, could you try m
ters[cur_opcode[3]]->vtable->num_type)(interpreter->pmc_reg->registers[cur_opcode[2]],interpreter->pmc_reg->registers[cur_opcode[3]],interpreter->pmc_reg->registers[cur_opcode[1]]);
^
> > Okay, can someone stop with the gcc-isms?
>
> Guilty again. But Ale
es out).
Alex Gough
--
The grand old Duke of York,
He had ten thousand men.
But then again, you know how people talk.
ding a test that doesn't use the
helper subs, just make sure the plan => is updated and all the new
tests have names.
Alex Gough
returns an INTVAL, not an int.
Alex Gough
diff -ru parrot_orig/string.c parrot/string.c
--- parrot_orig/string.cWed Oct 31 17:51:31 2001
+++ parrot/string.c Sat Nov 10 18:16:27 2001
@@ -83,6 +83,33 @@
return s->strlen;
}
+/*=for api string string_ord
+ * return the lengt
On Sun, 11 Nov 2001, Alex Gough wrote:
(but not quite enough...)
> On Sat, 10 Nov 2001, Jeff wrote:
>
> > string.pasm patches the operators mentioned
> > The other file, 'parrot.pasm', is a miniature Parrot compiler, written
> > in Parrot.
> >
>
rite the docs and ops to use a S register instead. Now all
> I need to do is figure out something to make S stand for that encompasses
> both uses. (Buffer pointer and generic pointer)
>
The "She went that way" register?
Sorry,
Alex Gough
st in basic.t expected the wrong output.
Alex Gough
--
History teaches us that men and nations behave wisely
once they have exhausted all other alternatives.
##
diff -urN clean/parrot/basic_opcodes.ops parrot/basic_opcodes.ops
--- clean/parrot/basic_opcodes.ops Wed Sep 26 20:00:00
s... other than this string test and almost all of pmc.t (3-22)
os/2 is working. More on that later though.
--
Alex Gough
--
http://users.ox.ac.uk/~shug0957/
I've managed to get parrot building and testing nicely on an os/2 box
(thanks to Nick Burch). At the moment it needs gcc, make, bash and
dynaloading libraries installed on the system.
Alex Gough
--
And if we tamper with our inheritance, so what? What is more ours to
tamper with? What
I'd like some abs ops so I can make the fp tests better, does
the attached patch do the right thing? I'll commit tomorrow if
no one complains.
Alex Gough
--
http://users.ox.ac.uk/~shug0957/
Index: core.ops
===
RCS f
point fabsl() and fabsf()?
>[now that our IVs and NVs can be long longs and long doubles.
> and if labs() isn't C89 we can't even safely do IV is long]
>
I think it makes sense to do what simon says, as this way the size of
FLOATVAL and INTVAL can be bigger than double/lo
On Thu, 29 Nov 2001, Brent Dax wrote:
> Alex Gough:
> # I've managed to get parrot building and testing nicely on an os/2 box
> # (thanks to Nick Burch). At the moment it needs gcc, make, bash and
> # dynaloading libraries installed on the system.
>
> # $c{iv} = "l
I've modified Configure.pl to take defaults from a previous build (if
there was one). This should play nicely with hints, and '--defaults'
by doing the Right Thing. I've added a '--nopolicy' option to disable
this.
Patch below sig.
Alex Gough
--
W.W- &quo
On Sun, 7 Oct 2001, Andy Dougherty wrote:
> On Sat, 6 Oct 2001, Alex Gough wrote:
> > I've modified Configure.pl to take defaults from a previous build (if
> > there was one). This should play nicely with hints, and '--defaults'
> > by doing the Right Thing.
of data-preserving
> push_x ops, save_x. Patch after .sig.
The following have skipped tests in stacks.t:
push_n_c
push_i_c
push_s_c
as they were documented in doc/parrot_assembly.pod but the
functionality wasn't written when I wrote the tests so you may want to
call them after these.
uot;$1") if system("grep -q -e\"$1\" t/op/*.dis")' < basic_opcodes.ops
print_nc
push_p
pop_p
clear_p
shl_i_ic
bounds_ic
trace_ic
Alex Gough
--
You are the weakest link. Have a nice day.
###
Index: t/op/integer.t
On 16 Oct 2001, Brian Wheeler wrote:
> I'm getting some weird results when using substr. Here's my test
> program:
It's probably something wrong with the constant table or the assembly
phase, if the script is changed so that S1 is set to "-", say, it does
more what I expect.
set S0
On Tue, 16 Oct 2001, Alex Gough wrote:
> On 16 Oct 2001, Brian Wheeler wrote:
>
> > I'm getting some weird results when using substr. Here's my test
> > program:
>
> It's probably something wrong with the constant table or the assembly
> phase, if
d really happen is left as an exercise for the
interested reader.
Alex Gough
--
w the style of these tests as it will be much easier to unperl
them in the future. Also in aid of reducing future work could all
tests be written with CODE and OUTPUT sections.
Alex Gough
The string to number conversion stuff should really be done by the
string encodings... I think this is the right way to get this
happening, comments?
Alex Gough
Index: string.c
===
RCS file: /home/perlcvs/parrot/string.c,v
On Mon, 3 Dec 2001, Simon Cozens wrote:
> On Mon, Dec 03, 2001 at 05:42:15PM +0000, Alex Gough wrote:
> > The string to number conversion stuff should really be done by the
> > string encodings... I think this is the right way to get this
> > happening, comments?
>
>
> At 21:44 on 12/03/2001 EST, "Bryan C. Warnock" <[EMAIL PROTECTED]> wrote:
>
> > Not to bypass the archival of email, but do we have an IRC channel for
> > real-time discussions?
> >
Also:
irc.rhizomatic.net (or one of their myriad other servers)
#parrot
Alex Gough
r the tinderbox.
Alex Gough
*) tells
the encoding this. No one else gets to find out, nothing to see here,
move along now.
FLOATVAL string_to_num (struct Parrot_Interp *interpreter, STRING *s) {
if (s == NULL) {
return 0.0;
}
else {
return s->encoding->extract_num(s->bufstart, s->bufused
[Tue, Dec 04, 2001 at 08:37:36AM -0500: Andy Dougherty]
> My cvs repository contained a file t/op/pmc.t. However, that files isn't
> included in MANIFEST. Is it supposed to be there?
It should be in MANIFEST, and now is. I don't know if that will quiet
the tinderclients though.
Alex
--
On Wed, 5 Dec 2001, Simon Cozens wrote:
> Since 0.0.3 is exceptionally imminent, can I have a roll-call of systems
> which are working and not working?
FreeBSD 4.4 / gcc
Irix6.5 / MIPSPro
Alex
tring->BigNum and string->BigInt
conversion, and if things are to upgrade gracefully and silently this
might need to happen as the string is scanned.
Alex Gough
it real easy for things
> to drift.
There are certainly save and restore tests, as I used these in the macro
which does fp equality. There are no tests yet for rotate and clone
though.
Alex Gough
key_s
inc_key_s_i
and_p_p_p
or_p_p_p
not_p_p
Alex Gough
seem to think the copy functionality is appropriate.
>
I, for one, like the current shallow pointer copy version. It fits nicely
with the way perl passes parameters into subs (by reference).
Alex Gough
Exceptions: Please? (And can they be renamed: set_eh -> set_ehoh ?)
Alex Gough
print "done\n"
end
yuck!)
Alex Gough
--
It's is not, it isn't ain't, and it's it's, not its, if you mean it
is. If you don't, it's its. Then too, it's hers. It isn't her's. It
isn't our's either. It
fore we let thousands of code points act as
a minus sign.
Alex Gough
I've added a whole lot of string stuff, so that a repeat op can work.
When writing tests (*cough*) for your pmc stuff, if they're specific
to a given class, use or create a pmc_[classl].t file, so that the
tests you're running to check your shiny new features run through
fairly
h '*', think dynamic.
so we'll end up with something like:
void divide (PMC* value, INT(BOOL?)VAL reversed,PMC *dest) {
if (value->flags & CARES) {
if value cares more than me, then...
despatch to value, reverse order
}
if (revers
monstrosity of
twisty little inter-relations and weird syntax. Remember also that
one day (my son...) we'll need to parse and generate the .c code
without the helping hand of perl, so don't get carried away with
making a little language we don't really need.
Alex Gough
ashing and \0 in
strings, failing tests now applied.
Alex Gough
ry wrong
somewhere else, could someone with a windows box give it a whirl or
anyone with any flame produce it now...
Alex Gough
#
Index: test_main.c
===
RCS file: /home/perlcvs/parrot/test_main.c,v
retrieving
o
keep the code that cares about termination away from the general string
code as it's being a bit obscuring at present.
Alex Gough
annot
possibly make the same mistake themselves. I've made the needed changes.
Alex Gough
On Thu, 10 Jan 2002, Nicholas Clark wrote:
> On Thu, Jan 10, 2002 at 03:06:38PM +0000, Alex Gough wrote:
> > Also, I'm a bit concerned that our null termination games:
> I would strongly recommend that perl6 mandates that buffers are not nul
> terminated. Anything tha
t.pmc, which can then
explode in the correct manner or do something sensible in terms of the
other behaviours of the pmc. Adding "not implemented" code to every
pmc type is pointless duplication and certainly not the right way to
halt compiler warnings.
Alex Gough
gt; seem to remember that some preprocessors require strange tricks to
> concatenate strings.
K&R says that this is an OK thing to do.
Alex Gough
On Mon, 21 Jan 2002, Nicholas Clark wrote:
> I thought that it should be this
>
> INTVAL (*get_digit)(UINTVAL c);
>
> not this
>
> UINTVAL (*get_digit)(UINTVAL c);
>
It seems you thought both, I've made a small modification and applied
the patch, thanks.
Alex Gough
On Mon, 21 Jan 2002, Nicholas Clark wrote:
> Before:
lots.
> After:
less.
Applied, thanks.
Alex Gough
On Mon, 21 Jan 2002, Nicholas Clark wrote:
> This eliminates many gcc warnings from pmc code by
Applied, thanks.
Alex Gough
ncoding and character set agnostic. The
unicode character set will need to eventualy provide a get_digit
method which does turn \x{FF10} into a numeric zero. It's just that
our unicode support is lagging behind ascii, with most (all?) of the
methods being nothing more than placeholders.
Alex Gough
t the output of internal (parrot level) fatal
errors and will want to continue to do so. These should also not be
easily triggered from the language level, so must be exercised by
throwing appropriate bytecode at the interpreter.
Alex Gough
--
I keep thinking that people talk about the economy
it.
[1] or TODO_NOW or TO_REALLY_DO or JFDI or something.
Alex Gough
hichever comes first.
We simply guarantee that Perl will always give you enough rope to hang
yourself, you just need to ask nicely.
Alex Gough
ring");
> + new P0, PerlUndef
> +set S0, P0
> + end
> +CODE
> +OUTPUT
Having no output from a test is bad, as it is indistinguishable from a
segfault (although the suite might note this now). Also we'll want to
be very careful about testing PerlUndef once we've added warnings in.
Alex Gough
In general I expect that a PerlString will be turned into
a string constant then loaded into a PythonString by code that knows what
it's doing. After all, we need to do something simillar when passing
SVs into C code at the moment, and I'm sure Inline::* will provide not
only endl
ot;0" and not ""?
"string" isn't "scalar" context, I think this should stringify the
array, so that @foo = qw(elephants hide in custard) becomes "@foo" ->
"elephantshideincustard".
> --- core.ops.old Fri Feb 1 15:57:44 2002
&g
be re-done more efficiently than I want
to work out how right now. But that's ok, because there are tests, so
we can easily tell if a better set of guts is still correct.
Anyhow, that's quite enough for now,
Alex Gough
--
Every reader should ask himself periodically "Toward what end
variable behaves in different circumstances. We can
change the pointer in every instance except those where the receiving
PMC does not let us, in general a PMC will be happy to lose its
identity.
Alex Gough
--
#!/usr/bin/perl
use Quantum::Entanglement qw(:DEFAULT :complex);
$language = entangle(
that Dog::new will actually return a Dog
object or that Cat::new won't, that's just not Perl. If we're to
check the type of the value being stored in $spot, we pretty much have
to do it at run time.
Alex Gough
--
He may look like an idiot, and talk like an idiot...but
don't let that fool you. He really is an idiot.
yway, if GC is to free chunks appropriately)?
> If your buffer header can't be reached from the root set, you'll end
> up having it reclaimed when a sweep is made.
Which bits of a PMC count as being reachable from the root set?
Alex Gough
On Mon, 18 Feb 2002, Buggs wrote:
> Index: docs/pdds/pdd6.pod
Yuck! Can we not have 01_parrot.pod or something we can spot from
a distance?
I'll fix up bignum pdd-ness once I'm a bit less busy, which may not be
for a week or so.
Alex Gough
This is a slightly confused first attempt at a pdd. I'll start to add
extra details over the next couple of days.
Is 8 the right number? And can someone who knows how fix the ones in
the repository to have more meaningful file names?
Alex
On Fri, 22 Feb 2002, Nicholas Clark wrote:
> On Fri, Feb 22, 2002 at 03:08:58AM +0000, Alex Gough wrote:
> > =head2 Rounding
> >
> > The rounding part of the context defines the rounding algoritm to be
> > used, the following are provided (examples assume a preci
y.
>
> OK, so the machine only has 16M ram and by default 37M swap. But I don't think
On a slightly more beefy FreeBSD 4.5 box I'm seeing cc1 grow to a little
more than 50M (with -Os), which is indeed a walk on the wide side.
Alex Gough
hicle for a packed data structure.
Alex Gough
num_atest.pl rounding.decTest | grep tests
Ran 546 tests (546,0) = 100%
Which, while not extremely right, is certainly far from extremely
wrong.
Alex Gough
--
I keep thinking that people talk about the economy now just like
they'd have talked about appeasing gods, centuries ago. "Po
On Sun, 24 Feb 2002, Bryan C. Warnock wrote:
> On Thursday 21 February 2002 22:08, Alex Gough wrote:
> >
> > It is therefore the current I which determines which numeric
> > type is being considered during a particular operation, this makes it
> > easy to upgrade from
On Tue, Feb 26, 2002 at 10:57:45AM +, David Chan was heard to mutter:
> On Fri, Feb 22, 2002 at 03:08:58AM +0000, Alex Gough wrote:
> > =item Division
> >
> > Under integer conditions, division is halted once the first fractional
> > digit is calculated, with the r
solution and b) I'm undoubtedly on
crack with this one. Nevertheless, it appeals to me although I'm
slighty worried by this.
Alex Gough
--
The universe can't lie; it just does what it does, and there's nothing
else to it. People are the very opposite. There's nothing to which
we'll devote more time, and energy, and cunning, than burying the truth.
---
> pdd8???? ??
This might be bignums, which I've been a bit too busy to finish and
commit.
Alex Gough
the larger
version. This means that a mini-parrot program must have identical
behaviour on both the cut-down and complete versions of the run time.
Alex Gough
--
It is easier -- even quicker, once you have the habit -- to say
"In my opinion it is not an unjustifiable assumption that"
than to say "I think".
N'T DO THAT. Defensive
programming is good, segfaulting is bad, remember?
Alex Gough
I've pretty much finished this off, although I need to edit it to make
complete sense, but am busy so this might not happen right this minute
now.
Oh, and I've stolen number 14, so as what I can put it into cvs.
Enjoy...
Alex Gough
--
Once people ceased to understand how the machi
ize."
And previous discussion decided that a decimal arithmetic was more
useful for the big number library than any other form.
Alex Gough
--
Dear Mary,
I yearn for you tragically.
R. O. Shipman, Chaplain, U.S. Army
x27;t like
> GC to cause a stall.
>
> Those kinds of GC hints shouldn't break across upgrades.
Are we allowing bytecode compiled under an earlier version to continue
working on a later version of the interpreter, as the answer to that
question pretty much limits where the line has to be drawn.
Alex Gough
FreeBSD 4.5 / gcc:
All tests successful, 20 subtests skipped.
Files=19, Tests=313, 343 wallclock secs (230.79 cusr + 21.33 csys = 252.12 CPU)
Irix 6.5 / MIPSPro:
(After a little Makefile.in fix)
All tests successful, 20 subtests skipped.
Files=19, Tests=313, 345 wallclock secs (292.12 cusr + 36.
could be stored somewhere
should (nay, must) be able to return a fully fledged PMC.
That is to say, in "if ( !exp1 ) { ... }", !exp1 merely has to be true
or false, while $foo = !exp1 leaves !exp1 needing to be all manner of
things.
Alex Gough
--
It was at this time that some very pi
[Sat, Jun 12, 2004 at 11:39:27AM +0200: [EMAIL PROTECTED]
>
> | Time for these as well. There's a partial implementation of them in
> | types/bignum.c. I think it's time to move that to src/ (and the
> | header file to .h) and get it integrated into parrot.
>
> I'm not really sure if types
[Tue, Aug 03, 2004 at 07:45:57PM +0100: Nicholas Clark]
> On Tue, Aug 03, 2004 at 03:09:02PM +0100, Leon Brocard wrote:
> > Dan Sugalski sent the following bits through the ether:
> >
> > > If someone's tempted to do 3) Write our own Unicode system, I'm OK
> > > with that too. The string int
85 matches
Mail list logo