Arranged alignd() to leave correct address alone.
Fixed parameter size calculation for sets.
Rerun regression.
Set new record variant before use.
Change VAR block checking from overlapping to included.
Add "SMALL_MODEL" flag.
Modify the rejection test so that if it dosen't fault, it won't run forever.
Fix bug with variable block checks enabled but debug checks are not.
Added missing tracking counts and errors.
Rerun full regression.
Documentation updates.
Added ISO 7185 document.
Reconcilled documentation with Pascal-P6.
It does not throw an error on balance cases. Those checks were put in by me (reference the p4 code). The balance condition does not get corrected, but this is just bookkeeping for the error, which is done on expression temps allocs and stack local allocs. No side effects. I didn't run a full test suite on p5, but p6 was run on full test suite. Let me know. Scott PS offsets generated by the expression temps are wrong, which are discarded because the intermediate is discarded. Theorectically there...
It does not throw an error on balance cases. Those checks were put in by me (reference the p4 code). The balance condition does not get corrected, but this is just bookkeeping for the error, which is done on expression temps allocs and stack local allocs. No side effects. I didn't run a full test suite on p5, but p6 was run on full test suite. Let me know. Scott
It does not throw an error on balance cases. I didn't run a full test suite on p5, but p6 was run on full test suite. Let me know. Scott
Mm... I think the issue occurs when the variable topnew is set to non-zero when prcode = False. It looks like this patch just stops the error from being displayed, but doesn't it affect the subsequent processing? Do you get any errors when you try iso7185pat.pas?
Compiler option (*$c-*) is broken
Fixed. Here's the patch: samiam@samiam-h-pc-2:~/projects/pascal/pascal-p5$ git diff diff --git a/source/pcom.pas b/source/pcom.pas index 66b53c0..cd93ed7 100644 --- a/source/pcom.pas +++ b/source/pcom.pas @@ -1439,7 +1439,7 @@ end; if not list then writeln(output) end else if ch1 = 'd' then switch(debug) - else if ch1 = 'c' then switch(prcode) + else if ch1 = 'c' then switch(prcode) else if ch1 = 'v' then switch(chkvar) else if ch1 = 'r' then switch(chkref) else if ch1 = 'u' then switch(chkudtc)...
Guard 500 errors when not generating source via prcode flag.
As expected, P6 does not do this: samiam@samiam-h-pc-2:~/projects/pascal/pascal-p6$ p6 test Compiling test... P6 Pascal compiler vs. 0.1.x Pascal-P6 complies with the requirements of Pascaline version 0.4 and the following annexes: A,B,C,E. 1 -48 (*$t-,l+,d+,c-*) 2 -48 program OptionTest(Output); 3 -48 var 4 -48 i: Integer; 5 -48 begin 6 7 for i:=1 to 10 do 7 17 Writeln('Hello, world.'); 8 36 end. Errors in program: 0 P6 Pascal interpreter vs. 0.1.x Assembling/loading program *** Program load error:...
As expected, P6 does not do this: samiam@samiam-h-pc-2:~/projects/pascal/pascal-p6$ p6 test Compiling test... P6 Pascal compiler vs. 0.1.x Pascal-P6 complies with the requirements of Pascaline version 0.4 and the following annexes: A,B,C,E. 1 -48 (*$t-,l+,d+,c-*) 2 -48 program OptionTest(Output); 3 -48 var 4 -48 i: Integer; 5 -48 begin 6 7 for i:=1 to 10 do 7 17 Writeln('Hello, world.'); 8 36 end. Errors in program: 0 P6 Pascal interpreter vs. 0.1.x Assembling/loading program *** Program load error:...
As a side commentary, there are the versions p4, p5, and p6, and as many have discovered or decided, a fairly dramatic difference between p5 1.0 and 1.4 versions. The difference in these versions is that the error checking from the ISO 7185 standard was enforced in 1.4 version. So why didn't this justify a pX version? The reason is in the mission statement. P5 was aimed at improving P4 into a full ISO 7185 compatible implementation. As many people have noticed, P5 1.0 will compile ISO 7185 code,...
Thank you. I appreciate it.
Alright, a bit of progress. First, the reason GPC won't run on my windows version is (I believe) it needs to be matched to a similar or exact version of mingw, since the gcc compiler needs to be 3.4.5. I couldn't locate that version offhand, I suspect at one time I did find it. In any case, the documentation does not go into this, and that is clearly wrong (my error). I don't really use windows for GPC anymore, the Linux version (yes, 2006, that version) is 64 bit, and less fussy about its environment,...
Alright, a bit of progress. First, the reason GPC won't run on my windows version is (I believe) it needs to be matched to a similar or exact version of mingw, since the gcc compiler needs to be 3.4.5. I couldn't locate that version offhand, I suspect at one time I did find it. In any case, the documentation does not go into this, and that is clearly wrong (my error). I don't really use windows for GPC anymore, but Linux version (yes, 2006, that version) is 64 bit, and less fussy about its environment,...
Alright, a bit of progress. First, the reason GPC won't run on my windows version is (I believe) it needs to be matched to a similar or exact version of mingw, since the gcc compiler needs to be 3.4.5. I couldn't locate that version offhand, I suspect at one time I did find it. In any case, the documentation does not go into this, and that is clearly wrong (my error). I don't really use windows for GPC anymore, but Linux version (yes, 2006, that version) is 64 bit, and less fussy about its environment,...
There is no specific reason to turn it off. I guess I can use it to check my grammar. The other reason is that it is an option that exists in Pascal-P4. https://homepages.cwi.nl/~steven/pascal/book/1lexical.html#options
There is no specific reason to turn it off. I guess I can use it to check my grammar. The other reason is that it is an option that exists in Pascal-P4.
Verified. c- should turn the option off, no? So what this is doing is suppressing the intermediate code generation, something I rarely do here. My guess is it is causing a bookkeeping error. Did you have a specific reason to turn this off? Scott
Verified. c- should turn the option off, no? Scott
Well, good on you. There are four paths to a working implementation. fpc used to be a one line change, if I recall it was down to oddities in the way fpc reads from header files. I was working with the FPC group to fix them, but it was too low on their priority list, and I gave it up. gpc is now broken on both the Linux and windows (current implementation). I use the 2006 (frozen) copy so its down to bit rot. However, the issues looked minor and should be correctable. The last one is the C interpreter...
Because of the difficulty in getting GPC to work, I have modified Pascal-P5 so that it can be compiled in Delphi. Passes ISO 7185 PAT. Of course, self-compilation is not possible. https://github.com/ht-deko/Pascal-P5
Kicked forward, I don't have an installation of GPC that works at the moment. Windows 10/Ubuntu 20.04 both have issues.
Thanks, I'll look it up. General note: there are several fixes that went into P6 that didn't make it to P5. I did just go through a series of transfers from P6 to P5, but that was so that they would run the same test suite (both negative and positive). The purpose of replacing P5 with P6 is not just so that we don't have to perform backwards compatibility, but also because P5 is not really a practical stand-alone compiler, vs. the plan for P6 is. Scott Franco San Jose, CA
Compiler option (*$c-*) is broken
Hi, sorry for not seeing this sooner, I don't get back to this page a lot. Your idea that it is due to big endian issues is a good one, I don't believe the code actually accounts (correctly) for big endian, mainly because I don't have a big endian system to check it on. I'll see if I can go over your provided programs this weekend. The idea about including the intermediate code is interesting. The original intent of providing it was to allow implementers to create an interpreter for the code and...
Hello I have compiled pascal-p5 1.3 and 1.4 with gpc-2007 on powermac g5 with osx 10.5.8, without errors. But some of the example programs show errors, in both 1.3 and 1.4 versions, i include some test code at the end of message, sorry for the multiple-items question, but seems better to sum up in asingle message. I did't checked very deeply by now, without a real debugger is hard to figure out, but can be the big endian g5 the problem? and can be the pint rather than pcom? I think would be usefull...
Scott, I'm sure you'll find the changes valuble for p5 & probably p6 as well. The link shows how to analyse the code, so it could be repeated for pint as well, although the speedup might not be so dramatic. I check into the p5 project every now and then to see what is new and track the changes to pcom.pas and the test suite. P5c passes all the p5 acceptance tests, and nearly all the rejection tests - the exceptions being things like new/dispose(ptr, tag). -- Trevor//
Here and there with Pascal-P5 The 1.4 version of Pascal-P5 got posted today. This is (hopefully) the last major source code change version. I wanted to take a break from work on Pascal-P6 and Petit-ami, because there were a lot of fixups and improvements from Pascal-P6 that applied to Pascal-P5. In addition, there were several more error cases from the ISO 7185 standard that were not yet handled in either Pascal-P5 nor Pascal-P6. I'm happy to say that Pascal-P5 now completely covers the error cases...
Trevor, Pretty cool. I also received a note from another user who claimed that the compile speed was increased by loading characters directly to strvs (string quanta) structures instead of buffering them, then transferring to strvsps. I haven't verified it. Pascal-P5 has gone through a lot to increase its compliance with ISO 7185. I often wonder about the different branches of Pascal-P5, including p5c, which were taken from earlier revisions. Anyways, Thanks for that, will take a look. Scott Fra...
**** Pascal-P5 1.4 RELEASE ***** WHAT'S NEW IN THE 1.4 RELEASE ISO 7185 negative and positive tests greatly expanded. Covers essentially ALL ISO 7185 error cases. Moved source configuration from SED to CPP (preprocessor). Now uses separate MPB includes for basic configuration. Certified for both 32 bit and 64 bit operation in Windows and Linux. Documentation updates. Increased available compiler options. Many bugs fixed. Source code tracking/debug system now more accurate. Enhanced regression reporting....
**** Pascal-P5 1.4 RELEASE ***** You can also find this news at: https://sourceforge.net/p/pascalp5/discussion/news/ WHAT'S NEW IN THE 1.4 RELEASE ISO 7185 negative and positive tests greatly expanded. Covers essentially ALL ISO 7185 error cases. Moved source configuration from SED to CPP (preprocessor). Now uses separate MPB includes for basic configuration. Certified for both 32 bit and 64 bit operation in Windows and Linux. Documentation updates. Increased available compiler options. Many bugs...
Update news; update version number for release; remove unneeded files; update docs.
Fixed configure script.
Add compare file; fix configures to move files.
Updated compare files,
Remove bit length varying file.
Match PRT formats.
Merge branch 'master' of ssh://git.code.sf.net/p/pascalp5/code
Fix PRT run scripts to match output files.
Regress corrections.
Updates for regression.
Remove changable files.
Fixes to run regress --full on 64 bit linux.
Changed paths; took off quotes on echo
Fixed command spelling; fixed comments; Added no preamble to makefiles; referenced label
Fixed batch scripts; added no preamble mode
Hi Scott, Nice to see you're back to doing work on p5. Over at p5c, I've just finished some code profiling and was able to obtain dramatic speed ups (10x!!) in compile time This was just by changing 20 or 30 lines of code, and it should be directly transferable to p5 and maybe p6. Details here ---> https://sourceforge.net/p/pascal-p5c/blog/2017/07/how-to-use-profiling-to-speed-up-p5c-pascal-programs/
Hi Scott, Nice to see you're back to doing work on p5. Over at p5c, I've just finished some code profiling and was able to obtain dramatic speed ups (10x!!) in compile time This was just by changing 20 or 30 lines of code, and it should be directly transferable to p5 and p6. Details here ---> https://sourceforge.net/p/pascal-p5c/blog/2017/07/how-to-use-profiling-to-speed-up-p5c-pascal-programs/
Various script fixes; removed stepdown; add no preamble option
Error fixed in script; Anyedit runs wild; PAT compare removed.
Fixed error in startrek, false dependency on maxint.
Added PAT compare file for 64 bits.
Removed lendian define, not used in P5.
Moved ujplen to MPB, since it is machine dependent.
Fixed longstanding bug with labels and simplified, from P6
Fix mst issues.
Backported the function result handler from P6
Back out last change.
Simplified returns and fix 64 bit bug.
Fixed quoting in bash scripts.
Brought Windows configure up to the same state as Unix.
64 bit fixups.
Got rid of the rest of the "transients".
Normalized on Unix/linux line endings.
Removed run scripts from bin; fixed configure; updated 64 bit MPB.
Carried bit configuration from P6.
Changed linux permissions; fixed up scripts for linux; fixed flip warnings.
Added unix version of scripts.
More changes to bring Linux scripts to run same as dos scripts.
Fixed script issues.
Added ability in configure to run on either DOS or Linux platforms.
General fixup of scripts.
Update unix/bash scripts to same state as Windows; remove unused files.
Fix cpints script; numbering error in PAT; init problem in pint.
Document updates; minor source change.
Documentation updates; bug in pcom; bug in script.
Add line number translation for macros; add file align to MPB; doc updates.
Format change for PAT; change parameter lists to separate scope.
Updated PRT compare files after mark size and error recovery changes.
Added back unix line ending fixups.
Updated configure files.
Extended respell algorithim to user identifiers.
Added new divergence points to error handling fix.