Add cygwin32 build and more thoughts on 64 bit support and runtime error reporting.

This commit is contained in:
David Brown 2016-07-08 17:17:09 +01:00
parent 56256a49f2
commit 2a352ff67b
2 changed files with 45 additions and 9 deletions

View file

@ -87,8 +87,33 @@ MODULE Files.
I see this as another argument in favour of locking LONGINT down as 32 bits.
#### It's all the same to C
It should be possible to make the 32/64 bit compilation a compiler option
available whether the compiler binary itself was built with 32 or 64 bit C.
Indeed - is there any benefit in a 64 bit compiler binary? A 32 bit compiler
binary will be smaller and faster. The memory requirements of the compiler are
orders of magnitude less than those that would need a 64 bit implementation.
The only need for a 64 bit compiler binary is for systems that can only run
64 bit binaries.
Point being - the bit size of the compiler binary should be independent of the
bit size of the target machine of the C code being generated.
So the compiler options could be:
1. Generated binary bit size - 32 or 64 bit. Determines bit size of
SYSTEM.ADDRESS. Add 16 bit option for controllers.
2. Size of INTEGER, SET and LONGINT. Defaulting to 16,32,32 the parameter would
also allow 32/64/64.
The libraries would be written and compiled to handle all cases. e.g.
- A WriteInt routine needs it's value parameter to accept integers of all
sizes and would be coded as LONG64.
- ReadInt is slightly more difficult because the parameter is VAR. Make the
parameter ARRAY OF BYTE and process according to SIZE(param).
#### A feature I'd really like to see
@ -100,6 +125,14 @@ least by 1975. This could be achieved by including a table of .Mod file line
number vs code address, and having the runtime seach this table for the failure
address. It would be quite a lot of work!
The current position tracking code in the compiler is buggy - for example the
position at the end of the `expr` in `WHILE expr DO stmt END` is recorded as
the position of the END when it should be of the 'DO'. This makes compiler error
reporting a bit unhelpful, but it's worse for runtime error reporting as we end
up with duplicate entries in the line number table. The position handling code
is somewhat obscure as it uses a convenient but misnamed spare integer field in
the symbol record and it's difficult to follow just when it patches it.
#### Oberon 07/15 mode
- Add standard BYTE type being an unsigned integer between 0 and 255.
@ -109,6 +142,8 @@ address. It would be quite a lot of work!
- Reject LOOP statements.
- All imported variables are read-only.
See [Difference between Oberon-07 and Oberon](https://www.inf.ethz.ch/personal/wirth/Oberon/Oberon07.pdf).
#### To be left out?
Work on other compatibility layers is in progress.

View file

@ -7,13 +7,14 @@ use Cwd;
my $branch = "master";
my %machines = (
"pi" => ['pi@pie', "sudo", "projects/oberon/vishap/voc"],
"darwin" => ['dave@dcb', "sudo", "projects/oberon/vishap/voc"],
"lub32" => ['dave@lub32', "sudo", "vishap/voc"],
"ob32" => ['root@nas-ob32', "", "vishap/voc"],
"ce64" => ['-p5922 obe@www', "sudo", "vishap/voc"],
"ub64" => ['dave@nas-ub64', "sudo", "vishap/voc"],
"fb64" => ['root@oberon', "", "vishap/voc"]
"pi" => ['pi@pie', "sudo", "make full", "projects/oberon/vishap/voc"],
"darwin" => ['dave@dcb', "sudo", "make full", "projects/oberon/vishap/voc"],
"wind" => ['-p5932 dave@wax', "", "make full", "vishaps/voc"],
"lub32" => ['dave@lub32', "sudo", "make full", "vishap/voc"],
"ob32" => ['root@nas-ob32', "", "make full", "vishap/voc"],
"ce64" => ['-p5922 obe@www', "sudo", "make full", "vishap/voc"],
"ub64" => ['dave@nas-ub64', "sudo", "make full", "vishap/voc"],
"fb64" => ['root@oberon', "", "make full", "vishap/voc"]
);
@ -45,8 +46,8 @@ sub logged {
unlink glob "log/*";
for my $machine (sort keys %machines) {
my ($login, $sudo, $dir) = @{$machines{$machine}};
my $cmd = "ssh $login \"cd $dir && $sudo git checkout $branch && $sudo git pull && $sudo make full\" ";
my ($login, $sudo, $mkcmd, $dir) = @{$machines{$machine}};
my $cmd = "ssh $login \"cd $dir && $sudo git checkout $branch && $sudo git pull && $sudo $mkcmd\" ";
logged($cmd, $machine);
}