Re: [perl #24088] [PATCH] Parrot on AIX

2003-10-03 Thread Leopold Toetsch
Adam Thomason <[EMAIL PROTECTED]> wrote:

> gdb works, but ddd doesn't, so the snippet in jit.pod doesn't work.

You don't need ddd, this works in gdb too. You just have to load the
produced object file and then step into the jit code.

> Adam Thomason

leo


Re: [perl #24096] Null Nx fails under JIT on x86

2003-10-03 Thread Leopold Toetsch
Simon Glover <[EMAIL PROTECTED]> wrote:

>  This code (a simplified version of the last test in t/op/number.t)

> set N31, 12.5
> print N31
> print "\n"
> null N31
> print N31
> print "\n"
> end


> 12.5
> 2.0

>  when run under the JIT. However, the other null ops all seem to work
>  properly.

I don't get the wrong result here (i386/linux). What does your

$ cat myconfig  # C:> type myconfig

say?

>  Simon

leo -- appending myconfig to bug reports can't harm - never.


Re: [perl #24088] [PATCH] Parrot on AIX

2003-10-03 Thread Leopold Toetsch
Adam Thomason <[EMAIL PROTECTED]> wrote:

> Ah, sorry, I stripped new files from the patch.  That'll be aix.pl then, =
> attached.

Applied, thanks.
leo


Re: [perl #24096] Null Nx fails under JIT on x86

2003-10-03 Thread Simon Glover

Summary of my parrot 0.0.11.2 configuration:
  configdate='Thu Oct  2 13:50:07 2003'
  Platform:
osname=linux, archname=i686-linux-ld
jitcapable=1, jitarchname=i386-linux,
jitosname=LINUX, jitcpuarch=i386
execcapable=1
perl=/home/scog/local/bin/perl
  Compiler:
cc='gcc', ccflags=' -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
  Linker and Libraries:
ld='gcc', ldflags=' -L/usr/local/lib',
cc_ldflags='',
libs='-lnsl -ldl -lm -lcrypt -lutil'
  Dynamic Linking:
so='.so', ld_shared='-shared -L/usr/local/lib',
ld_shared_flags=''
  Types:
iv=long, intvalsize=4, intsize=4, opcode_t=long, opcode_t_size=4,
ptrsize=4, ptr_alignment=4 byteorder=1234, 
nv=long double, numvalsize=12, doublesize=8
 



Re: [perl #24103] submissions.pod

2003-10-03 Thread Michael Scott

leo -- appending myconfig to bug reports can't harm - never.
Inspired by this bit of wisdom, (and my own earlier silliness with a 
useless backtrace), I've updated Aldo's patch faq to cover submissions 
to Parrot in general. I suggest it should go in docs. 
http://www.parrotcode.org/patchfaq can then be redirected there.

You'll note I'm following the instructions for new files by submitting 
it to bugs-parrot without the [PATCH] prefix. Is this right? Should 
there be a [NEW] prefix as well?
=item 7

Attach the patch and/or new file(s) that you're submitting. 
Double-check that you've done this, because it's really easy to forget.



submissions.pod
Description: application/applefile


submissions.pod
Description: application/text


Mike



Is anything using the source-embedded docs?

2003-10-03 Thread Dan Sugalski
Do we currently have anything that looks at the "/*=for foo bar baz" docs
embedded in the C code? I see it's in some (but not all) of the C files,
and I wanted to double-check the rules as I'm starting the extension code
stuff, but I can't find anything that processes the embedded docs.

Dan


[perl #24103] submissions.pod

2003-10-03 Thread via RT
# New Ticket Created by  Michael Scott 
# Please include the string:  [perl #24103]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt2/Ticket/Display.html?id=24103 >


> leo -- appending myconfig to bug reports can't harm - never.

Inspired by this bit of wisdom, (and my own earlier silliness with a 
useless backtrace), I've updated Aldo's patch faq to cover submissions 
to Parrot in general. I suggest it should go in docs. 
http://www.parrotcode.org/patchfaq can then be redirected there.

You'll note I'm following the instructions for new files by submitting 
it to bugs-parrot without the [PATCH] prefix. Is this right? Should 
there be a [NEW] prefix as well?

Mike





Re: Is anything using the source-embedded docs?

2003-10-03 Thread Michael Scott
On Friday, Oct 3, 2003, at 16:12 Europe/Berlin, Dan Sugalski wrote:

Do we currently have anything that looks at the "/*=for foo bar baz" 
docs
embedded in the C code? I see it's in some (but not all) of the C 
files,
and I wanted to double-check the rules as I'm starting the extension 
code
stuff, but I can't find anything that processes the embedded docs.

	Dan

I already got warnocked on this. See my "Per-entity comments" post.

Mike



Re: Is anything using the source-embedded docs?

2003-10-03 Thread Michael Scott
On Friday, Oct 3, 2003, at 16:58 Europe/Berlin, Dan Sugalski wrote:

When (says the man with poor access to his mail archives at the moment 
:)?
21st Sept 2003



Re: [PATCH] Getting ICU to build on OS X

2003-10-03 Thread Michael Scott
I just heard from Steven R. Loomis (ICU) about this. They have a better 
solution which will go into ICU 2.8.

For those interested, it turns out that gcc -MMD writes out the 
dependency file by itself, therefore redirecting stdout, which contains 
preprocessed text, to the file was wrong.

Here's the new patch.



mh-darwin.patch
Description: Binary data




Re: [perl #24096] Null Nx fails under JIT on x86

2003-10-03 Thread Leopold Toetsch
Simon Glover <[EMAIL PROTECTED]> wrote:
> null N31

>  when run under the JIT. However, the other null ops all seem to work
>  properly.

Fixed. The long double was the problem.

>  Simon

leo


[CVS ci] first attempt to really manage structs

2003-10-03 Thread Leopold Toetsch
I have started to access struct members.
The init_pmc (and set_pmc) can now have an initializer:
/* Initialize the struct with some data. This should be an array
 * of triples of
 *   - datatype (enum from datatypes.h)
 *   - count
 *   - offset
 */
Before continuing here (only C access is done yet), I'd like to 
know, if this conecept is ok.

Feedback welcome,
leo


Beginnings of extension mechanism

2003-10-03 Thread Dan Sugalski
I've checked in the first part of the extension code for Parrot. It lives
in extend.c, is (not yet) documeted in docs/extend.pod with inline docs in
the code.

Current scheme:

Extenders include parrot/extend.h *only*. Extenders use the routines in
extend.c *only* and, if I've done my work right, things should Just Work
Right. Datatypes are opaque to extenders, but the native types to the code
in extend.c.

I'm tempted to do some sort of Funky Linker tricks, so the extension code
links against libparrotextend.so only, which only exports its documented
interface, and that lib links against libparrot in all its glory. (And
yes, I really am on a "Comaptibility at almost all costs" kick for this
stuff)

The interface isn't done, by any means, but it's enough to at least get
Arthur started for Ponie, I hope.

Dan


Safe Mode for Parrot -- Need a volunteer

2003-10-03 Thread Dan Sugalski
Okay, it's time to start in, at least a little, on safe mode for parrot.

While there's a *lot* to ultimately do, the initial part, a paranoid set
of ops and a runloop that understands it, is relatively simple. What we
need is someone to thump the code that generates the core_ops.c files (and
their kindred) to getnerate an alternate set of runloops and op functions.
These functions, to start, are relatively simple. All that needs to be
done is for there to be a preamble emitted for each op function that does
simple validation of the parameters. That means the register number must
be between 0 and 31, and that any P or S register that is an 'in'
parameter must be non-NULL.

Anyone care to take a shot?

Dan


Re: Safe Mode for Parrot -- Need a volunteer

2003-10-03 Thread Gregor N. Purdy
Dan --

Here's a first version that works with the regular core.

You have to explicitly define PARANOID, or the added code
won't get compiled.

I imagine this will have to be adapted to work with the other
core types, but I wanted to throw this out as a starting point.
I'll leave it up to you whether its worth committing it or
starting over fresh thinking about all cores simultaneously.


Regards,

-- Gregor

On Fri, 2003-10-03 at 11:29, Dan Sugalski wrote:
> Okay, it's time to start in, at least a little, on safe mode for parrot.
> 
> While there's a *lot* to ultimately do, the initial part, a paranoid set
> of ops and a runloop that understands it, is relatively simple. What we
> need is someone to thump the code that generates the core_ops.c files (and
> their kindred) to getnerate an alternate set of runloops and op functions.
> These functions, to start, are relatively simple. All that needs to be
> done is for there to be a preamble emitted for each op function that does
> simple validation of the parameters. That means the register number must
> be between 0 and 31, and that any P or S register that is an 'in'
> parameter must be non-NULL.
> 
> Anyone care to take a shot?
> 
>   Dan
-- 
Gregor Purdy[EMAIL PROTECTED]
Focus Research, Inc.   http://www.focusresearch.com/
Index: lib/Parrot/Op.pm
===
RCS file: /cvs/public/parrot/lib/Parrot/Op.pm,v
retrieving revision 1.11
diff -u -r1.11 Op.pm
--- lib/Parrot/Op.pm	20 May 2003 08:37:14 -	1.11
+++ lib/Parrot/Op.pm	4 Oct 2003 06:27:16 -
@@ -98,6 +98,17 @@
 
 
 #
+# arg_count()
+#
+
+sub arg_count
+{
+  my $self = shift;
+  return scalar(@{$self->{ARGS}});
+}
+
+
+#
 # arg_types()
 #
 
@@ -176,7 +187,66 @@
 {
   my $self = shift;
 
-  my $body = $self->body;
+  my $preamble = "";
+
+  if ($self->arg_count > 1) {
+$preamble .= arg_count; $i++) {
+  my $type = $self->arg_type($i);
+  my $dir  = $self->arg_dir($i);
+
+  $preamble .= < '$type', DIR => '$dir' */
+END_C
+
+  if ($self->arg_type($i) =~ m/^(i|n|p|s)$/i ) {
+$preamble .= < 31) {
+PANIC("Register number out of range for arg $i of op '$full_name'!");
+  }
+END_C
+  }
+
+  if ($self->arg_type($i) =~ m/^(p|s)$/i and $self->arg_dir($i) =~ m/^i$/i) {
+$preamble .= code->const_table->const_count) {
+PANIC("Constant number out of range for arg $i of op '$full_name'!");
+  }
+  if (interpreter->code->const_table->constants[cur_opcode[$i]]->type != $const_type_tag) {
+PANIC("Constant of wrong type for arg $i of op '$full_name'!");
+  }
+END_C
+  }
+
+}
+
+$preamble .= size)
 if $self->type eq 'auto';