Page 3 of 3
Posted: Fri Feb 21, 2003 6:11 am
by BackupUser
Restored from previous forum. Originally posted by theogott.
Hallo Fred,
maybe you can slow down the compiler a bit.
I never had any sgnificant time-delay between pressing (compile & run) and getting the started program. Thats unconventional for any programming system

.
A second pass will however not be enough for that. (I think FASM does itself already multiple passes (FASM->macros).
I guess the way you work you'll need at least 5-10 additional passes so we would get the "normal feeling" we know from other compilers.
How about a own "Macro-Preprozessor" ? Same Features like the FASM-Preproz

?
Thats just some sort of "Text-Replace" (only) easy to du in a second pass.
*************************
The best time to do things is now !
Posted: Fri Feb 21, 2003 6:24 am
by BackupUser
Restored from previous forum. Originally posted by theogott.
The "leave unsused procedures out-thing" is easy stuff if you hold few easy rules:
1. Test for a reference of the Procedure-name (@foo.l) is enough - if its there don't leave it out.
2. Add new INCLUDE command:
REM #INC:Foo.L
So if - and that are very RARE CASES - you need to inlude a procedure which is not
directly referenced - you sinply write a INCLUDE-Statement, which is behind a # so you know its only intresting for the first compiler-pass.
We have for other reasons EVEN a
REM #EXC:
(Exclude) Command.
So maybe you have something like
A$="foo.l"
and you do not realy need to include this procedure,
the "Text-Searcher" would still find it in this line
(which is OK - he must be very sharp!)
So you can still EXCLUDE the Procedure.
As a result of leaving away unused stuff
you have smaller code (often A LOT SMALLER CODE !!) in the second pass
and that makes your compile-time faster
(here we are back to the "compile-time freaks")
I am not a compile-time freak, but I like very small code AND I like very huge libraries.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Btw. has anyone ever been standing near his PC with a stop-watch while the compiler works -
then saying "Oh - he is over 3.5 second I'll never buy this system !". I think compile time compiler quality is that we decide for quality NOT for time.
The reason is that if the compiler could resolve a problem and he does NOT giving you a error-message, you may ned 60 seconds to change things and re-compile.
Thats much more time consuming then if a single compile-run cycle take 5 seconds instead of three ...
*************************
The best time to do things is now !
Posted: Fri Feb 21, 2003 10:49 am
by BackupUser
Restored from previous forum. Originally posted by alizta.
i don't think this is worth sacrificing compiler speed.
apart from that... function prototyping often leads to cleaner code
---when all you have is a hammer, everything starts to look like a nail... ---
Posted: Mon Feb 24, 2003 2:08 pm
by BackupUser
Restored from previous forum. Originally posted by theogott.
Ok, then a simple sollution.
A simple CHECKBOX in Options.
(second Pass enable)
If checked compiling is slower (for experienced non "trial-and error" users) and those who have a 200 MMX or programm the "wild way" can uncheck that button.
*************************
The best time to do things is now !
Posted: Fri Mar 21, 2003 3:35 am
by BackupUser
Restored from previous forum. Originally posted by mindplay.
You'll need a second pass for inline procedures as well once those get implemented - might as well do it sooner or later ... PB is probably one of the fastest compilers of any language I've ever seen anyways; surely nobody would suffer even if the compilation was TWICE as slow - it would still probably be faster than 99% of all compilers, and that's fast enough for me

Posted: Fri Mar 28, 2003 8:58 pm
by BackupUser
Restored from previous forum. Originally posted by Amiga5k.
How about a compiler option that will allow us to decide whether we want one-pass (faster compiling, but problem with 'undeclared' functions) or two-pass (*slightly* slower compiling, but no 'undeclared' problems). This wouldn't be too much of an issue to do if Fred ends up putting in a two pass system: Just allow us to use the old one-pass compiler code OR the new two-pass code.
Is there a way where the editor could just keep track of procedures as they are entered and 'remember' that they were entered (in some list, perhaps) so that during compile time this list could be consulted to see if a particular procedure has been defined? This would be another way to do it without having to do a two-pass compile, maybe?
Russell
***Commodore 64 - Over one million cycles per second, 16 vibrant colors, 3 incredible audio channels and 38,911 Basic Bytes Free! Who could ask for anything more?***
Posted: Sun Mar 30, 2003 7:50 am
by BackupUser
Restored from previous forum. Originally posted by theogott.
If the Editor would do some "pre-compilation" it could be faster to compile, but it would need calculation power "at any time" and its difficult if you enter and then delete or change things.
I gues there was a BASIC before which had such a "compile immediately" feature. You could run the program at any time, what you got was just the error message from the last "compile".
Noone ever continued with that because ... what is 2 seconds for compilation ? What is if its 3 or 4 seconds then ?
The arguments against a second pass are therefore mostly emotional or the users have a P200 MMX and should think of upgrading.
*************************
The best time to do things is now !
Posted: Sun Mar 30, 2003 10:13 pm
by BackupUser
Restored from previous forum. Originally posted by Amiga5k.
Maybe Fred could convert PB into an interpreted language and we wouldn't have to compile at all! (NOT!) Or...
Imagine PB as an interpreted language while you're building it/testing it and then a compiled language when you're ready for it? Nah...
Russell
***Commodore 64 - Over one million cycles per second, 16 vibrant colors, 3 incredible audio channels and 38,911 Basic Bytes Free! Who could ask for anything more?***
Posted: Sun Mar 30, 2003 10:36 pm
by BackupUser
Restored from previous forum. Originally posted by mindplay.
Well, I don't know if/how PB does optimizations of include files, but ... might it be possible to "cache" compiled includes or something? So that they were only recompiled after being changed ... you never have all of your application source code in a single file anyways (you certainly shouldn't have), and you don't usually make changes to all of your source files at the same time, so that might significantly reduce the amount of code that needs to be recompiled ... just a thought.
Posted: Tue Apr 01, 2003 9:19 pm
by BackupUser
Restored from previous forum. Originally posted by Amiga5k.
I had this idea that I don't even know is logically possible, but if it is, then it would solve the problem of passing twice through the source:
1 - All procedures are automatically moved to the top of the code.
2 - If a procedure references and/or calls another, then THAT procedure is placed above the current one.
3 - Repeat step two with all of the procedures.
Other than procedures that call themselves, which PB handles alright anyways, this would, I think, prevent a procedure from referencing another procedure that hasn't been defined yet.
Any thoughts?
Russell
***Commodore 64 - Over one million cycles per second, 16 vibrant colors, 3 incredible audio channels and 38,911 Basic Bytes Free! Who could ask for anything more?***
Posted: Tue Apr 01, 2003 10:26 pm
by BackupUser
Restored from previous forum. Originally posted by CoderLaureate.
Originally posted by TheBeck
>I own an app for the C64 called "Blitz! Compiler" -- is that the
>same thing, or was there an actual "Blitz Basic" for the C64 too?
Actually it was "Basic 128" by Abacus that I was thinking of, my mistake. I also remember a Blitz compiler for basic but I don't know who made it.
Blitz Basic was available for the C64, and the C128. I owned the version for my C64 many many many moons ago. The Same Blitz compiler became available for the Amiga, and then later the PC.
-Jim
---------------------------------------------
AMD Duron 950Mhz/Windows XP Pro
http://www.BlueFireStudios.com
Posted: Wed Apr 02, 2003 6:39 pm
by BackupUser
Restored from previous forum. Originally posted by wcardoso.
Fred, what about leave the normal compilation as it is now, but add a new "final release compilation" option somewhere to make all the needed passes to reduce the size of the final code and speed up the execution time. Of course the time for compilation must be increased, but this process is only doing one time at the end of our work; isn't it ?:)
Posted: Wed Apr 02, 2003 8:17 pm
by BackupUser
Restored from previous forum. Originally posted by theogott.
What is it about Pass 1, Pass 2 etc. ?
Its not that things need to be sorted.
Its about knowing WHAT is there and WHERE it is.
Assume in a "Pass 1" would collect all Variable-Names, all Procedure-Names and Macros (so far avaiable later).
Would as well INCLUDE all needed stuff.
In Pass 1.5 he would (know what to )EXCLUDE (unneeded stuff).
Then in the second Pass compilation could do easier,
deal only with necessary code. Make best possible optimizations.
And you would not need to sort things. This is a general statement not taking into account possible "specialities" from purebasic.
*************************
The best time to do things is now !
Posted: Wed Apr 02, 2003 8:18 pm
by BackupUser
Restored from previous forum. Originally posted by theogott.
Before I forget .. Additional to above:
PASS 3: Makes optimizations on Assembler-Level.
(So far not my developement but just what is normal out there as example Intel C-Compiler ...).
*************************
The best time to do things is now !