[Gambas-user] News about the new just-in-time compiler
    Benoît Minisini 
    g4mba5 at gmail.com
       
    Fri Jun 29 00:41:49 CEST 2018
    
    
  
Hi,
Here is a few news about the new just-in-compiler...
1) Almost everything is supported, and seem to work. Bigger test are 
needed now.
2) The following are not implemented, and may never be implemented for 
different reasons:
- Functions with a variable number of arguments.
- Arguments passed by reference with ByRef.
- Functions used as extern callbacks.
3) Extern functions calls are optimized: they are directly called from 
the JIT code. But this has not been tested yet!
4) Not all mathematical functions are correctly implemented yet.
5) clang may be supported instead of gcc. This is something to test 
before finding a way to dynamically detect which compiler to use.
6) I introduced a new keyword, UNSAFE. You use it with the FAST keyword.
When a function is declared "FAST UNSAFE", then it is just-in-time 
compiled, but all the safety checks are removed (null object, division 
by zero, out of array bounds...).
It allows you to speed up the code a little bit, when you are sure it 
won't do illegal things.
And if it does anyway, you will have memory corruption and/or 
segmentation fault.
Of course, the keyword can be used at the class level.
Enjoy!
-- 
Benoît Minisini
    
    
More information about the User
mailing list