[fpc-devel] Adding a new assembler to Free Pascal Compiler (language features supported/not supported options)

Skybuck Flying skybuck2000 at hotmail.com
Thu Apr 7 05:05:27 CEST 2011


Here is one little idea which might be obvious:

1. The assembler could notify to the rest of the system like parser or 
symantic checker which languages features are supported and which are not 
supported by the assembler.

This way certain "language elements" of the language could be turned off. 
This might be helpfull to introduce pascal to new hardware which might not 
support certain things like "pointers" or "virtual pointer/method 
tables/whatever" or "calls" or "integer support" or "floating point 
support".

So each element of the pascal language could get a boolean "supported/not 
supported" so that an assembler can "cherry-pick" what it wants to support 
at first...
then later it can start supporting other elements.

The benefit of this is that the symantic checker or parser can throw 
warnings/errors into the face of the user to notify him/her that he/she is 
using non-supported language features and such re-consider for the time 
being ;)


2. It would/could also be beneficial to the user... if the user simply 
doesn't want to use certain new language features and wants to make 
absolutely sure that they are not accidently being used then he/she could 
also disable certain language features and have the compiler automatically 
check if the user source code is complieing towards the settings/language 
element rules.

This could be helpfull in later porting/re-writing the code to other 
languages and/or systems. For example: first developing software on PC/CPU 
and later porting it to PC/GPU/Shaders/CG/OpenCL/PTX or anything new that 
comes along ;) =D


3. It might even be helpfull to disable "buggy language features or types" 
and quickly diagnose source code to see if it contains non-allowed language 
features/types.


4. Last but not least, handy new languages features could be turned on and 
be used ;) :) =D


Bye,
  Skybuck. 




More information about the fpc-devel mailing list