Commit graph

2306 commits

Author SHA1 Message Date
Dale Weiler
662612d66f Better diagnostic when "floor" cannot be found. 2013-03-08 09:23:35 +00:00
Dale Weiler
f19adcd1b3 Implemented __builtin_mod, and % operator. Added floor builtin to the standalone executor. Mod works so long as the compiler can find a suitable definition of "float floor(float)", otherwise it prints a diagnostic and gives up (original id1 Quake had floor so we can depend on it). 2013-03-08 09:17:54 +00:00
Dale Weiler
b971ddec3a Implemented concept of enumeration attributes (can be further extended, but currently only "flag" is implemented as an attribute). An enumeration with a flag attribute will act as a "flagged enumeration", one that automatically handles exponentiation of the constants defined inside it, i.e enum : flag { A, B, C }, A,B,C will equal 2, 4, 8. 2013-03-08 08:01:45 +00:00
Dale Weiler
479f3b9343 Implemented __builtin_exp 2013-03-08 03:46:25 +00:00
Dale Weiler
12340a6bd0 Actually generate an ast_call for __builtin_pow for the ** operator, otherwise the operator yeilds a ast_function, making "a ** b" not work, but since it's a function, allows **(a, b). Also added tests for exponentiation operator. 2013-03-07 23:05:40 +00:00
Dale Weiler
0367a6175d Add some ice 2013-03-07 22:52:03 +00:00
Dale Weiler
db229b6f94 Make ** RIGHT associative 2013-03-07 22:14:04 +00:00
Dale Weiler
bd54fe03b9 Get rid of the bullshit log stuff 2013-03-07 22:09:14 +00:00
Dale Weiler
f2380a2faa They see me roll 'n, casting, so far they just think I'm implicit casting dirty, implicity casting dirty .. 2013-03-07 21:38:46 +00:00
Dale Weiler
d3c7b6fb39 Implement exponentiation operator ** as well as __builtin_pow (used for exponentiation operator). Use of exponentiation operator with constants results in const folded (precomputed at compile time exponentiation), otherwise runtime exponentiation with some clever loops (slow!). 2013-03-07 21:31:19 +00:00
Dale Weiler
f59d557dce Update specification.tex 2013-03-07 10:21:29 -05:00
Dale Weiler
bedfee1fae Update specification.tex 2013-03-07 10:19:00 -05:00
Dale Weiler
bdbfc85243 Update specification.tex 2013-03-07 09:39:41 -05:00
Dale Weiler
2146e018f1 Update specification.tex 2013-03-07 00:39:26 -05:00
Wolfgang Bumiller
a32f59b256 hopefully fix an off-by-1 vararg copy issue 2013-02-26 16:39:28 +01:00
Dale Weiler
9f06e0e017 Print the number for the test itself in the test-suite. The log10 can be improved. 2013-02-25 10:01:36 +00:00
Dale Weiler
b1d1aabbdd Remove debug printf 2013-02-25 08:52:56 +00:00
Dale Weiler
aebab8b68a Push definitions when -O0 2013-02-25 08:52:17 +00:00
Wolfgang Bumiller
d27c06ea7f Merge branch 'master' into cooking 2013-02-20 23:08:58 +01:00
Wolfgang Bumiller
80184b0d80 fix: don't mess up multiline macros in files ending with \r\n 2013-02-20 23:08:50 +01:00
Wolfgang Bumiller
aa27249b88 update to .gitignore 2013-02-13 10:55:32 +01:00
Wolfgang Bumiller
3593a1b6b8 Merge branch 'master' into cooking 2013-02-12 14:31:27 +01:00
Dale Weiler
3b923a0183 fix 2013-02-11 18:02:42 +00:00
Dale Weiler
3b630ec5dc Less duplication 2013-02-11 17:51:23 +00:00
Dale Weiler
c7e3e3e306 Fix fucking mingw32 shit. 2013-02-11 17:49:17 +00:00
Wolfgang Bumiller
1dfd375738 include: guard the actual inclusion with ftepp->output_on so that include inside #if 0 doesn't happen 2013-02-11 12:13:27 +01:00
Wolfgang Bumiller
3e3b8993aa Lifetime analysis: Don't go through the blocks as a graph, instead, go through only the list.
The difference in code is rather small, but it's much faster.
2013-02-11 11:39:44 +01:00
Dale Weiler
0b154d69e7 BOOM 2013-02-10 13:59:24 +00:00
Dale Weiler
c8959a2452 BOOM 2013-02-10 13:57:22 +00:00
Dale Weiler
b5ead871ef Consider cppchecks (performance) warnings. 2013-02-10 13:47:50 +00:00
Dale Weiler
5acde18ef1 Sigh 2013-02-10 02:09:12 +00:00
Dale Weiler
b0c6dc5ab2 Fix mem leak. 2013-02-10 02:08:17 +00:00
Dale Weiler
e4554892b0 Oops 2013-02-08 19:07:12 +00:00
Dale Weiler
e4075916f0 depend rule for $(OBJ_P) PAK utility. 2013-02-08 16:45:05 +00:00
Dale Weiler
fb8fb9f0f7 These includes are not required 2013-02-08 16:43:31 +00:00
Dale Weiler
ac8f510dac Added $(PAK) to Makefile for clean rule. 2013-02-08 16:42:43 +00:00
Dale Weiler
02230ca992 endian swap on FOURCC for "PACK" on BE systems. 2013-02-08 16:40:47 +00:00
Dale Weiler
533b2144c5 Fix some memleaks. 2013-02-08 16:39:14 +00:00
Dale Weiler
eabb92f7b4 A command line interface for the PAK utility, made it a seperate build target too. 2013-02-08 16:32:15 +00:00
Dale Weiler
a568d43487 Implemented __VA_COUNT__ 2013-02-08 12:30:17 +00:00
Dale Weiler
945aba6e10 Make it compile as C++ code AGAIN 2013-02-08 12:20:48 +00:00
Dale Weiler
09a1a37554 Actually add fs.c 2013-02-08 12:08:24 +00:00
Dale Weiler
8d59d7029d Cleanup cargocult directory and file specific things, to fs.c (renamed file.c which also contains directory handling stuff). Also cleaned up some stuff, and added proper end comments to conditional inclusion stuff. 2013-02-08 12:06:59 +00:00
Dale Weiler
ece64dc779 fix build issue 2013-02-07 20:10:01 +00:00
Dale Weiler
aef60b7ec1 Add directory support for extract_all 2013-02-07 20:08:50 +00:00
Dale Weiler
8ecfc51799 Cleanups and fixes to the PAK utility, can now extract/insert, tested and functional for the most part. 2013-02-07 17:21:15 +00:00
Dale Weiler
1fa9fbb94b Fixes to the PAK utility. 2013-02-07 17:07:29 +00:00
Dale Weiler
86df8c8a78 Work in progress PAK extractor/insterter. 2013-02-07 16:22:47 +00:00
Dale Weiler
d1f4b108a0 Update makefile 2013-02-06 10:54:14 +00:00
Dale Weiler
ecd9e3be97 Make the testsuite C++ compatible. 2013-02-06 10:52:09 +00:00