Commit graph

114 commits

Author SHA1 Message Date
Dale Weiler
06e2cb2b1b Add qc_pow. 2014-03-17 09:39:59 -04:00
Wolfgang Bumiller
b6b4a87cbf That's not how it should fail :P 2014-01-01 12:21:00 +01:00
Wolfgang Bumiller
acdc559d1f improved test of last attribute 2014-01-01 12:18:54 +01:00
Wolfgang Bumiller
5319caaaea definite -> last keyword; testcase updated too 2014-01-01 12:16:19 +01:00
Wolfgang Bumiller
50f905b821 adding 'final' 2013-12-06 22:41:15 +01:00
Wolfgang Bumiller
3988aae73e type and argument parsing improved to handle the field/vararg ambiguity; tests added 2013-10-18 16:28:28 +02:00
Dale Weiler
0cfc275f82 Fix 2013-10-17 20:35:56 -04:00
Dale Weiler
c210340081 Undo fix and actually use a macro in the accumulation test .. just incase. 2013-10-17 20:34:16 -04:00
Dale Weiler
c675ba8086 Does this fix it? 2013-10-17 20:25:02 -04:00
Dale Weiler
9f54610fbd Implement support for octal constants, this closes #97. 2013-10-17 05:17:30 -04:00
Dale Weiler
8a9c4edce8 Add a test for function accumulation attribute 2013-10-17 03:43:05 -04:00
Dale Weiler
b2c8f3ebc5 Vector cross product virtual instruction, now >< operator works for non-constant vectors. Thanks divVerent for the help. 2013-08-31 14:49:06 -04:00
Dale Weiler
64661f54ea Implemented >< (vector cross product operator). Currently support for constants only. 2013-08-31 13:41:25 -04:00
Dale Weiler
f8af7adcd7 Remove &~= operator from gmqccs operator table, only fteqcc supports it. 2013-08-29 07:19:19 -04:00
Dale Weiler
045bd4dbda Some style fixes for tests 2013-08-27 06:41:03 -04:00
Dale Weiler
28cd3a3f8f Forgot this one 2013-08-27 06:39:51 -04:00
Dale Weiler
f21216ecad A test for that xor stuff (the same one I used to cause the bug to manifest in the first place). 2013-08-27 06:35:58 -04:00
Wolfgang Bumiller
988b4b4960 ast_binary->right_first and an execution order check 2013-08-27 10:42:13 +02:00
Wolfgang Bumiller
147a6df629 fix testcase workarounds 2013-08-27 10:00:24 +02:00
Rudolf Polzer
e50b7a2719 Support vector bitor/bitand/bitxor.
Signed-off-by: Rudolf Polzer <divverent@xonotic.org>
2013-08-26 18:32:28 +02:00
Dale Weiler
557ad9da1a Make COMPILER_QCC default to please the stuborn Quake community. 2013-07-27 17:56:46 +00:00
Dale Weiler
5d2b57394e Add the good old xor swap trick to the xor test, yes it works :P 2013-06-16 02:24:10 +00:00
Dale Weiler
17ae2dbe4d Make ^ legal for vector ^ vector, and vector ^ float (read the huge comment that explains why and what this does). Currently only works for constants (don't know how to do expression for multiple vector components yet). 2013-06-16 02:17:29 +00:00
Dale Weiler
a27b7ee6a5 Make them tests work now 2013-06-15 11:05:25 +00:00
Dale Weiler
a8fddbb7d3 Implemented bitwise xor operator. 2013-06-15 09:48:40 +00:00
Wolfgang Bumiller
2c59385633 fixing double-free in initialzied string arrays, using them in the testcase 2013-06-12 15:53:07 +02:00
Wolfgang Bumiller
b30368f026 array testcase for previous commit 2013-06-12 15:47:59 +02:00
Wolfgang Bumiller
dc91918c1f error about too many elements in initializer; added test for initialized arrays: arrays2.tmpl/qc 2013-06-12 14:41:38 +02:00
Wolfgang Bumiller
d631c517b6 forgot to add that one 2013-06-12 13:56:40 +02:00
Wolfgang Bumiller
ba781c53ef now a bare 'return;' is not required anymore if return has been assigned anywhere 2013-05-29 17:08:03 +02:00
Wolfgang Bumiller
a76702cb36 make sure missing return values still warn 2013-05-29 17:01:26 +02:00
Wolfgang Bumiller
5aba29006b return assignment factorial test 2013-05-29 16:58:18 +02:00
Dale Weiler
fd5506b376 Update test template. 2013-05-29 11:30:26 +00:00
Dale Weiler
1b71caa1fe Update man page 2013-05-29 11:29:52 +00:00
Dale Weiler
6d6a2efada Experimental support for implicit return assignments. This closes #107. To enable return assignment support use -freturn-assignments. This allows you to do the following in QC code. T name() { return = expr_eval_T; return; /* returns expr_eval_T */ }. It allows for concise code and to rid locals in functions. It also saves a tremendous amount of space since only types of certian globals need to be allocated for returns. 2013-05-29 11:13:42 +00:00
Dale Weiler
1077eb2061 Add expressions for builtins test 2013-04-25 17:39:05 +00:00
Wolfgang Bumiller
66305c676a Allow string concatenation in the parser as well, for now only for immediate strings and __FUNC__, maybe later -fpermissive or somethign could allow it on const-delcared string variables 2013-04-24 17:27:04 +02:00
Dale Weiler
a0f6b00a15 Shitty testsuite support for windows the hacky way because there exists no sane simple way of redirecting pipes without a heafty chunk of code. 2013-04-24 14:04:00 +00:00
Wolfgang Bumiller
1e9d3e43cb test for the simple __FUNC__ case 2013-04-24 11:22:29 +02:00
Wolfgang Bumiller
17996dee50 fix noreturn testcase descriptions... those were mixed up 2013-04-23 17:07:19 +02:00
Dale Weiler
96c0fa983d A more realistic preprocessor concatenation test. 2013-04-21 06:52:22 +00:00
Dale Weiler
6009e2b3ea Undo that fail 2013-04-21 06:46:54 +00:00
Dale Weiler
07e335fdb8 Better output on failure 2013-04-21 06:46:39 +00:00
Dale Weiler
e27eebe0f9 More preprocessor testsuite support and our first preprocessor test! 2013-04-21 06:36:52 +00:00
Dale Weiler
ea0e2c47d5 We don't need to specify "-should fail" because we print the type now (this also makes the description colum shorter) 2013-04-21 06:13:25 +00:00
Dale Weiler
9bb586fb5a Add floor to tests defs.qh 2013-03-09 05:46:08 +00:00
Dale Weiler
d8d78f61a7 Implemented "reverse" enum attribute, e.g enum : reverse { A, B, C, D } -> A,B,C,D = 3,2,1,0 2013-03-09 05:07:14 +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