Dale Weiler [Sun, 6 Oct 2013 03:36:48 +0000 (23:36 -0400)]
Fix some things: get all the Quake mods to compile again (I broke binary expressions .. oops) Fix the check-proj script, using $? for status was invalid because of pipes. The ir now properly considers negation virtual instruction to be operations (as it should).
Anton Balashov [Mon, 30 Sep 2013 12:43:57 +0000 (16:43 +0400)]
Fixed hyphen-used-as-minus-sign in gmqcc.1
Accortding to lintian report:
I: gmqcc: hyphen-used-as-minus-sign usr/share/man/man1/gmqcc.1.gz:156
N:
N: This manual page seems to contain a hyphen where a minus sign was
N: intended. By default, "-" chars are interpreted as hyphens (U+2010) by
N: groff, not as minus signs (U+002D). Since options to programs use minus
N: signs (U+002D), this means for example in UTF-8 locales that you cannot
N: cut and paste options, nor search for them easily. The Debian groff
N: package currently forces "-" to be interpreted as a minus sign due to
N: the number of manual pages with this problem, but this is a
N: Debian-specific modification and hopefully eventually can be removed.
N:
N: "-" must be escaped ("\-") to be interpreted as minus. If you really
N: intend a hyphen (normally you don't), write it as "\(hy" to emphasise
N: that fact. See groff(7) and especially groff_char(7) for details, and
N: also the thread starting with
N: http://lists.debian.org/debian-devel/2003/debian-devel-200303/msg01481.html
N:
N: If you use some tool that converts your documentation to groff format,
N: this tag may indicate a bug in the tool. Some tools convert dashes of
N: any kind to hyphens. The safe way of converting dashes is to convert
N: them to "\-".
N:
N: Because this error can occur very often, Lintian shows only the first 10
N: occurrences for each man page and give the number of suppressed
N: occurrences. If you want to see all warnings, run Lintian with the
N: -d/--debug option.
N:
N: Refer to /usr/share/doc/groff-base/README.Debian and the groff_char(7)
N: manual page for details.
N:
N: Severity: wishlist, Certainty: possible
N:
N: Check: manpages, Type: binary
N:
I: gmqcc: hyphen-used-as-minus-sign usr/share/man/man1/gmqcc.1.gz:354
I: gmqcc: hyphen-used-as-minus-sign usr/share/man/man1/gmqcc.1.gz:676
Make unary - operator act as an ast_unary node. This allows for consistency (no sense in making unary use binstore nodes, it doesn't make much sense). It also allows for the peephole optimization on unary chains that cancel each other to take place; i.e code like "-(-a)" simplifies to "a", thus eliminating instructions.
Wolfgang Bumiller [Wed, 18 Sep 2013 14:20:07 +0000 (16:20 +0200)]
since we don't bail on some of the warnings right away, (that is, with -Werror), also check the compile_errors count in main rather than just the return values
Added -progsrc commandline switch to specify progs.src files of different names. Cleaned up xonotic export script, fixed check-doc on linux systems by disabling mandoc check.
Added xonotic_export.sh utility that when run from a xonotic-data.pk3dir will eliminate redundant files and create prog.src files for csprogs, progs(server) and menu. This tool will be used for check-proj.sh for exporting xonotic changes to our server.
Wolfgang Bumiller [Mon, 9 Sep 2013 10:18:30 +0000 (12:18 +0200)]
distro/archbsd/this - as we don't depend on glibc there, just libc; also changed DESTDIR in archlinux/this/Makefile so it can be easily changed from the bsd Makefile
Dale Weiler [Sat, 31 Aug 2013 16:57:24 +0000 (12:57 -0400)]
Prevent divide by zero for / and % operations in constant folding (previously caused compiler SIGFPE), instead "inf" is generated for both cases. This closes #124
Dale Weiler [Sat, 31 Aug 2013 13:53:19 +0000 (09:53 -0400)]
There is no bug since the testsuite uses -o for preprocessed output (thus the printf never gets involved) if the testsuite read the preprocessor output from stdout than things would be wrong, since however it isn't there is no bug.
Dale Weiler [Thu, 29 Aug 2013 04:05:37 +0000 (00:05 -0400)]
Implement [[eraseable]] attribute. When used with a function it instructs the AST (which than transfers logic to the IR) that the function (or variable) is potentially unused (verified by checking the read count). This than propogates through the IR and prevents the IR from generating both the definition and global/function. The intrinsics system uses this as well to prevent intrinsic functions from being generated unless they're used.
Dale Weiler [Wed, 28 Aug 2013 16:46:22 +0000 (12:46 -0400)]
Constant fold intrinsics if their arguments are constant. TODO: reference count intrinsics such that they're not generated unless they're used, currently when an intrinsic can be folded-away it's marked for generation and makes it to the final output binary even though it isn't used.