U++ framework
Do not panic. Ask here before giving up.

Home » Developing U++ » Releasing U++ » U++ as .lib
Re: U++ as .lib [message #11711 is a reply to message #11704] Sun, 23 September 2007 11:04 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
cbpporter wrote on Sun, 23 September 2007 04:19


And I think it would be very useful to have an article on exactly how BLITZ works, what do you have to do to achieve it and why is it faster. Maybe other projects could benefit from it
(like at my work place where the slightest modification in a file requires a 1-2 minute rebuild).



Hm, in ToDo for eons.

OK, so quick BLITZ overview:

First, BLITZ processes packages (not the whole program) - each package can have a single BLITZ block.

Only .cpp including files with guards (#ifdef H... #define H) can qualify to be part of BLITZ block. Alternatively, you can force inclusion by #pragma BLITZ_APPROVE (also for header) or exlusion by #pragma BLITZ_PROHIBIT.

AND only files older than one hour qualify for BLITZ block. (Because you do not want files you work on to be in BLITZ block).

Also, the whole package can be excluded based on .upp settings.

Then files are scanned for any #defines, these are undefined at the end of file. BLITZ block is in fact a file generated into output directory that include all BLITZ approved files and gets compiled instead (it is named $blitz.cpp, you can check the output directory for details).

Now a dirty trick:

#ifdef  flagBLITZ
#define MK__s            MK__s_(COMBINE(BLITZ_INDEX__, __LINE__))
#else
#define MK__s            MK__s_(__LINE__)
#endif


Blitz block defines BLITZ_INDEX__ for each file, in order to give a library code chance to define unique static variable names...

OK, I believe that is all about the BLITZ magic:)

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: New major release?
Next Topic: Minor releases?
Goto Forum:
  


Current Time: Tue Nov 03 05:33:41 GMT+1 2026

Total time taken to generate the page: 0.00907 seconds