At 10:23 on 06/07/2002 EDT, Melvin Smith <[EMAIL PROTECTED]> wrote:

> At 03:28 AM 6/7/2002 -0400, Josh Wilmes wrote:
> 
> >It appears that the mechanism for choosing an os layer for PIO could use
> >some work, and it also appears that io_stdio is incomplete.
> 
> Yes to both.
> 
> The mechanism:
> 
> #ifndef WIN32
>      PIO_push_layer(interpreter, PIO_base_new_layer(&pio_unix_layer), NULL);
> #else
>      PIO_push_layer(interpreter, PIO_base_new_layer(&pio_win32_layer), NULL);
> #endif
> 
> Should just be transparently
> 
> PIO_push_payer(...., &pio_sys_layer, ... )
> 
> This means renaming all of io_unix/io_win32 to io_sys
> since you would never have 2 OS dependant layers compiled at the
> same time. I've just been too lazy to rework it.

So something like the way platform.[ch] work then?  copy 
io_{unix|win32|stdio} to io_sys.c during the build process?

If we're serious about this miniparrot stuff, i'd like to see the code 
reorganized so that all the platform-specific stuff lives in one place, 
and everything else has to be pure ANSI C. 

But for now i'm just doing a proof-of-concept.

> >I'm playing with a miniparrot setup, but one of its requirements is that
> >it be able to run exclusively on io_stdio, which doesn't appear to be
> >possible at this time.
> 
> When you say io_stdio, I assume you mean STDIO, right?
> 
> According to Dan, the goal for Parrot was to run without STDIO, period.
> Anway, io_stdio is dreadfully incomplete. Its sort of frozen where
> I left it in January, but it needs to be renamed to io_buf or
> something. The one you are looking at is not going to be a wrapper
> for STDIO, it is going to be a buffered IO layer on top of an OS layer.
> If you want, just rename it to io_buf.c and commit, and then you
> can use io_stdio as the name implies.
> 
> >I haven't really dug into the PIO code yet- i wanted to check with whoever
> >had been working on it before I do anything.
> 
> Have at it. Dan had said no stdio when I first started, so thats what I'm
> assuming until further notice.

I'd like some clarification from Dan then, before I proceed further along 
that path.

Just to give you an idea, here's where i'm at now with my miniparrot stuff:

$ perl Configure.pl --miniparrot; make lib_deps_object
Parrot Version 0.0.6 Configure 2.0
Copyright (C) 2001-2002 Yet Another Society

Hello, I'm Configure.  My job is to poke and prod your system to figure out 
how to build Parrot.  The process is completely automated, unless you passed in
the `--ask' flag on the command line, in which case it'll prompt you for a few
pieces of info.

Since you're running this script, you obviously have Perl 5--I'll be pulling 
some defaults from its configuration.

Checking MANIFEST...done.
Setting up Configure's data structures...done.
Checking for --miniparrot...Yes..done.
Loading platform hints file...no hintsdone.
Determining what C compiler and linker to use...done.
Determining what types Parrot should use...done.
Determining what opcode files should be compiled in...done.
Setting up experimental systems...done.
Probing for C headers...done.
Determining some sizes...done.
Computing native byteorder for Parrot's wordsize...done.
Figuring out how to pack() Parrot's types...done.
Figuring out what formats should be used for sprintf...done.
Determining if your C compiler is actually gcc...done.
Determining architecture, OS and JIT capability...done.
Verifying that the compiler supports function pointer casts...done.
Determining if your compiler supports computed goto...done.
Generating config.h...done.
Writing Parrot::Config module...done.
Generating Makefiles...done.
Moving platform files into place...done.
Okay, we're done!

You can now use `make' (or your platform's equivalent to `make') to build your
Parrot. After that, you can use `make test' to run the test suite.

Happy Hacking,
        The Parrot Team

perl vtable_h.pl
perl make_vtable_ops.pl > vtable.ops
perl ops2c.pl C core.ops debug.ops io.ops rx.ops vtable.ops
perl ops2c.pl CPrederef core.ops debug.ops io.ops rx.ops vtable.ops
cc -DMINIPARROT -ansi -pedantic  -I./include   -o exceptions.o -c exceptions.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o global_setup.o -c global_setup.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o interpreter.o -c interpreter.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o parrot.o -c parrot.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o register.o -c register.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o core_ops.o -c core_ops.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o core_ops_prederef.o -c 
core_ops_prederef.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o memory.o -c memory.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o packfile.o -c packfile.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o stacks.o -c stacks.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o string.o -c string.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o encoding.o -c encoding.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o chartype.o -c chartype.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o runops_cores.o -c runops_cores.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o trace.o -c trace.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o pmc.o -c pmc.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o key.o -c key.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o hash.o -c hash.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o platform.o -c platform.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o resources.o -c resources.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o rx.o -c rx.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o rxstacks.o -c rxstacks.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o embed.o -c embed.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o warnings.o -c warnings.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o misc.o -c misc.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o packout.o -c packout.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o byteorder.o -c byteorder.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o debug.o -c debug.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o io/io.o -c io/io.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o io/io_stdio.o -c io/io_stdio.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o io/io_unix.o -c io/io_unix.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o io/io_win32.o -c io/io_win32.c
cd classes && make && cd ..
make[1]: Entering directory `/raid/home/josh/devel/parrot-rw/classes'
perl pmc2c.pl default.pmc
cc -DMINIPARROT -ansi -pedantic  -I../include -o default.o -c default.c
perl pmc2c.pl array.pmc
Scanning /raid/home/josh/devel/parrot-rw/classes/array.pmc...
cc -DMINIPARROT -ansi -pedantic  -I../include -o array.o -c array.c
perl pmc2c.pl perlint.pmc
Scanning /raid/home/josh/devel/parrot-rw/classes/perlint.pmc...
cc -DMINIPARROT -ansi -pedantic  -I../include -o perlint.o -c perlint.c
perl pmc2c.pl perlstring.pmc
Scanning /raid/home/josh/devel/parrot-rw/classes/perlstring.pmc...
cc -DMINIPARROT -ansi -pedantic  -I../include -o perlstring.o -c perlstring.c
perl pmc2c.pl perlnum.pmc
Scanning /raid/home/josh/devel/parrot-rw/classes/perlnum.pmc...
cc -DMINIPARROT -ansi -pedantic  -I../include -o perlnum.o -c perlnum.c
perl pmc2c.pl perlarray.pmc
Scanning /raid/home/josh/devel/parrot-rw/classes/perlarray.pmc...
cc -DMINIPARROT -ansi -pedantic  -I../include -o perlarray.o -c perlarray.c
perl pmc2c.pl perlhash.pmc
Scanning /raid/home/josh/devel/parrot-rw/classes/perlhash.pmc...
cc -DMINIPARROT -ansi -pedantic  -I../include -o perlhash.o -c perlhash.c
perl pmc2c.pl perlundef.pmc
Scanning /raid/home/josh/devel/parrot-rw/classes/perlundef.pmc...
cc -DMINIPARROT -ansi -pedantic  -I../include -o perlundef.o -c perlundef.c
perl pmc2c.pl parrotpointer.pmc
Scanning /raid/home/josh/devel/parrot-rw/classes/parrotpointer.pmc...
cc -DMINIPARROT -ansi -pedantic  -I../include -o parrotpointer.o -c parrotpointer.c
perl pmc2c.pl intqueue.pmc
Scanning /raid/home/josh/devel/parrot-rw/classes/intqueue.pmc...
cc -DMINIPARROT -ansi -pedantic  -I../include -o intqueue.o -c intqueue.c
make[1]: Leaving directory `/raid/home/josh/devel/parrot-rw/classes'
cc -DMINIPARROT -ansi -pedantic  -I./include   -o encodings/singlebyte.o -c 
encodings/singlebyte.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o encodings/utf8.o -c encodings/utf8.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o encodings/utf16.o -c 
encodings/utf16.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o encodings/utf32.o -c 
encodings/utf32.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o chartypes/unicode.o -c 
chartypes/unicode.c
cc -DMINIPARROT -ansi -pedantic  -I./include   -o chartypes/usascii.o -c 
chartypes/usascii.c
perl lib_deps.pl object exceptions.o global_setup.o interpreter.o parrot.o register.o 
core_ops.o core_ops_prederef.o memory.o packfile.o stacks.o string.o encoding.o 
chartype.o runops_cores.o trace.o pmc.o key.o hash.o platform.o  resources.o rx.o 
rxstacks.o embed.o warnings.o misc.o packout.o byteorder.o debug.o io/io.o 
io/io_stdio.o io/io_unix.o io/io_win32.o classes/default.o classes/array.o 
classes/perlint.o classes/perlstring.o classes/perlnum.o classes/perlarray.o 
classes/perlundef.o classes/perlhash.o classes/parrotpointer.o classes/intqueue.o 
encodings/singlebyte.o encodings/utf8.o encodings/utf16.o encodings/utf32.o 
chartypes/unicode.o chartypes/usascii.o
Found 1911 symbols defined within the 48 supplied object files.
Found 57 external symbols
Of these, 8 are not defined by ANSI C89:
    close (in io/io_unix.o)
    creat (in io/io_unix.o)
    isatty (in io/io_unix.o)
    lseek (in io/io_unix.o)
    open (in embed.o,io/io_unix.o)
    read (in core_ops.o,core_ops_prederef.o,embed.o,io/io_unix.o)
    stat (in embed.o)
    write (in core_ops.o,core_ops_prederef.o,io/io_unix.o)


Ideally, for miniparrot, there should be nothing spit out here.  All told, 
this isn't too bad.  Most are in the IO layer and embedding.

--Josh


Reply via email to