]> git.rm.cloudns.org Git - xonotic/gmqcc.git/log
xonotic/gmqcc.git
12 years agoparser_finish needs to be called in progs.src mode as well
Wolfgang (Blub) Bumiller [Wed, 15 Aug 2012 15:01:09 +0000 (17:01 +0200)]
parser_finish needs to be called in progs.src mode as well

12 years agoremove MEM_VECTOR_INIT - the memset does it all, don't give a false sense of initiali...
Wolfgang (Blub) Bumiller [Wed, 15 Aug 2012 10:13:15 +0000 (12:13 +0200)]
remove MEM_VECTOR_INIT - the memset does it all, don't give a false sense of initialization since it wasn't complete anyway

12 years agoMerge branch 'master' of git://github.com/graphitemaster/gmqcc
Wolfgang (Blub) Bumiller [Wed, 15 Aug 2012 10:11:45 +0000 (12:11 +0200)]
Merge branch 'master' of git://github.com/graphitemaster/gmqcc

12 years agoFix memset on the parser...
Wolfgang (Blub) Bumiller [Wed, 15 Aug 2012 10:11:15 +0000 (12:11 +0200)]
Fix memset on the parser...

12 years agogmqcc now builds on visual studio
Dale Weiler [Tue, 14 Aug 2012 23:06:53 +0000 (19:06 -0400)]
gmqcc now builds on visual studio

12 years agoAdding another test qc file, for constant folding
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 21:53:55 +0000 (23:53 +0200)]
Adding another test qc file, for constant folding

12 years agobit-and const-fold should use bitand not bitor
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 21:52:57 +0000 (23:52 +0200)]
bit-and const-fold should use bitand not bitor

12 years agoconstant folding for bit and logic ops, added some macros to shorten the code (by...
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 21:50:49 +0000 (23:50 +0200)]
constant folding for bit and logic ops, added some macros to shorten the code (by a lot)

12 years agoconst folding for division
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 21:43:08 +0000 (23:43 +0200)]
const folding for division

12 years agoconstant folding for +, - and *
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 20:51:05 +0000 (22:51 +0200)]
constant folding for +, - and *

12 years agoget rid of more duplicate code
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 20:34:20 +0000 (22:34 +0200)]
get rid of more duplicate code

12 years agoAllow multiple fields to be declared using comma
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 20:31:08 +0000 (22:31 +0200)]
Allow multiple fields to be declared using comma

12 years agovector fields now get _x, _y and _z too
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 18:00:11 +0000 (20:00 +0200)]
vector fields now get _x, _y and _z too

12 years agoprogs.src mode added
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 17:30:03 +0000 (19:30 +0200)]
progs.src mode added

12 years agocombine 2 ifs to shorten code a little
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 15:48:22 +0000 (17:48 +0200)]
combine 2 ifs to shorten code a little

12 years ago-= operator
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 15:44:14 +0000 (17:44 +0200)]
-= operator

12 years agoerror message replacement
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 15:36:20 +0000 (17:36 +0200)]
error message replacement

12 years agofixing ast_binstore_codegen's lvalue flag setting, now += on entfields works correctly
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 15:35:02 +0000 (17:35 +0200)]
fixing ast_binstore_codegen's lvalue flag setting, now += on entfields works correctly

12 years ago+= operator implemented
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 15:30:55 +0000 (17:30 +0200)]
+= operator implemented

12 years agomake the += operator use binstore actually, currently it was acting like a regular...
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 15:27:52 +0000 (17:27 +0200)]
make the += operator use binstore actually, currently it was acting like a regular plus

12 years agoreplacing lots of error messages
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 15:27:26 +0000 (17:27 +0200)]
replacing lots of error messages

12 years agoshush typo
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 15:17:35 +0000 (17:17 +0200)]
shush typo

12 years agodifferent warning message
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 15:08:00 +0000 (17:08 +0200)]
different warning message

12 years agoanother -Wextensions situation: -std=qcc has no for loops
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:59:14 +0000 (16:59 +0200)]
another -Wextensions situation: -std=qcc has no for loops

12 years agoPushing my current testcode
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:53:18 +0000 (16:53 +0200)]
Pushing my current testcode

12 years agofix wrong count on IF/IFNOT jumps
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:48:20 +0000 (16:48 +0200)]
fix wrong count on IF/IFNOT jumps

12 years agofixup do-while parsing, expect a semicolon afterwards
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:42:29 +0000 (16:42 +0200)]
fixup do-while parsing, expect a semicolon afterwards

12 years agodo-while loops
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:38:11 +0000 (16:38 +0200)]
do-while loops

12 years agoparsewarning() now gets GMQCC_WARN since parsewarning returns whether or not the...
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:26:42 +0000 (16:26 +0200)]
parsewarning() now gets GMQCC_WARN since parsewarning returns whether or not the warning was treated as an error, thus we need to bail if it returns true

12 years agothe 'local' keyword now also introduces the declaration of a local variable
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:22:38 +0000 (16:22 +0200)]
the 'local' keyword now also introduces the declaration of a local variable

12 years agoflags and warnings not printed anymore without -dump
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:20:39 +0000 (16:20 +0200)]
flags and warnings not printed anymore without -dump

12 years ago-dump option, by default the IR is not dumped anymore
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:19:23 +0000 (16:19 +0200)]
-dump option, by default the IR is not dumped anymore

12 years ago-Wextensions for -std=qcc: warn about missing 'local' keyword when declaring a variab...
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:17:09 +0000 (16:17 +0200)]
-Wextensions for -std=qcc: warn about missing 'local' keyword when declaring a variable without it

12 years ago-Wextensions on by default
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:16:32 +0000 (16:16 +0200)]
-Wextensions on by default

12 years agoeof after parsing the semicolon of a function declaration shouldn't be an error...
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:14:26 +0000 (16:14 +0200)]
eof after parsing the semicolon of a function declaration shouldn't be an error...

12 years agoGetting rid of some debug output
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:12:12 +0000 (16:12 +0200)]
Getting rid of some debug output

12 years ago'local' becomes a keyword
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:10:17 +0000 (16:10 +0200)]
'local' becomes a keyword

12 years agoallow a semicolon after function bodies - make it mandatory with -std=qcc
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 12:38:02 +0000 (14:38 +0200)]
allow a semicolon after function bodies - make it mandatory with -std=qcc

12 years agoactually print the prototype's file+line, not the current one
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 12:19:44 +0000 (14:19 +0200)]
actually print the prototype's file+line, not the current one

12 years agotype comparison, function prototypes
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 12:14:56 +0000 (14:14 +0200)]
type comparison, function prototypes

12 years agothe error about an already-declared variable should display the place its been previo...
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 11:50:55 +0000 (13:50 +0200)]
the error about an already-declared variable should display the place its been previously declared at

12 years agoremoved redundant error+file+line in parseerror()
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 11:15:55 +0000 (13:15 +0200)]
removed redundant error+file+line in parseerror()

12 years agoremoving all direct 'printfs' from ast and ir, replaced by the error interface
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 11:14:32 +0000 (13:14 +0200)]
removing all direct 'printfs' from ast and ir, replaced by the error interface

12 years agoit's .file, not .name'
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 10:17:34 +0000 (12:17 +0200)]
it's .file, not .name'

12 years agorenamign 'errtype' to 'msgtype' here... makes more sense... plus I had it on the...
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 10:17:08 +0000 (12:17 +0200)]
renamign 'errtype' to 'msgtype' here... makes more sense... plus I had it on the paramlist :P

12 years agooops... removing wrongly placed semicolons
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 10:15:05 +0000 (12:15 +0200)]
oops... removing wrongly placed semicolons

12 years agoerror-print functions which take lex_ctx
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 10:06:28 +0000 (12:06 +0200)]
error-print functions which take lex_ctx

12 years agoAnd a colon for the colored version too ...
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 10:00:09 +0000 (12:00 +0200)]
And a colon for the colored version too ...

12 years agoAdd a colon after the linenumber
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 09:54:48 +0000 (11:54 +0200)]
Add a colon after the linenumber

12 years agodon't add the general 'parse error' message if an error has already been printed
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 09:54:27 +0000 (11:54 +0200)]
don't add the general 'parse error' message if an error has already been printed

12 years agoused the wrong va_list there... why didn't gcc warn about this being uninitialized...
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 09:54:06 +0000 (11:54 +0200)]
used the wrong va_list there... why didn't gcc warn about this being uninitialized...

12 years agoWorking towards a saner error-output system, adding -Werror
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 09:34:07 +0000 (11:34 +0200)]
Working towards a saner error-output system, adding -Werror

12 years agoremove now unused files
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 08:57:09 +0000 (10:57 +0200)]
remove now unused files

12 years agoMerge branch 'master' into blub/parser
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 08:42:34 +0000 (10:42 +0200)]
Merge branch 'master' into blub/parser

12 years agoast_binstore, used for +=, -=, ++, -- etc
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 08:40:48 +0000 (10:40 +0200)]
ast_binstore, used for +=, -=, ++, -- etc

12 years agostoring generated values and returning them early if they exist - will error when...
Wolfgang (Blub) Bumiller [Mon, 13 Aug 2012 17:54:53 +0000 (19:54 +0200)]
storing generated values and returning them early if they exist - will error when that doesn't make sense eg when trying to call codegen ast_ifthen more than once

12 years agoinitialize ast_expression_common.outl/outr
Wolfgang (Blub) Bumiller [Mon, 13 Aug 2012 17:40:06 +0000 (19:40 +0200)]
initialize ast_expression_common.outl/outr

12 years agoprototypes for ast_binstore, and storing outl/outr in ast_expression_common, TODO...
Wolfgang (Blub) Bumiller [Mon, 13 Aug 2012 17:39:35 +0000 (19:39 +0200)]
prototypes for ast_binstore, and storing outl/outr in ast_expression_common, TODO: let ast_codegen functions reuse previous results so that binstore can call codegen twice

12 years agowhile, for
Wolfgang (Blub) Bumiller [Mon, 13 Aug 2012 15:10:13 +0000 (17:10 +0200)]
while, for

12 years agofactored out 'if' parsing code into a function, added 'while' parsing, and errors...
Wolfgang (Blub) Bumiller [Mon, 13 Aug 2012 14:45:35 +0000 (16:45 +0200)]
factored out 'if' parsing code into a function, added 'while' parsing, and errors for more unsupported operators

12 years agoEven more operators
Wolfgang (Blub) Bumiller [Mon, 13 Aug 2012 13:33:32 +0000 (15:33 +0200)]
Even more operators

12 years agoMerge branch 'master' into blub/parser
Wolfgang (Blub) Bumiller [Mon, 13 Aug 2012 13:25:40 +0000 (15:25 +0200)]
Merge branch 'master' into blub/parser

12 years agotype_eq_instr[], type_ne_instr[]
Wolfgang (Blub) Bumiller [Mon, 13 Aug 2012 13:25:14 +0000 (15:25 +0200)]
type_eq_instr[], type_ne_instr[]

12 years agoMore operations
Wolfgang (Blub) Bumiller [Mon, 13 Aug 2012 13:24:55 +0000 (15:24 +0200)]
More operations

12 years agonicer error messages, bitand and bitor for floats allowed
Wolfgang (Blub) Bumiller [Mon, 13 Aug 2012 13:13:43 +0000 (15:13 +0200)]
nicer error messages, bitand and bitor for floats allowed

12 years agoCheck types on + and - operations
Wolfgang (Blub) Bumiller [Mon, 13 Aug 2012 13:09:27 +0000 (15:09 +0200)]
Check types on + and - operations

12 years agoadding missing initializer for ir_value's member array
Wolfgang (Blub) Bumiller [Sun, 12 Aug 2012 19:56:53 +0000 (21:56 +0200)]
adding missing initializer for ir_value's member array

12 years agoafter a closing paren another operator has to be expected again
Wolfgang (Blub) Bumiller [Sun, 12 Aug 2012 18:21:21 +0000 (20:21 +0200)]
after a closing paren another operator has to be expected again

12 years agosome debug outputs which can be activated via a define, fixing a bug where the shunti...
Wolfgang (Blub) Bumiller [Sun, 12 Aug 2012 18:13:14 +0000 (20:13 +0200)]
some debug outputs which can be activated via a define, fixing a bug where the shunting yard tries to apply operators when there are none left

12 years agoreturn an error code at exit after compile errors
Wolfgang (Blub) Bumiller [Sun, 12 Aug 2012 18:12:32 +0000 (20:12 +0200)]
return an error code at exit after compile errors

12 years agoit's a member of entity, not of a field...
Wolfgang (Blub) Bumiller [Sun, 12 Aug 2012 17:29:18 +0000 (19:29 +0200)]
it's a member of entity, not of a field...

12 years ago-std=gmqcc way to handle fields by 'namespace'
Wolfgang (Blub) Bumiller [Sun, 12 Aug 2012 17:24:08 +0000 (19:24 +0200)]
-std=gmqcc way to handle fields by 'namespace'

12 years agowithout -std=gmqcc fields are accessible anywhere where globals are
Wolfgang (Blub) Bumiller [Sun, 12 Aug 2012 17:02:52 +0000 (19:02 +0200)]
without -std=gmqcc fields are accessible anywhere where globals are

12 years agoRecognize a dot as operator when not in 'no-ops' mode in the lexer
Wolfgang (Blub) Bumiller [Sun, 12 Aug 2012 17:00:44 +0000 (19:00 +0200)]
Recognize a dot as operator when not in 'no-ops' mode in the lexer

12 years agodon't rewind local variables too far
Wolfgang (Blub) Bumiller [Sun, 12 Aug 2012 16:58:46 +0000 (18:58 +0200)]
don't rewind local variables too far

12 years agoMerge branch 'master' into blub/parser
Wolfgang (Blub) Bumiller [Sun, 12 Aug 2012 16:45:22 +0000 (18:45 +0200)]
Merge branch 'master' into blub/parser

12 years agoprint error and return NULL when trying to create an invalid member access
Wolfgang (Blub) Bumiller [Sun, 12 Aug 2012 16:44:58 +0000 (18:44 +0200)]
print error and return NULL when trying to create an invalid member access

12 years agoMerge branch 'master' into blub/parser
Wolfgang (Blub) Bumiller [Sun, 12 Aug 2012 09:39:52 +0000 (11:39 +0200)]
Merge branch 'master' into blub/parser

12 years agofixed: ast_member needs to allow type_vector instead of type_float as base
Wolfgang (Blub) Bumiller [Sun, 12 Aug 2012 09:39:43 +0000 (11:39 +0200)]
fixed: ast_member needs to allow type_vector instead of type_float as base

12 years agoMerge branch 'master' into blub/bc3
Wolfgang (Blub) Bumiller [Sun, 12 Aug 2012 09:36:41 +0000 (11:36 +0200)]
Merge branch 'master' into blub/bc3

12 years agoast_binary now keeps track of types
Wolfgang (Blub) Bumiller [Sun, 12 Aug 2012 09:36:28 +0000 (11:36 +0200)]
ast_binary now keeps track of types

12 years agoast_istype should add the TYPE_ prefix
Wolfgang (Blub) Bumiller [Sun, 12 Aug 2012 09:36:15 +0000 (11:36 +0200)]
ast_istype should add the TYPE_ prefix

12 years agofixing the messup of MUL_FV and _VF being swapped - getting rid of additions that...
Wolfgang (Blub) Bumiller [Sun, 12 Aug 2012 09:34:41 +0000 (11:34 +0200)]
fixing the messup of MUL_FV and _VF being swapped - getting rid of additions that really have no place here (YET) (matrix/quaternion types)

12 years agomerging master
Wolfgang (Blub) Bumiller [Sun, 12 Aug 2012 09:28:52 +0000 (11:28 +0200)]
merging master

12 years agodefault case for ir_value_dump's type switch
Wolfgang (Blub) Bumiller [Sun, 12 Aug 2012 09:28:18 +0000 (11:28 +0200)]
default case for ir_value_dump's type switch

12 years agoir_instr_dump to print CALL+paramcountfor calls rather than CALL0 always
Wolfgang (Blub) Bumiller [Sun, 12 Aug 2012 08:19:33 +0000 (10:19 +0200)]
ir_instr_dump to print CALL+paramcountfor calls rather than CALL0 always

12 years agoTYPE_FUNCTION in ir_value_dump to show '(function)' rather than '(void)'
Wolfgang (Blub) Bumiller [Sun, 12 Aug 2012 08:15:27 +0000 (10:15 +0200)]
TYPE_FUNCTION in ir_value_dump to show '(function)' rather than '(void)'

12 years agoindentation of ir debug dump functions
Wolfgang (Blub) Bumiller [Sun, 12 Aug 2012 08:14:22 +0000 (10:14 +0200)]
indentation of ir debug dump functions

12 years agoMerging master to handle vector members, fields, and members of vector fields
Wolfgang (Blub) Bumiller [Sun, 12 Aug 2012 08:08:41 +0000 (10:08 +0200)]
Merging master to handle vector members, fields, and members of vector fields

12 years agoWorking vector-field test
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 20:14:55 +0000 (22:14 +0200)]
Working vector-field test

12 years agoIR generation of vector-fields put the 'main' vector offset at the wrong position...
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 20:14:45 +0000 (22:14 +0200)]
IR generation of vector-fields put the 'main' vector offset at the wrong position - fixed that

12 years agoast_member_new now fixed up for fields, ast_shallow_type added for creation of a...
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 20:14:16 +0000 (22:14 +0200)]
ast_member_new now fixed up for fields, ast_shallow_type added for creation of a type-only ast_expression

12 years agosame +1 offset in LOAD_V as STOREP fixed
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 20:11:08 +0000 (22:11 +0200)]
same +1 offset in LOAD_V as STOREP fixed

12 years agotesting writing to multiple fields, including a vector field
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 19:18:46 +0000 (21:18 +0200)]
testing writing to multiple fields, including a vector field

12 years agoprint builtin now prints all the passed strings, not just the first
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 19:18:15 +0000 (21:18 +0200)]
print builtin now prints all the passed strings, not just the first

12 years agofixing address check INSTR_STOREP_V in execloop - it kept us from writing to a vector...
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 19:17:49 +0000 (21:17 +0200)]
fixing address check INSTR_STOREP_V in execloop - it kept us from writing to a vector when it was the last declared entityfield

12 years agoir_block_create_store/p will now honor -fadjust-vector-fields by using STORE_V/STOREP...
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 17:38:02 +0000 (19:38 +0200)]
ir_block_create_store/p will now honor -fadjust-vector-fields by using STORE_V/STOREP_V instead of _FLD on vector-fields

12 years ago-fadjust-vector-fields
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 17:35:08 +0000 (19:35 +0200)]
-fadjust-vector-fields

12 years agoalso generate _y and _z data for fieldpointers
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 17:34:58 +0000 (19:34 +0200)]
also generate _y and _z data for fieldpointers

12 years agoto support .vector's _y and _z we need to add the global-data pointing to _y and...
Wolfgang (Blub) Bumiller [Sat, 11 Aug 2012 17:08:23 +0000 (19:08 +0200)]
to support .vector's _y and _z we need to add the global-data pointing to _y and _z...