Hi Hans,
I transfer this discussion to the list as it may be interesting to other
people.
2014-09-14 10:16 GMT+02:00 Hans Zwakenberg | Ocean Consulting GmbH <
address@hidden>:
So the questions is this redefined as: how do I extend the
current REAL_GENERAL to achieve this? Do I simply extend the
REAL_GENERAL.e file? I would be fooling around rather close to the current
distribution, something that might make me nervous... ;)
The problem is that REAL_GENERAL is a very ugly class (INTEGER_GENERAL
too). It triggers very specific behaviour deep in the compiler (including
crooked conformane rules). You cannot just inherit from it.
You could try modifying the source of the class itself.
If you do so, you may need to be aware of the numerous external "built_in"
features. Those features are compiler hooks, see:
- NATIVE_BUILT_IN -- the external feature definition, for some generic
checks (type of arguments, result...)
- EXTERNAL_ROUTINE and heirs -- the actual support of each known
built-in feature :
- what must be made alive if a built-in feature is used, i.e. collect
- code transformations: some "recent" (in SmartEiffel time!)
built-ins tend to generate equivalent Eiffel code (albeit with some
specific internal instructions)
- C_NATIVE_FUNCTION_MAPPER and C_NATIVE_PROCEDURE_MAPPER -- the actual C
code generation for each known built-in feature
Cheers,
Cyril