Commit graph

2213 commits

Author SHA1 Message Date
Wolfgang Bumiller
75b78720fd lex_ctx_t -> lex_ctx, vector_t -> vector 2012-04-28 11:15:29 +02:00
Dale Weiler
72053e16d2 Interface change 2012-04-28 05:35:32 -04:00
Dale Weiler
33b1995fa5 struct lex_file -> lex_file 2012-04-28 05:25:19 -04:00
Dale Weiler
89ed723efa astir.h -> gmqcc.h 2012-04-28 05:08:03 -04:00
Dale Weiler
434bf4b5b2 Merge branch 'blub/ast-and-ir-merging' of github.com:graphitemaster/gmqcc into ast-and-ir 2012-04-28 05:03:31 -04:00
Dale Weiler
857ca631a4 windows makefile update 2012-04-28 05:01:19 -04:00
Wolfgang Bumiller
da827e6098 Removed the qc_type enum and replaced all qc_* by TYPE_* 2012-04-28 10:42:03 +02:00
Wolfgang Bumiller
e74ecabedd Add shouldn't clear on failure either, it would be rather ugly to handle 2012-04-28 10:32:10 +02:00
Wolfgang Bumiller
1bf4aa379a Header guards and macros get {} in oneline ifs and loops 2012-04-28 10:17:32 +02:00
Dale Weiler
858d9734a2 Merge branch 'assembler' into ast-and-ir 2012-04-28 04:12:24 -04:00
Dale Weiler
de01d34925 type parsing for constants, globals and locals. Sanatize constants to select internal functions to prevent possible runtime issues that could be a result of atoi working for what we consider invalid strings containing constants. 2012-04-28 03:53:23 -04:00
Dale Weiler
fd31c203dc Better codegen 2012-04-28 03:37:14 -04:00
Dale Weiler
07c6aea7dc assembler can parse internal functions. Wrote all internal functions (that are not extensions) to test.qs 2012-04-28 03:26:40 -04:00
Dale Weiler
403901d6ee More assembly work 2012-04-28 02:34:39 -04:00
Dale Weiler
20f203495d More assembler code 2012-04-27 16:45:34 -04:00
Dale Weiler
7aee8ac2ef Working on the assembler 2012-04-27 16:31:38 -04:00
Wolfgang Bumiller
8d87767afa 2 missing return values 2012-04-27 18:00:57 +02:00
Wolfgang (Blub) Bumiller
9867ce26b3 a vector_remove shouldn't clear the vector when failing to reallocate as a smaller chunk, just return false. The value is still removed from the vector, so no unstable state is generated by this, which makes a _remove safe to ignore where it makes sense. 2012-04-27 13:54:00 +02:00
Wolfgang (Blub) Bumiller
ce43a35307 ast_value_set_name to return bool 2012-04-27 13:32:52 +02:00
Wolfgang (Blub) Bumiller
e4d92130da Using GMQCC_WARN some more where it makes sense 2012-04-27 13:31:40 +02:00
Wolfgang (Blub) Bumiller
86564686f3 Turned nearly every void-returning function into a bool-returning function, and checking return values wherever necessary to be able to properly exit on failures 2012-04-27 13:28:39 +02:00
Wolfgang (Blub) Bumiller
8f290e7989 Use GMQCC_WARN on generated vector functions 2012-04-27 12:38:53 +02:00
Wolfgang (Blub) Bumiller
348243ddf6 GMQCC_WARN macro 2012-04-27 12:35:59 +02:00
Wolfgang (Blub) Bumiller
4b6659bfe1 Get rid of realloc 2012-04-27 11:41:12 +02:00
Dale Weiler
8e13e8ab11 whitespace 2012-04-27 05:33:22 -04:00
Dale Weiler
422c085fba Sanity check 2012-04-27 05:33:02 -04:00
Wolfgang (Blub) Bumiller
69173876f1 Merge branch 'master' into blub/ast-and-ir-merging 2012-04-27 11:05:57 +02:00
Dale Weiler
db879bd626 Now compiles with mingw; added makefile for windows. 2012-04-26 23:24:32 -04:00
Dale Weiler
dd66080aaf removed clutter 2012-04-26 23:20:35 -04:00
Dale Weiler
63b6abb463 GMQCC_VERSION 2012-04-26 11:37:47 -04:00
Wolfgang (Blub) Bumiller
fdc98383d1 Adding a 'keep' bool to nodes: Generally, destroying an AST node should destroy all its child-nodes, global variables get 'keep' to be true to avoid them being deleted together with expressions they're used in. 2012-04-26 11:45:22 +02:00
Wolfgang (Blub) Bumiller
1a917a2659 Introduce an ast_store rather than splitting ast_binary 2012-04-26 11:36:46 +02:00
Wolfgang (Blub) Bumiller
06bdc46864 Use .o rather than .c in the Makefile... sorry for that mistake 2012-04-26 11:36:28 +02:00
Wolfgang (Blub) Bumiller
41a39125be ast_binary_new to initialize codegen function ptr, codegen proto for store and binary ast nodes 2012-04-26 10:38:00 +02:00
Wolfgang (Blub) Bumiller
c692794eb5 block and value codegen protos 2012-04-26 10:28:50 +02:00
Wolfgang (Blub) Bumiller
13ec68bc4f qbool -> bool 2012-04-26 10:16:15 +02:00
Wolfgang (Blub) Bumiller
234567cb9f Merge branch 'master' into blub/ast-and-ir-merging
-> Todo: take over bool from qbool
2012-04-26 10:13:07 +02:00
Dale Weiler
4c55dba10d Implemented platform[safe, neutral], compiler[safe, neutral] and C version[safe, neutral] <stdbool.h>. M$ Visual Studio doesn't provide support for C99 2012-04-25 17:03:56 -04:00
Dale Weiler
1fd2666fba code_strings_add replaced with proper multiplie element insertion vector support just added 2012-04-25 16:49:04 -04:00
Dale Weiler
fe5c322e38 Implemented support for multiple element (with assisted length) insertion on VECTOR_ expansions 2012-04-25 16:43:25 -04:00
Dale Weiler
e6ac367179 Make VECTOR_ more flexible for inside structures, and such. 2012-04-25 15:49:20 -04:00
Dale Weiler
168fd244bd TYPE_ macros 2012-04-25 11:45:01 -04:00
Dale Weiler
b102e77dca s/#define / / & s/[0-9]// & inplace enum { - end } 2012-04-25 11:42:20 -04:00
Wolfgang (Blub) Bumiller
8d121af47c Copyright notices 2012-04-25 17:27:49 +02:00
Wolfgang (Blub) Bumiller
6ba195bcfe todo note 2012-04-25 17:27:49 +02:00
Wolfgang (Blub) Bumiller
418430e05d Get stuff ready to compile - #if 0 on instructions not yet added to the instruction list (eg integer ones) 2012-04-25 17:27:48 +02:00
Wolfgang (Blub) Bumiller
ef024e5b80 use CC ?= because clang crashes on me 2012-04-25 17:27:48 +02:00
Wolfgang (Blub) Bumiller
522738de48 Adding liferange-calculation used later for templ-allocateion 2012-04-25 17:27:48 +02:00
Wolfgang (Blub) Bumiller
095d403acc more weak typing 2012-04-25 17:27:48 +02:00
Wolfgang (Blub) Bumiller
08f6e65b1c _naive_ phi solver 2012-04-25 17:27:48 +02:00