[fpc-devel] Project Idea: Mini-FPC

Skybuck Flying skybuck2000 at hotmail.com
Sat Sep 10 03:36:59 CEST 2011


"
Have you looked at target "embedded" ?
"

Just took a look at it it's still quite big/huge and uses arm ?

"
For what specific platform are you contemplating this for ?
"

None, redcode, cuda.

Mini-fpc could be reduced to show proportions that it becomes virtual, an 
exercise at seperating the processing of the pascal language and giving 
meaning/sense to the tokens so it becomes ready for assembling. It could be 
reduced to such a level that it becomes a question of plugging in the lower 
parts, so it could also become more moduler.

It's also important to reduce code size and code files as much as possible, 
just searching all files for a certain keyword already takes multiple 
seconds.

Mini-fpc would be ment to learn how free pascal works and also to be able to 
port it to other pascal languages for example Delphi, so further 
experimentation can be done.

"
(i.e. what specific need is driving this question ?)
"

Understanding for example how free pascal compiles itself, which units it 
needs as a minimum, so far it seems to need system.pas, objpas.pas and 
sysinit.pas.

Something like that. sysinitpas.pas contains some routines in implementation 
section which must apperently be present, some functions are made public via 
special directives.

There is also another compiler directive for example "compilerproc" which 
remains undocumented, and then there are these things "aliases" and such.

Free Pascal seems to allow to compile a user supplied system.pas unlike 
Delphi where this is not allowed, so this could give some problems how to 
port Free Pascal to Delphi.

Mini-FPC would also be a helpfull tool to see if it's possible or not and 
which "self-compiling" features free pascal has which Delphi might be 
missing.

Perhaps there could be work arounds for Delphi how to still compile it.

"
It implements a very minimal set of things, basically the minimum necessary 
to support the language core, and the minimum necessary to support a given 
processor and it's "system" unit.
"

I wouldn't call that minimal in any sense.

Minimal would be: redcode support.

Also the free pascal/delphi language has become bloated with a lot of 
stuff... it could be further interesting to reduce it... just for a learning 
project, but perhaps that should be called: "Slim-FPC" or so ;) or 
"Nano-FPC" lol.

Nano would be:

One integer type, one string type, branch support, loop support, basic 
support, object orientation support, property support, array support, 
virtual methods support.

(Or maybe multiple integer types, just to make it a bit more usuable, and 
then also very maybe floating type or multiple floating types but this could 
again make it too complex, and keep it simple).

Only two platforms support to show how to support different assemblers, and 
how to swap rtl's or so.

A minimum ammount of files and code.

Bye,
  Skybuck. 




More information about the fpc-devel mailing list