Spring, Sun, Love...
World financial crisis...
And of course our new Compiler 911.

Spring, Sun, Love... World financial crisis... And of course our new Compiler 911.

March 3, 2009

The first free Compiler 911 release of the 2009 year comes at the time of global financial crisis, when the world is trying to make away with wastefulness and find optimal schemes of resource usage (in the broad sense). So the idea of building the optimizing compiler, which would bring the program optimization to the new level, may turn out to be a demanded one today. Compiler 911 is still not the best compiler in the world, but we move forward and try to find original solutions to introduce into our product.

High Level Improvements

  • Dynamic memory allocation support (via SystemUnit).
  • Classes support (via SystemUnit).
  • AnsiString, WideString support (via SystemUnit).

Low Level Optimizer Improvements

  • Register usage optimization is almost completed. Optimizer tries to use all available regs during calculating expressions.
  • Local memory tracking. Optimizer now analizes and emulates memory reads/writes and the local memory contents. (Local memory is data allocated on stack). So memory accessing instructions are optimized now too. These optimizations are not properly tested yet; not all ideas are implement eigher.
  • The next step which is about to be taken, will be holding mostly used constants and memory cells in free registers.

Note for assembler programmers. The main purpose of Compiler 911 is optimizing programs! In most cases it transforms the input assembler code. When the source code contains instruction with "eax" register for example, this doesn`t mean the optimized code will contain instruction with this register, or contain this form of instruction, or even contain it at all. Compiler analyzes the logic of calculations and builds its own calculation algorithm. To make sure this logic is "understood" correctly, please do not forget to fill procedure's headers (params, return values, calling convention), which we call procedure's Input/Output. This gives the optimizer information about which register and memory addresses are input values and which are output values. All invaluable assignments and calculations are eliminated by optimizer. So there is no opportunity at this moment to return procedures value for example in some EFLags bit, because no standart calling convention (stdcall, register...) allows it. We are thinking about implementing user-defined calling conventions or making compiler choose optimal Input/Oupput by itself.

IDE Improvements

  • New compiler messages highlight system. Some error messages are double-color highlighted now. For example, if an operator is not applicable for some operands, both operator and its operands are highlighted (in different colors). Some messages still use old highlighting style; this will be improved later.
  • Assembler error messages are very informative now (not just "Invalid combination of opcode and operands").
  • Assembler output exploring in ObjectInspector improved and extended. Called procedure's Input/Output params are displayed for each call intruction.
  • Recent files history is now available.

Distribution Pack

  • Sample SystemUnit (classes, strings and memory managment support routines) is nowincluded inti the distribution pack.
  • New demo application, an example of pascal-style strings usage, is added to the download pack.