Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

miniparrot, a first attempt.

1 view
Skip to first unread message

Josh Wilmes

unread,
Oct 31, 2002, 10:45:30 PM10/31/02
to perl6-i...@perl.org

I've banged together a first attempt at a miniparrot- that is, something
that can be built on any ANSI C system without anything other than a
compiler.

Right now, as a proof of concept, it's building a source tree and a shell
script which would build miniparrot under gcc. A real version would
include platform-specific build scripts which are a tad smarter- but since
all they have to do now is run a sequence of compile steps, they don't
need to do much other than figure out what compiler to use and how to call
it.

Here's a log of how to use it. The way I would envision this working is
that we would periodically run this and check the results into CVS, so
that there was a miniparrot tree available alongside the real one. We
could tinderbox it as well.

Note: Until the stack direction issue is sorted out, this isn't really
going to work across platforms.

josh@galactic:~/devel/parrot-rw% make miniparrot-update
tools/dev/rebuild_miniparrot.pl
** tools/dev/rebuild_miniparrot.pl: reconfiguring parrot for miniparrot build
- perl Configure.pl --miniparrot
Parrot Version 0.0.8 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 hints) done.
Enabling debugging...(none requested) done.
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.
Determining what pmc files should be compiled in...done.
Tweaking ccflags...done.
Determining your minimum pointer alignment...done.
Probing for C headers...done.
Determining some sizes...done.
Determining stack growth direction...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.
Determining what allocator to use ... (gc) done.
Generating config.h...done.
Writing Parrot::Config module...done.
Generating Makefiles...done.
Recording this configuration in myconfig...done.
Moving platform files into place...done.
Generating libparrot.def...done.
Generating core pmc list...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

** tools/dev/rebuild_miniparrot.pl: initiating parrot prebuild
- make miniparrot-prebuild
make[1]: Entering directory `/home/josh/devel/parrot-rw'
perl vtable_h.pl
perl ops2c.pl C core.ops debug.ops io.ops math.ops rx.ops
perl ops2c.pl CPrederef core.ops debug.ops io.ops math.ops rx.ops
perl ops2pm.pl core.ops debug.ops io.ops math.ops rx.ops
perl fingerprint_c.pl > fingerprint.c
** tools/dev/rebuild_miniparrot.pl: removing files in miniparrot directory


- cd classes; make array.c boolean.c continuation.c coroutine.c csub.c default.c intlist.c intqueue.c key.c multiarray.c perlarray.c perlhash.c perlint.c perlnum.c perlstring.c perlundef.c pointer.c scalar.c sub.c
make[2]: Entering directory `/home/josh/devel/parrot-rw/classes'
perl pmc2c.pl array.pmc
Scanning /home/josh/devel/parrot-rw/classes/array.pmc...
perl pmc2c.pl boolean.pmc
Scanning /home/josh/devel/parrot-rw/classes/boolean.pmc...
Scanning /home/josh/devel/parrot-rw/classes/perlint.pmc...
Scanning /home/josh/devel/parrot-rw/classes/scalar.pmc...
perl pmc2c.pl continuation.pmc
Scanning /home/josh/devel/parrot-rw/classes/continuation.pmc...
perl pmc2c.pl coroutine.pmc
Scanning /home/josh/devel/parrot-rw/classes/coroutine.pmc...
perl pmc2c.pl csub.pmc
Scanning /home/josh/devel/parrot-rw/classes/csub.pmc...
perl pmc2c.pl default.pmc
perl pmc2c.pl intlist.pmc
Scanning /home/josh/devel/parrot-rw/classes/intlist.pmc...
perl pmc2c.pl intqueue.pmc
Scanning /home/josh/devel/parrot-rw/classes/intqueue.pmc...
perl pmc2c.pl key.pmc
Scanning /home/josh/devel/parrot-rw/classes/key.pmc...
perl pmc2c.pl multiarray.pmc
Scanning /home/josh/devel/parrot-rw/classes/multiarray.pmc...
Scanning /home/josh/devel/parrot-rw/classes/array.pmc...
perl pmc2c.pl perlarray.pmc
Scanning /home/josh/devel/parrot-rw/classes/perlarray.pmc...
Scanning /home/josh/devel/parrot-rw/classes/array.pmc...
perl pmc2c.pl perlhash.pmc
Scanning /home/josh/devel/parrot-rw/classes/perlhash.pmc...
perl pmc2c.pl perlint.pmc
Scanning /home/josh/devel/parrot-rw/classes/perlint.pmc...
Scanning /home/josh/devel/parrot-rw/classes/scalar.pmc...
perl pmc2c.pl perlnum.pmc
Scanning /home/josh/devel/parrot-rw/classes/perlnum.pmc...
Scanning /home/josh/devel/parrot-rw/classes/scalar.pmc...
perl pmc2c.pl perlstring.pmc
Scanning /home/josh/devel/parrot-rw/classes/perlstring.pmc...
Scanning /home/josh/devel/parrot-rw/classes/scalar.pmc...
perl pmc2c.pl perlundef.pmc
Scanning /home/josh/devel/parrot-rw/classes/perlundef.pmc...
Scanning /home/josh/devel/parrot-rw/classes/perlint.pmc...
Scanning /home/josh/devel/parrot-rw/classes/scalar.pmc...
perl pmc2c.pl pointer.pmc
Scanning /home/josh/devel/parrot-rw/classes/pointer.pmc...
perl pmc2c.pl scalar.pmc
Scanning /home/josh/devel/parrot-rw/classes/scalar.pmc...
perl pmc2c.pl sub.pmc
Scanning /home/josh/devel/parrot-rw/classes/sub.pmc...
make[2]: Leaving directory `/home/josh/devel/parrot-rw/classes'


** tools/dev/rebuild_miniparrot.pl: copying source files to miniparrot directory
- copy include/parrot/config.h => miniparrot/include/parrot/config.h
- copy include/parrot/platform.h => miniparrot/include/parrot/platform.h
- copy include/parrot/has_header.h => miniparrot/include/parrot/has_header.h
- copy lib/Parrot/Config.pm => miniparrot/lib/Parrot/Config.pm
- copy lib/Parrot/PMC.pm => miniparrot/lib/Parrot/PMC.pm
- copy platform.c => miniparrot/platform.c
- copy include/parrot/core_pmcs.h => miniparrot/include/parrot/core_pmcs.h
- copy core_pmcs.c => miniparrot/core_pmcs.c
- copy include/parrot/vtable.h => miniparrot/include/parrot/vtable.h
- copy include/parrot/oplib/core_ops.h => miniparrot/include/parrot/oplib/core_ops.h
- copy include/parrot/oplib/core_ops_prederef.h => miniparrot/include/parrot/oplib/core_ops_prederef.h
- copy core_ops.c => miniparrot/core_ops.c
- copy core_ops_prederef.c => miniparrot/core_ops_prederef.c
- copy fingerprint.c => miniparrot/fingerprint.c
- copy lib/Parrot/OpLib/core.pm => miniparrot/lib/Parrot/OpLib/core.pm
- copy include/parrot/config.h => miniparrot/include/parrot/config.h
- copy include/parrot/exceptions.h => miniparrot/include/parrot/exceptions.h
- copy include/parrot/io.h => miniparrot/include/parrot/io.h
- copy include/parrot/op.h => miniparrot/include/parrot/op.h
- copy include/parrot/register.h => miniparrot/include/parrot/register.h
- copy include/parrot/string.h => miniparrot/include/parrot/string.h
- copy include/parrot/events.h => miniparrot/include/parrot/events.h
- copy include/parrot/interpreter.h => miniparrot/include/parrot/interpreter.h
- copy include/parrot/memory.h => miniparrot/include/parrot/memory.h
- copy include/parrot/parrot.h => miniparrot/include/parrot/parrot.h
- copy include/parrot/stacks.h => miniparrot/include/parrot/stacks.h
- copy include/parrot/packfile.h => miniparrot/include/parrot/packfile.h
- copy include/parrot/global_setup.h => miniparrot/include/parrot/global_setup.h
- copy include/parrot/vtable.h => miniparrot/include/parrot/vtable.h
- copy include/parrot/oplib/core_ops.h => miniparrot/include/parrot/oplib/core_ops.h
- copy include/parrot/oplib/core_ops_prederef.h => miniparrot/include/parrot/oplib/core_ops_prederef.h
- copy include/parrot/runops_cores.h => miniparrot/include/parrot/runops_cores.h
- copy include/parrot/trace.h => miniparrot/include/parrot/trace.h
- copy include/parrot/pmc.h => miniparrot/include/parrot/pmc.h
- copy include/parrot/key.h => miniparrot/include/parrot/key.h
- copy include/parrot/hash.h => miniparrot/include/parrot/hash.h
- copy include/parrot/resources.h => miniparrot/include/parrot/resources.h
- copy include/parrot/core_pmcs.h => miniparrot/include/parrot/core_pmcs.h
- copy include/parrot/platform.h => miniparrot/include/parrot/platform.h
- copy include/parrot/interp_guts.h => miniparrot/include/parrot/interp_guts.h
- copy include/parrot/rx.h => miniparrot/include/parrot/rx.h
- copy include/parrot/rxstacks.h => miniparrot/include/parrot/rxstacks.h
- copy include/parrot/intlist.h => miniparrot/include/parrot/intlist.h
- copy include/parrot/embed.h => miniparrot/include/parrot/embed.h
- copy include/parrot/warnings.h => miniparrot/include/parrot/warnings.h
- copy include/parrot/misc.h => miniparrot/include/parrot/misc.h
- copy include/parrot/pmc.h => miniparrot/include/parrot/pmc.h
- copy include/parrot/key.h => miniparrot/include/parrot/key.h
- copy include/parrot/hash.h => miniparrot/include/parrot/hash.h
- copy include/parrot/smallobject.h => miniparrot/include/parrot/smallobject.h
- copy include/parrot/headers.h => miniparrot/include/parrot/headers.h
- copy include/parrot/dod.h => miniparrot/include/parrot/dod.h
- copy include/parrot/method_util.h => miniparrot/include/parrot/method_util.h
- copy include/parrot/list.h => miniparrot/include/parrot/list.h
- copy include/parrot/datatypes.h => miniparrot/include/parrot/datatypes.h
- copy include/parrot/regfuncs.h => miniparrot/include/parrot/regfuncs.h
- copy include/parrot/string_funcs.h => miniparrot/include/parrot/string_funcs.h
- copy include/parrot/encoding.h => miniparrot/include/parrot/encoding.h
- copy include/parrot/chartype.h => miniparrot/include/parrot/chartype.h
- copy include/parrot/oplib.h => miniparrot/include/parrot/oplib.h
- copy include/parrot/sub.h => miniparrot/include/parrot/sub.h
- copy include/parrot/unicode.h => miniparrot/include/parrot/unicode.h
- copy include/parrot/perltypes.h => miniparrot/include/parrot/perltypes.h


** tools/dev/rebuild_miniparrot.pl: copying source files to miniparrot directory
- copy classes/array.h => miniparrot/classes/array.h
- copy classes/boolean.h => miniparrot/classes/boolean.h
- copy classes/continuation.h => miniparrot/classes/continuation.h
- copy classes/coroutine.h => miniparrot/classes/coroutine.h
- copy classes/csub.h => miniparrot/classes/csub.h
- copy classes/default.h => miniparrot/classes/default.h
- copy classes/intlist.h => miniparrot/classes/intlist.h
- copy classes/intqueue.h => miniparrot/classes/intqueue.h
- copy classes/key.h => miniparrot/classes/key.h
- copy classes/multiarray.h => miniparrot/classes/multiarray.h
- copy classes/parrotcoroutine.h => miniparrot/classes/parrotcoroutine.h
- copy classes/parrotpointer.h => miniparrot/classes/parrotpointer.h
- copy classes/parrotsub.h => miniparrot/classes/parrotsub.h
- copy classes/perlarray.h => miniparrot/classes/perlarray.h
- copy classes/perlhash.h => miniparrot/classes/perlhash.h
- copy classes/perlint.h => miniparrot/classes/perlint.h
- copy classes/perlnum.h => miniparrot/classes/perlnum.h
- copy classes/perlstring.h => miniparrot/classes/perlstring.h
- copy classes/perlundef.h => miniparrot/classes/perlundef.h
- copy classes/pointer.h => miniparrot/classes/pointer.h
- copy classes/scalar.h => miniparrot/classes/scalar.h
- copy classes/sub.h => miniparrot/classes/sub.h
- copy test_main.c => miniparrot/test_main.c
- copy include/parrot/debug.h => miniparrot/include/parrot/debug.h


** tools/dev/rebuild_miniparrot.pl: copying object source files to miniparrot directory
- copy exceptions.c => miniparrot/exceptions.c
- copy global_setup.c => miniparrot/global_setup.c
- copy interpreter.c => miniparrot/interpreter.c
- copy parrot.c => miniparrot/parrot.c
- copy register.c => miniparrot/register.c
- copy core_ops.c => miniparrot/core_ops.c
- copy core_ops_prederef.c => miniparrot/core_ops_prederef.c
- copy memory.c => miniparrot/memory.c
- copy packfile.c => miniparrot/packfile.c
- copy stacks.c => miniparrot/stacks.c
- copy string.c => miniparrot/string.c
- copy sub.c => miniparrot/sub.c
- copy encoding.c => miniparrot/encoding.c
- copy chartype.c => miniparrot/chartype.c
- copy runops_cores.c => miniparrot/runops_cores.c
- copy trace.c => miniparrot/trace.c
- copy pmc.c => miniparrot/pmc.c
- copy key.c => miniparrot/key.c
- copy hash.c => miniparrot/hash.c
- copy core_pmcs.c => miniparrot/core_pmcs.c
- copy platform.c => miniparrot/platform.c
- copy resources.c => miniparrot/resources.c
- copy rx.c => miniparrot/rx.c
- copy rxstacks.c => miniparrot/rxstacks.c
- copy intlist.c => miniparrot/intlist.c
- copy list.c => miniparrot/list.c
- copy embed.c => miniparrot/embed.c
- copy warnings.c => miniparrot/warnings.c
- copy packout.c => miniparrot/packout.c
- copy byteorder.c => miniparrot/byteorder.c
- copy debug.c => miniparrot/debug.c
- copy smallobject.c => miniparrot/smallobject.c
- copy headers.c => miniparrot/headers.c
- copy dod.c => miniparrot/dod.c
- copy method_util.c => miniparrot/method_util.c
- copy misc.c => miniparrot/misc.c
- copy spf_render.c => miniparrot/spf_render.c
- copy spf_vtable.c => miniparrot/spf_vtable.c
- copy datatypes.c => miniparrot/datatypes.c
- copy fingerprint.c => miniparrot/fingerprint.c
- copy io/io.c => miniparrot/io/io.c
- copy io/io_buf.c => miniparrot/io/io_buf.c
- copy io/io_unix.c => miniparrot/io/io_unix.c
- copy io/io_win32.c => miniparrot/io/io_win32.c
- copy io/io_stdio.c => miniparrot/io/io_stdio.c
- copy classes/array.c => miniparrot/classes/array.c
- copy classes/boolean.c => miniparrot/classes/boolean.c
- copy classes/continuation.c => miniparrot/classes/continuation.c
- copy classes/coroutine.c => miniparrot/classes/coroutine.c
- copy classes/csub.c => miniparrot/classes/csub.c
- copy classes/default.c => miniparrot/classes/default.c
- copy classes/intlist.c => miniparrot/classes/intlist.c
- copy classes/intqueue.c => miniparrot/classes/intqueue.c
- copy classes/key.c => miniparrot/classes/key.c
- copy classes/multiarray.c => miniparrot/classes/multiarray.c
- copy classes/perlarray.c => miniparrot/classes/perlarray.c
- copy classes/perlhash.c => miniparrot/classes/perlhash.c
- copy classes/perlint.c => miniparrot/classes/perlint.c
- copy classes/perlnum.c => miniparrot/classes/perlnum.c
- copy classes/perlstring.c => miniparrot/classes/perlstring.c
- copy classes/perlundef.c => miniparrot/classes/perlundef.c
- copy classes/pointer.c => miniparrot/classes/pointer.c
- copy classes/scalar.c => miniparrot/classes/scalar.c
- copy classes/sub.c => miniparrot/classes/sub.c
- copy encodings/singlebyte.c => miniparrot/encodings/singlebyte.c
- copy encodings/utf8.c => miniparrot/encodings/utf8.c
- copy encodings/utf16.c => miniparrot/encodings/utf16.c
- copy encodings/utf32.c => miniparrot/encodings/utf32.c
- copy chartypes/unicode.c => miniparrot/chartypes/unicode.c
- copy chartypes/usascii.c => miniparrot/chartypes/usascii.c


** tools/dev/rebuild_miniparrot.pl: writing parrot build scripts


make[1]: Leaving directory `/home/josh/devel/parrot-rw'


josh@galactic:~/devel/parrot-rw% cd miniparrot
josh@galactic:~/devel/parrot-rw/miniparrot% sh ./build_gcc.sh
+ gcc -DMINIPARROT -I./include -c exceptions.c -o exceptions.o
+ gcc -DMINIPARROT -I./include -c global_setup.c -o global_setup.o
+ gcc -DMINIPARROT -I./include -c interpreter.c -o interpreter.o
+ gcc -DMINIPARROT -I./include -c parrot.c -o parrot.o
+ gcc -DMINIPARROT -I./include -c register.c -o register.o
+ gcc -DMINIPARROT -I./include -c core_ops.c -o core_ops.o
+ gcc -DMINIPARROT -I./include -c core_ops_prederef.c -o core_ops_prederef.o
+ gcc -DMINIPARROT -I./include -c memory.c -o memory.o
+ gcc -DMINIPARROT -I./include -c packfile.c -o packfile.o
+ gcc -DMINIPARROT -I./include -c stacks.c -o stacks.o
+ gcc -DMINIPARROT -I./include -c string.c -o string.o
+ gcc -DMINIPARROT -I./include -c sub.c -o sub.o
+ gcc -DMINIPARROT -I./include -c encoding.c -o encoding.o
+ gcc -DMINIPARROT -I./include -c chartype.c -o chartype.o
+ gcc -DMINIPARROT -I./include -c runops_cores.c -o runops_cores.o
+ gcc -DMINIPARROT -I./include -c trace.c -o trace.o
+ gcc -DMINIPARROT -I./include -c pmc.c -o pmc.o
+ gcc -DMINIPARROT -I./include -c key.c -o key.o
+ gcc -DMINIPARROT -I./include -c hash.c -o hash.o
+ gcc -DMINIPARROT -I./include -c core_pmcs.c -o core_pmcs.o
+ gcc -DMINIPARROT -I./include -c platform.c -o platform.o
+ gcc -DMINIPARROT -I./include -c resources.c -o resources.o
+ gcc -DMINIPARROT -I./include -c rx.c -o rx.o
+ gcc -DMINIPARROT -I./include -c rxstacks.c -o rxstacks.o
+ gcc -DMINIPARROT -I./include -c intlist.c -o intlist.o
+ gcc -DMINIPARROT -I./include -c list.c -o list.o
+ gcc -DMINIPARROT -I./include -c embed.c -o embed.o
+ gcc -DMINIPARROT -I./include -c warnings.c -o warnings.o
+ gcc -DMINIPARROT -I./include -c packout.c -o packout.o
+ gcc -DMINIPARROT -I./include -c byteorder.c -o byteorder.o
+ gcc -DMINIPARROT -I./include -c debug.c -o debug.o
+ gcc -DMINIPARROT -I./include -c smallobject.c -o smallobject.o
+ gcc -DMINIPARROT -I./include -c headers.c -o headers.o
+ gcc -DMINIPARROT -I./include -c dod.c -o dod.o
+ gcc -DMINIPARROT -I./include -c method_util.c -o method_util.o
+ gcc -DMINIPARROT -I./include -c misc.c -o misc.o
+ gcc -DMINIPARROT -I./include -c spf_render.c -o spf_render.o
+ gcc -DMINIPARROT -I./include -c spf_vtable.c -o spf_vtable.o
+ gcc -DMINIPARROT -I./include -c datatypes.c -o datatypes.o
+ gcc -DMINIPARROT -I./include -c fingerprint.c -o fingerprint.o
+ gcc -DMINIPARROT -I./include -c io/io.c -o io/io.o
+ gcc -DMINIPARROT -I./include -c io/io_buf.c -o io/io_buf.o
+ gcc -DMINIPARROT -I./include -c io/io_unix.c -o io/io_unix.o
+ gcc -DMINIPARROT -I./include -c io/io_win32.c -o io/io_win32.o
+ gcc -DMINIPARROT -I./include -c io/io_stdio.c -o io/io_stdio.o
+ gcc -DMINIPARROT -I./include -c classes/array.c -o classes/array.o
+ gcc -DMINIPARROT -I./include -c classes/boolean.c -o classes/boolean.o
+ gcc -DMINIPARROT -I./include -c classes/continuation.c -o classes/continuation.o
+ gcc -DMINIPARROT -I./include -c classes/coroutine.c -o classes/coroutine.o
+ gcc -DMINIPARROT -I./include -c classes/csub.c -o classes/csub.o
+ gcc -DMINIPARROT -I./include -c classes/default.c -o classes/default.o
+ gcc -DMINIPARROT -I./include -c classes/intlist.c -o classes/intlist.o
+ gcc -DMINIPARROT -I./include -c classes/intqueue.c -o classes/intqueue.o
+ gcc -DMINIPARROT -I./include -c classes/key.c -o classes/key.o
+ gcc -DMINIPARROT -I./include -c classes/multiarray.c -o classes/multiarray.o
+ gcc -DMINIPARROT -I./include -c classes/perlarray.c -o classes/perlarray.o
+ gcc -DMINIPARROT -I./include -c classes/perlhash.c -o classes/perlhash.o
+ gcc -DMINIPARROT -I./include -c classes/perlint.c -o classes/perlint.o
+ gcc -DMINIPARROT -I./include -c classes/perlnum.c -o classes/perlnum.o
+ gcc -DMINIPARROT -I./include -c classes/perlstring.c -o classes/perlstring.o
+ gcc -DMINIPARROT -I./include -c classes/perlundef.c -o classes/perlundef.o
+ gcc -DMINIPARROT -I./include -c classes/pointer.c -o classes/pointer.o
+ gcc -DMINIPARROT -I./include -c classes/scalar.c -o classes/scalar.o
+ gcc -DMINIPARROT -I./include -c classes/sub.c -o classes/sub.o
+ gcc -DMINIPARROT -I./include -c encodings/singlebyte.c -o encodings/singlebyte.o
+ gcc -DMINIPARROT -I./include -c encodings/utf8.c -o encodings/utf8.o
+ gcc -DMINIPARROT -I./include -c encodings/utf16.c -o encodings/utf16.o
+ gcc -DMINIPARROT -I./include -c encodings/utf32.c -o encodings/utf32.o
+ gcc -DMINIPARROT -I./include -c chartypes/unicode.c -o chartypes/unicode.o
+ gcc -DMINIPARROT -I./include -c chartypes/usascii.c -o chartypes/usascii.o
+ gcc -DMINIPARROT -I./include -c test_main.c -o test_main.o
+ gcc -lm -o parrot 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 sub.o encoding.o chartype.o runops_cores.o trace.o pmc.o key.o hash.o core_pmcs.o platform.o resources.o rx.o rxstacks.o intlist.o list.o embed.o warnings.o packout.o byteorder.o debug.o smallobject.o headers.o dod.o method_util.o misc.o spf_render.o spf_vtable.o datatypes.o fingerprint.o io/io.o io/io_buf.o io/io_unix.o io/io_win32.o io/io_stdio.o classes/array.o classes/boolean.o classes/continuation.o classes/coroutine.o classes/csub.o classes/default.o classes/intlist.o classes/intqueue.o classes/key.o classes/multiarray.o classes/perlarray.o classes/perlhash.o classes/perlint.o classes/perlnum.o classes/perlstring.o classes/perlundef.o classes/pointer.o classes/scalar.o classes/sub.o encodings/singlebyte.o encodings/utf8.o encodings/utf16.o encodings/utf32.o chartypes/unicode.o chartypes/usascii.o test_main.o
josh@galactic:~/devel/parrot-rw/miniparrot% ./parrot -v
This is parrot version 0.0.8-devel-miniparrot built for nojit
Copyright (C) 2001-2002 Yet Another Society. All Rights Reserved.

Parrot may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Parrot source kit.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either
the GNU General Public License or the Artistic License for more details.

josh@galactic:~/devel/parrot-rw/miniparrot%


Andy Dougherty

unread,
Nov 1, 2002, 11:52:05 AM11/1/02
to Josh Wilmes, perl6-i...@perl.org
On Thu, 31 Oct 2002, Josh Wilmes wrote:

>
> I've banged together a first attempt at a miniparrot- that is, something
> that can be built on any ANSI C system without anything other than a
> compiler.

Great!

I haven't looked deeply, but there is one little quibble I found so far:

In config/auto/alignptrs.pl, there is

if ($miniparrot) {
# we can't guarantee anything about pointer alignment under ANSI C89.
# so we will have to check every byte.
Configure::Data->set(ptr_alignment => 1);

Alas, you can't check every byte. It is true that you can't portably
guarantee anything about pointer alignment. Thus, for example, it's not
guaranteed that you can access things at arbitrary alignment.

In particular, with ptr_alignment = 1 on a SPARC, I get

signal BUS (invalid address alignment) in trace_system_stack at line
491 in file "dod.c"
491 size_t ptr = *(size_t *)cur_var_ptr;

--
Andy Dougherty doug...@lafayette.edu

Josh Wilmes

unread,
Nov 1, 2002, 12:27:28 PM11/1/02
to Andy Dougherty, perl6-i...@perl.org

Is there a way to avoid stack walking at all in miniparrot?

What do we do instead? (Nothing?)

Miniparrot's main purpose is to be able to bootstrap parrot by running its
build scripts. Leaking a little memory may be acceptable.

--Josh

Andy Dougherty

unread,
Nov 1, 2002, 12:40:44 PM11/1/02
to Josh Wilmes, Perl6 Internals
On Fri, 1 Nov 2002, Josh Wilmes wrote:

>
> Is there a way to avoid stack walking at all in miniparrot?
>
> What do we do instead? (Nothing?)

Well, since I currently force all the other *ALIGNMENT #defines to be '16'
in <parrot/headers.h> (See comment on "Alignment problems" in
resources.c), setting ptr_alignment = 16 is probably sufficient and safe
for now. Sorry for not suggesting that explicitly before.

> Miniparrot's main purpose is to be able to bootstrap parrot by running its
> build scripts. Leaking a little memory may be acceptable.

I'd tend to agree.

--
Andy Dougherty doug...@lafayette.edu

Leopold Toetsch

unread,
Nov 1, 2002, 3:42:13 PM11/1/02
to Josh Wilmes, Andy Dougherty, perl6-i...@perl.org
Josh Wilmes wrote:

> Is there a way to avoid stack walking at all in miniparrot?
>
> What do we do instead? (Nothing?)
>
> Miniparrot's main purpose is to be able to bootstrap parrot by running its
> build scripts. Leaking a little memory may be acceptable.


Disable DOD/GC, use res_lea.c (directly allocating via malloc) instead
of resources.c


> --Josh

leo

0 new messages