]> git.rm.cloudns.org Git - xonotic/gmqcc.git/log
xonotic/gmqcc.git
12 years agoLocal variable parsing
Wolfgang Bumiller [Fri, 20 Jul 2012 10:46:59 +0000 (12:46 +0200)]
Local variable parsing

12 years agoKeep track of blocklocal in parser_parse_block
Wolfgang Bumiller [Thu, 19 Jul 2012 18:30:36 +0000 (20:30 +0200)]
Keep track of blocklocal in parser_parse_block

12 years agoFactoring out variable parsing so it can be used for locals too
Wolfgang Bumiller [Thu, 19 Jul 2012 18:15:30 +0000 (20:15 +0200)]
Factoring out variable parsing so it can be used for locals too

12 years agoProto for parsing a function body
Wolfgang Bumiller [Thu, 19 Jul 2012 17:57:24 +0000 (19:57 +0200)]
Proto for parsing a function body

12 years agonull-init parser_t, add a function member to it
Wolfgang Bumiller [Thu, 19 Jul 2012 17:55:25 +0000 (19:55 +0200)]
null-init parser_t, add a function member to it

12 years agoProperly parse functions without parameters
Wolfgang Bumiller [Thu, 19 Jul 2012 17:53:58 +0000 (19:53 +0200)]
Properly parse functions without parameters

12 years agoParse away the semicolon after an assignment
Wolfgang Bumiller [Thu, 19 Jul 2012 17:52:44 +0000 (19:52 +0200)]
Parse away the semicolon after an assignment

12 years agomerging master, and adapting
Wolfgang Bumiller [Thu, 19 Jul 2012 16:14:25 +0000 (18:14 +0200)]
merging master, and adapting

12 years agoremoving params vector from ast_function, params are stored in its ast_value only
Wolfgang Bumiller [Thu, 19 Jul 2012 16:14:08 +0000 (18:14 +0200)]
removing params vector from ast_function, params are stored in its ast_value only

12 years agoadditional/superfluous check removed
Wolfgang Bumiller [Thu, 19 Jul 2012 16:10:12 +0000 (18:10 +0200)]
additional/superfluous check removed

12 years agoMerge branch 'master' into blub/bc3
Wolfgang Bumiller [Thu, 19 Jul 2012 16:06:56 +0000 (18:06 +0200)]
Merge branch 'master' into blub/bc3

12 years agoir_function_dump to print builtins as such
Wolfgang Bumiller [Thu, 19 Jul 2012 16:06:37 +0000 (18:06 +0200)]
ir_function_dump to print builtins as such

12 years agoProperly check if it's a function... checking the parameter count is not a correct...
Wolfgang Bumiller [Thu, 19 Jul 2012 16:04:57 +0000 (18:04 +0200)]
Properly check if it's a function... checking the parameter count is not a correct check

12 years agobuiltins are negative
Wolfgang Bumiller [Thu, 19 Jul 2012 15:54:35 +0000 (17:54 +0200)]
builtins are negative

12 years agohandling function definitions better, generating functions
Wolfgang Bumiller [Thu, 19 Jul 2012 15:53:45 +0000 (17:53 +0200)]
handling function definitions better, generating functions

12 years agoHandling definition of builtins
Wolfgang Bumiller [Thu, 19 Jul 2012 15:39:19 +0000 (17:39 +0200)]
Handling definition of builtins

12 years agohandle EOF
Wolfgang Bumiller [Thu, 19 Jul 2012 10:17:00 +0000 (12:17 +0200)]
handle EOF

12 years agoparsing typenames completely now with function parameters
Wolfgang Bumiller [Thu, 19 Jul 2012 09:41:16 +0000 (11:41 +0200)]
parsing typenames completely now with function parameters

12 years agoBuilding the output - global variables for now
Wolfgang Bumiller [Thu, 19 Jul 2012 09:25:53 +0000 (11:25 +0200)]
Building the output - global variables for now

12 years agoDon't die on regular EOF
Wolfgang Bumiller [Thu, 19 Jul 2012 09:22:09 +0000 (11:22 +0200)]
Don't die on regular EOF

12 years agoReading a global def
Wolfgang Bumiller [Mon, 16 Jul 2012 12:52:52 +0000 (14:52 +0200)]
Reading a global def

12 years agoStarting some parsing
Wolfgang Bumiller [Mon, 16 Jul 2012 12:14:37 +0000 (14:14 +0200)]
Starting some parsing

12 years agoCopying my old lexer
Wolfgang Bumiller [Mon, 16 Jul 2012 11:59:10 +0000 (13:59 +0200)]
Copying my old lexer

12 years agoTemporarily reordering instructions for compatibility
Wolfgang Bumiller [Mon, 16 Jul 2012 10:43:12 +0000 (12:43 +0200)]
Temporarily reordering instructions for compatibility

12 years agoClearing main
Wolfgang Bumiller [Mon, 16 Jul 2012 10:31:43 +0000 (12:31 +0200)]
Clearing main

12 years agoReverting the removal of _FV instructions, it's just easier this way
Wolfgang Bumiller [Mon, 16 Jul 2012 10:29:55 +0000 (12:29 +0200)]
Reverting the removal of _FV instructions, it's just easier this way

12 years agofixing matrix/quaternion constval setters
Wolfgang Bumiller [Mon, 16 Jul 2012 10:29:44 +0000 (12:29 +0200)]
fixing matrix/quaternion constval setters

12 years agoMerge branch 'master' into blub/bc3
Wolfgang Bumiller [Mon, 16 Jul 2012 10:28:06 +0000 (12:28 +0200)]
Merge branch 'master' into blub/bc3

12 years agoCorrect variable name for type_storep_instr
Wolfgang Bumiller [Mon, 16 Jul 2012 10:27:58 +0000 (12:27 +0200)]
Correct variable name for type_storep_instr

12 years agoUpdating makefile to remove all the not yet used stuff
Wolfgang Bumiller [Mon, 16 Jul 2012 10:27:21 +0000 (12:27 +0200)]
Updating makefile to remove all the not yet used stuff

12 years agoMerging master
Wolfgang Bumiller [Mon, 16 Jul 2012 09:40:30 +0000 (11:40 +0200)]
Merging master

12 years agotype_storep_instr: in theory we could use type_store_instr + INSTR_STOREP_F - INSTR_S...
Wolfgang Bumiller [Mon, 16 Jul 2012 08:24:35 +0000 (10:24 +0200)]
type_storep_instr: in theory we could use type_store_instr + INSTR_STOREP_F - INSTR_STORE_F, however, this won't work later when TYPE_INTEGER comes in since the _I instructions are at a seperate place

12 years agoReplacing 2 switches to use type_store_instr instead
Wolfgang Bumiller [Mon, 16 Jul 2012 08:19:04 +0000 (10:19 +0200)]
Replacing 2 switches to use type_store_instr instead

12 years agotype_sizeof is an array, not a function
Wolfgang Bumiller [Tue, 10 Jul 2012 17:29:38 +0000 (19:29 +0200)]
type_sizeof is an array, not a function

12 years agouse type_sizeof in some places where previously manual size checking has been done
Wolfgang Bumiller [Tue, 10 Jul 2012 17:29:01 +0000 (19:29 +0200)]
use type_sizeof in some places where previously manual size checking has been done

12 years agoFirst thing: we want quaternions and 4x4 matrices
Wolfgang Bumiller [Tue, 10 Jul 2012 17:26:07 +0000 (19:26 +0200)]
First thing: we want quaternions and 4x4 matrices

12 years agoDo not actually return after generating a call, there are other isntructions following
Wolfgang Bumiller [Wed, 4 Jul 2012 13:16:02 +0000 (15:16 +0200)]
Do not actually return after generating a call, there are other isntructions following

12 years agoTesting CALLs in test-ast
Wolfgang Bumiller [Wed, 4 Jul 2012 13:05:16 +0000 (15:05 +0200)]
Testing CALLs in test-ast

12 years agoStore the codeaddr of function's ir_values upon generation...
Wolfgang Bumiller [Wed, 4 Jul 2012 13:05:09 +0000 (15:05 +0200)]
Store the codeaddr of function's ir_values upon generation...

12 years agoReturn that the call was actually generated successfully if it was...
Wolfgang Bumiller [Wed, 4 Jul 2012 13:02:55 +0000 (15:02 +0200)]
Return that the call was actually generated successfully if it was...

12 years agoStoring ir_v for functions
Wolfgang Bumiller [Wed, 4 Jul 2012 13:00:30 +0000 (15:00 +0200)]
Storing ir_v for functions

12 years agoast_call needs to set its func member
Wolfgang Bumiller [Wed, 4 Jul 2012 12:41:39 +0000 (14:41 +0200)]
ast_call needs to set its func member

12 years agoast_call's param vector functions
Wolfgang Bumiller [Wed, 4 Jul 2012 12:39:58 +0000 (14:39 +0200)]
ast_call's param vector functions

12 years agoast-macros: MKCONSTSTRING, added sHello hello world string
Wolfgang Bumiller [Wed, 4 Jul 2012 12:20:54 +0000 (14:20 +0200)]
ast-macros: MKCONSTSTRING, added sHello hello world string

12 years agoEnabling the print builtin nodes, soon to be used to test CALL generation
Wolfgang Bumiller [Wed, 4 Jul 2012 11:31:10 +0000 (13:31 +0200)]
Enabling the print builtin nodes, soon to be used to test CALL generation

12 years agoadd AINSTR_END to the end of functions so the debug-printing knows when to end...
Wolfgang Bumiller [Wed, 4 Jul 2012 11:29:26 +0000 (13:29 +0200)]
add AINSTR_END to the end of functions so the debug-printing knows when to end...

12 years agoDon't die on functions with no variables
Wolfgang Bumiller [Wed, 4 Jul 2012 11:16:15 +0000 (13:16 +0200)]
Don't die on functions with no variables

12 years agocreating and generating builtin functions, ast-macros for builtins, todo: params
Wolfgang Bumiller [Tue, 3 Jul 2012 21:38:38 +0000 (23:38 +0200)]
creating and generating builtin functions, ast-macros for builtins, todo: params

12 years agobasic CALL translation: to be refined
Wolfgang Bumiller [Tue, 3 Jul 2012 20:47:01 +0000 (22:47 +0200)]
basic CALL translation: to be refined

12 years agotype_store_instr[] to get an INSTR_STORE_x by type
Wolfgang Bumiller [Tue, 3 Jul 2012 20:46:38 +0000 (22:46 +0200)]
type_store_instr[] to get an INSTR_STORE_x by type

12 years agofixed a typo in asm_instr[]: ES_FNC->EQ_FNC
Wolfgang (Blub) Bumiller [Fri, 29 Jun 2012 13:41:56 +0000 (15:41 +0200)]
fixed a typo in asm_instr[]: ES_FNC->EQ_FNC

12 years agocreate_call should use store_return as output type for now
Wolfgang (Blub) Bumiller [Fri, 29 Jun 2012 13:40:21 +0000 (15:40 +0200)]
create_call should use store_return as output type for now

12 years agoadding another storage type: store_return; when generating a CALL, the generator...
Wolfgang (Blub) Bumiller [Fri, 29 Jun 2012 12:37:12 +0000 (14:37 +0200)]
adding another storage type: store_return; when generating a CALL, the generator can check the output value's storetype, and if it is NOT store_return, it needs to STORE_x the return value into the output value.

12 years agogenerating an ir_value for an ir_function at creation now
Wolfgang (Blub) Bumiller [Fri, 29 Jun 2012 11:25:31 +0000 (13:25 +0200)]
generating an ir_value for an ir_function at creation now

12 years agofunction in the ast now MUST have an output type in their 'next' ast_expression point...
Wolfgang (Blub) Bumiller [Fri, 29 Jun 2012 11:07:19 +0000 (13:07 +0200)]
function in the ast now MUST have an output type in their 'next' ast_expression pointer, the IR's outtype of functions is now filled

12 years agoir_builder_create_call to take return type from the ir_value
Wolfgang (Blub) Bumiller [Fri, 29 Jun 2012 10:55:35 +0000 (12:55 +0200)]
ir_builder_create_call to take return type from the ir_value

12 years agoFix a possibly uninitialized variable
Wolfgang (Blub) Bumiller [Thu, 28 Jun 2012 15:27:02 +0000 (17:27 +0200)]
Fix a possibly uninitialized variable

12 years agoFixing GMQCC_SUPPRESS_EMPTY_BODY typo
Wolfgang (Blub) Bumiller [Thu, 28 Jun 2012 15:22:56 +0000 (17:22 +0200)]
Fixing GMQCC_SUPPRESS_EMPTY_BODY typo

12 years agoast_call_codegen, ir_block_create_call plus call-related functions, ir_value->outtype...
Wolfgang (Blub) Bumiller [Thu, 28 Jun 2012 15:21:26 +0000 (17:21 +0200)]
ast_call_codegen, ir_block_create_call plus call-related functions, ir_value->outtype TODO: fill outtype in ir_value

12 years agoAdded a comment about an idea on how to translate calls better. Gotta check some...
Wolfgang (Blub) Bumiller [Thu, 28 Jun 2012 14:20:31 +0000 (16:20 +0200)]
Added a comment about an idea on how to translate calls better. Gotta check some papers for better solutions later

12 years agoast_call node; codegen dummy
Wolfgang (Blub) Bumiller [Thu, 28 Jun 2012 14:15:51 +0000 (16:15 +0200)]
ast_call node; codegen dummy

12 years agoir_instr can now store a list of parameters, will be used for CALLs
Wolfgang (Blub) Bumiller [Thu, 28 Jun 2012 13:50:51 +0000 (15:50 +0200)]
ir_instr can now store a list of parameters, will be used for CALLs

12 years agoDeleting the manually written ast-test which was '#if 0'-ed out
Wolfgang (Blub) Bumiller [Mon, 25 Jun 2012 17:35:18 +0000 (19:35 +0200)]
Deleting the manually written ast-test which was '#if 0'-ed out

12 years agogeneration of COND and JUMP now works
Wolfgang (Blub) Bumiller [Mon, 25 Jun 2012 17:27:50 +0000 (19:27 +0200)]
generation of COND and JUMP now works

12 years agoir_function.allocated_locals now contains the number of locals a function requires...
Wolfgang (Blub) Bumiller [Mon, 25 Jun 2012 15:43:10 +0000 (17:43 +0200)]
ir_function.allocated_locals now contains the number of locals a function requires, renamed code.slot to code.local, makes more sense

12 years agoremoving debug output
Wolfgang (Blub) Bumiller [Mon, 25 Jun 2012 15:37:50 +0000 (17:37 +0200)]
removing debug output

12 years agovalue position allocation, fixing a possible endless loop in ir_values_overlap
Wolfgang (Blub) Bumiller [Mon, 25 Jun 2012 14:06:01 +0000 (16:06 +0200)]
value position allocation, fixing a possible endless loop in ir_values_overlap

12 years agoir_value_life_merge_into, to merge the liferange of one value into the range of anoth...
Wolfgang (Blub) Bumiller [Mon, 25 Jun 2012 12:51:31 +0000 (14:51 +0200)]
ir_value_life_merge_into, to merge the liferange of one value into the range of another, testing in test_ir

12 years agoir_function_allocate_locals prototype
Wolfgang (Blub) Bumiller [Mon, 25 Jun 2012 12:14:34 +0000 (14:14 +0200)]
ir_function_allocate_locals prototype

12 years agou1 here instead of s1
Wolfgang (Blub) Bumiller [Mon, 25 Jun 2012 11:30:14 +0000 (13:30 +0200)]
u1 here instead of s1

12 years agoDon't add the var_ prefix to function names in the ast-test macros...
Wolfgang (Blub) Bumiller [Mon, 25 Jun 2012 09:54:30 +0000 (11:54 +0200)]
Don't add the var_ prefix to function names in the ast-test macros...

12 years agogenerate the trailing zero
Wolfgang (Blub) Bumiller [Mon, 25 Jun 2012 09:52:34 +0000 (11:52 +0200)]
generate the trailing zero

12 years agoGenerate function global, take 2-op instruction operand ordering into account
Wolfgang (Blub) Bumiller [Mon, 25 Jun 2012 09:52:18 +0000 (11:52 +0200)]
Generate function global, take 2-op instruction operand ordering into account

12 years agoFixing NULL->false and empty lines...
Wolfgang (Blub) Bumiller [Mon, 11 Jun 2012 17:25:21 +0000 (19:25 +0200)]
Fixing NULL->false and empty lines...

12 years agoMerge branch 'irgen'
Dale Weiler [Thu, 7 Jun 2012 15:24:55 +0000 (11:24 -0400)]
Merge branch 'irgen'

12 years agoBetter fail
Dale Weiler [Thu, 7 Jun 2012 15:24:28 +0000 (11:24 -0400)]
Better fail

12 years agoFixed more warnings
Dale Weiler [Thu, 7 Jun 2012 15:18:04 +0000 (11:18 -0400)]
Fixed more warnings

12 years agofixed -Wconditional-uninitialized for ast codegen
Dale Weiler [Thu, 7 Jun 2012 15:12:12 +0000 (11:12 -0400)]
fixed -Wconditional-uninitialized for ast codegen

12 years agoRemoved even more warnings
Dale Weiler [Thu, 7 Jun 2012 15:09:29 +0000 (11:09 -0400)]
Removed even more warnings

12 years agoremoved more warnings
Dale Weiler [Thu, 7 Jun 2012 15:04:38 +0000 (11:04 -0400)]
removed more warnings

12 years agofixed shadow issue
Dale Weiler [Thu, 7 Jun 2012 14:59:57 +0000 (10:59 -0400)]
fixed shadow issue

12 years agoMore compile warnings (disabled many for now, they will be re-enabled one-by-one...
Dale Weiler [Thu, 7 Jun 2012 14:57:48 +0000 (10:57 -0400)]
More compile warnings (disabled many for now, they will be re-enabled one-by-one as code that triggers warnings is rectified)

12 years agos/\t/ /g
Dale Weiler [Thu, 7 Jun 2012 14:20:54 +0000 (10:20 -0400)]
s/\t/    /g

12 years agosplint: use typedef instead of macro
Dale Weiler [Thu, 7 Jun 2012 14:19:00 +0000 (10:19 -0400)]
splint: use typedef instead of macro

12 years agoPrint the name, not the struct pointer :S
Wolfgang Bumiller [Sun, 13 May 2012 12:06:50 +0000 (14:06 +0200)]
Print the name, not the struct pointer :S

12 years agoWhitespace
Dale Weiler [Fri, 11 May 2012 16:02:22 +0000 (12:02 -0400)]
Whitespace

12 years agofixing fwrite calls I had messed up
Wolfgang (Blub) Bumiller [Wed, 9 May 2012 16:24:13 +0000 (18:24 +0200)]
fixing fwrite calls I had messed up

12 years agoAdding a few error message.
Wolfgang (Blub) Bumiller [Wed, 9 May 2012 15:39:17 +0000 (17:39 +0200)]
Adding a few error message.

12 years agoTYPE_VARIANT in codegen, writing code from ast-test
Wolfgang (Blub) Bumiller [Wed, 9 May 2012 15:30:08 +0000 (17:30 +0200)]
TYPE_VARIANT in codegen, writing code from ast-test

12 years agogenerating block code in a simple naive order for now - the ast / parser should help...
Wolfgang (Blub) Bumiller [Wed, 9 May 2012 13:02:58 +0000 (15:02 +0200)]
generating block code in a simple naive order for now - the ast / parser should help improving order

12 years agoChecking if mem_a returns NULL in ir_..._new functions
Wolfgang (Blub) Bumiller [Wed, 9 May 2012 12:24:35 +0000 (14:24 +0200)]
Checking if mem_a returns NULL in ir_..._new functions

12 years agoIt's the same TYPE enum...
Wolfgang (Blub) Bumiller [Wed, 9 May 2012 12:18:01 +0000 (14:18 +0200)]
It's the same TYPE enum...

12 years agoMore work on generating code - still not instantiating function-statements, 2 kinds...
Wolfgang Bumiller [Sat, 5 May 2012 08:56:00 +0000 (10:56 +0200)]
More work on generating code - still not instantiating function-statements, 2 kinds of FIXME comments: relocation and creation of ir_values for ir_functions

12 years agoStarting ir_builder_generate - TYPE_FUNCTION still TODO
Wolfgang Bumiller [Fri, 4 May 2012 22:28:51 +0000 (00:28 +0200)]
Starting ir_builder_generate - TYPE_FUNCTION still TODO

12 years agocode_cachedstring
Wolfgang Bumiller [Fri, 4 May 2012 22:28:30 +0000 (00:28 +0200)]
code_cachedstring

12 years agoConvenience function to store a predefined string in the qc string area
Wolfgang Bumiller [Fri, 4 May 2012 22:14:10 +0000 (00:14 +0200)]
Convenience function to store a predefined string in the qc string area

12 years agoPreparing to generate code from the IR - code_write should return a bool, and take...
Wolfgang Bumiller [Fri, 4 May 2012 22:03:18 +0000 (00:03 +0200)]
Preparing to generate code from the IR - code_write should return a bool, and take a filename rather than use program.dat hardcoded

12 years agoreadme s/\t/ /g
Dale Weiler [Sun, 6 May 2012 21:00:16 +0000 (17:00 -0400)]
readme s/\t/   /g

12 years agoUpdated readme
Dale Weiler [Sun, 6 May 2012 20:58:30 +0000 (16:58 -0400)]
Updated readme

12 years agoMerge branch 'master' of github.com:graphitemaster/gmqcc
Dale Weiler [Sat, 5 May 2012 02:01:26 +0000 (22:01 -0400)]
Merge branch 'master' of github.com:graphitemaster/gmqcc