Steve,
Thanks for the interesting comparison. I guess we have known for
a long time that John Gibson's garbage collector is something special
(both as regards speed and also because it garbage collects everything
including compiled functions and things like unwanted X widgets, etc.)
> There no immediate conclusion to this post - except to wonder how the
> heck I can get Poplog onto my Mac OS X system pronto!
You could probably do it faster than anyone else !
You will probably have to do what Waldek did to revive HPUX/HPPA Poplog
except for the slight (?) complication that you'll need to start
from the sources for PPC poplog running under AIX, and check which
of the AIX system calls have to be altered for OS X.
I assume that the assemblers will be the same and all the machine
instructions will be the same.
You would need to start from the S.powaix sub-tree of the poplog source
tree, for which I have just built a tar file in case anyone wants
to have a go:
http://www.cs.bham.ac.uk/research/poplog/src/gz/src-S.powaix.tar.gz
7824845 bytes
It will be necesary to unpack that on a machine running poplog, e.g.
your pc with linux, and follow instructions in the poplog porting
guide (which I have never done).
http://www.cs.bham.ac.uk/research/poplog/sysdoc/ppg
As far as I can tell (from the links in the src directory tree) there
are only three system specific files in $popsrc/syscomp namely
genproc.p
sysdefs.p
asmout.p
(The files in that sub-directory are the ones that are used to build
the system compiler, archiver and linker).
Also in the $popsrc directory only these are likely to be system
specific files:
the 10 a*.s assembler files
(maybe they will work unchanged if AIX is close enough at that level to OS X?)
These are files which have only one or two links in the source tree and
are therefore probably special to PPC:
array_cons.p
asm.ph
ass.p
closure_cons.p
drop_code.ph
pdr_compose.p
registers.ph
And these files have 15 links and are therefore probably common to
all the unix/linux systems. They should just work, but you may have
to check the system calls.
devio.p
pop_malloc_min_alloc.p
sig_stop.p
sys_async_input.p
syscreate.p
sysdate.p
sysdelete.p
sysexecute.p
sys_file_move.p
sysfileok.p
sys_file_stat.p
sysfork.p
sys_host_id.p
sys_host_name.p
sys_input_waiting.p
sys_io_control.p
sysio.p
sysisdirectory.p
syslink.p
sysobey.p
sysopen.p
syspipe.p
sys_real_time.p
systime.p
sysutil.p
termcap.p
unixdefs.ph
unix_dir.p
unixextern.p
unixfmatch.p
unix_select.ph
unix_tty.ph
These are shell scripts which may need tweaking but probably shouldn't
except perhaps for asm?
asm
mknewpop
mksyscomp
newpop
You might wish to replace ALL the other files with my latest versions in the
latest linux poplog
http://www.cs.bham.ac.uk/research/poplog/new/linux-pc-1553d.tar.gz
You can build a running PC linux poplog from that using the scripts
provided.
The 286 source files in $popsrc, and the 30 files in $popsrc/syscomp
not mentioned above should be common across systems but it is just
possible they have some #_IF sections that will need to be checked.
Grep for occurrences of AIX perhaps?
Once you have an up to date running linux poplog (including recent
bug fixes) it should be possible using the instructions in the ppg
to make changes to the sources for the target machine in those
files that need changes (a few days work for someone who knows as
much as you do???). Then you compile all the files for the target
machine (I presume that means building a new version of popc.psv
to cross-compile the code as needed for the target system).
That will produce a huge collection of .s files which will have to
copied over to the Mac. Then assembled, then linked.
You should then have a primitive version of pop11 without Ved, etc.
Once you have an executable you can use it as corepop11 in $popsys then
start again, first building popc.psv poplibr.psv poplink.psv and
newpop.psv on the target machine, then compiling all the sources
including the Ved sources this time, (again using pgcomp) archiving them
(pglibr), then use poplink (pglink) to link a basepop11. You would also
have to compile the X sources and the bits of pop11 written in C, using
$popcom/mkXpw
$popexternlib/mklibpop I don't now about
$popcom/mkXpm
The porting guide states
[N.B. POPLOG uses a large number of global linker symbols,
currently 5000-6000; a recurring problem in past ports has been the
inability of linkers to cope with this many. It is advisable to check
the capabilities of the target system linker at an early stage.]
But I assume that if you have gcc everything should work, as on linux.
That reminds me: I have been thinking of increasing the size of the
pop11 dictionary. Currently it is 1023, and when poplog has compiled
quite a lot of code, many of the hash buckets in the dictionary have
more than 10 items and some over 20, which would slow down consword.
You can check this by looking at the output of dic_distrib(); which
prints out bucket sizes.
Since memory is now so plentiful and cheap, I was thinking it should be
increased to at least 5 times its size, maybe 5119 (a prime number).
Any comments?
Aaron
|