Implemented __TIME_STAMP__ predef, expands to a timestamp of when the __FILE__ was last modified, returned in the format: "Www Mmm dd hh:mm:ss yyyy", where Www is the weekday, Mmm the month (in letter), dd the day of the month, hh:mm:ss the time, and yyyy the year.
Wolfgang Bumiller [Tue, 23 Apr 2013 14:49:43 +0000 (16:49 +0200)]
Makefile: be more conformant: at link-time use LDFLAGS, not CFLAGS, also use CPPFLAGS prepended to CFLAGS at compile-commands, append optional LIBS at link-time after everything else
Add download.c (used for generating the download.html for the website (for releases)) based on magic. use gcc download.c -o gen; gen ../../; git checkout gh-pages; git add download.html; git push origin gh-pages; to apply website changes.
Add syntax configuration file for gtksourceview (this allows QC code syntax highlighting for GNOMEs default text view in nautilus, gedit, and sandy + other gtksouceview based editors).
Wolfgang Bumiller [Wed, 17 Apr 2013 16:23:30 +0000 (18:23 +0200)]
parser_const_string now uses hashtables; hashtables may want to dup an empty string without it becoming NULL - also replacing ir_strdup with the new util_ one
Some inline never hurt anyone .. actually, C made a bad decision in it's design, everything should've always been implicitly inline, since most code back in the day was small, if you had large bodies, there should've been an 'outline' keyword for that instead :P
Use hashtable for macro definitions in the preprocessor, this speeds up the search for them, and the removal of them making it O(1) instead of O(n). This also makes my 30 second xonotic compiles take only 13 seconds
Rewrote memory tracking, now prints highest water mark (most used memory at a given time during compile). Changes all byte representation to MB representation. Added ability to print the contents of the leaked memory to the console when -debug is on (infact the lost messages only print during -debug), -memchk simply reports the memory info at the end (it is also printed when -debug). You can set the memory dump columns with -memdumpcols=# where # is the number of columns you want (default is 16)
More flattening. I don't know why I turned off buffering, that makes output to console even slower due to all the flushes, which actually slows down compilation.
flatten the use of strcpy, 90% of the cases we already knew the length of the string either at compile-time, or already within the scope we where, thus letting us use strncpy, which can be further optimized (unrolled if static)
Dale Weiler [Thu, 21 Mar 2013 02:02:41 +0000 (02:02 +0000)]
Cross architecture stuff for distro build scripts. If you have an x86_64 capable system with a compiler and make (the OS doesn't even matter), simply changing to "distro" directory and typing "make" is sufficent to make archlinux i686/x86_64, and debian i686/x86_64 packages.
Dale Weiler [Sat, 9 Mar 2013 08:53:39 +0000 (08:53 +0000)]
Implemented smart intrinsic / builtin system. When you use trivial math functions like "pow", if they don't exist as a builtin, the compiler will implement its own versions, likewise, if a compiler builtin depends on a function that exists, it will use it, likewise if it doesn't it will implement it. If you explicitally use __builtin_ (prefixed) versions, the compiler again will select the best option it can, be it a combination of both builtins and compiler builtins, all compiler builtins, OR, all builtins (most performant).