forked from bl0ckeduser/new-bpf-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChangeLog
189 lines (152 loc) · 7.32 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
0.74 - 28 Jan 2018
- fix various bugs (mostly relating to amd64 support)
-----------------------------------------------------------------------
0.73 - 24 Jan 2018
- amd64 support, which can self-host
-----------------------------------------------------------------------
0.72 - 1 Jan 2016
- some fixes to the comments
- new example code: anagrams.c
- preprocessor: fix infinite loop in some sneaky cases
- postmortem: programming is like a drug
- new example code: euler33.c
-----------------------------------------------------------------------
0.71 - 30 Nov 2014
- wcc command and self-compilation work on MinGW (aka gnu on windows)
- fixed calculation of pointer differences:
pointerA - pointerB --> (pointerA - pointerB) / sizeof(*pointerA)
- x86: new test code: towers of hanoi, n-queens
- very slightly improved support for parameterized #define directives
- x86: fix temporary-stack-memory leak in relational operator coding
- x86: better support for nasty global initializer
(thanks alexfru for technical advice, also i'm a noob)
- parser: silently consume constants inside the [] in an array
argument type, e.g. (actual example for awful code i wrote when
i was in highschool and even more noobish)
void SetDictionaryContents(char contents[1024*1024*2])
{
...
is treated as
void SetDictionaryContents(char contents[])
{
...
- properly code statements such as e.g. 'char bob[] = "hax"' --
they should be coded as e.g. 'char bob[] = {'h','a','x','\0'}',
using modifiable stack memory. it should not make a pointer
to a static string constant, which is what it was doing.
-----------------------------------------------------------------------
0.7 - 23 August 2014
mostly boring little bug fixes at this point. i am not going to do anything
big (nor maybe anything at all) on this project any time soon.
i have reached my initial goal of writing a c compiler that could
compile itself and handle a few features like structs and pointers.
it don't think it would be trivial to turn this into an optimizing
compiler. before making this tag i tested that it self-compiles and
passes the tests on:
Linux 3.13.0-24-generic x86_64 / gcc 4.8.2
FreeBSD 9.0-RELEASE i386 / gcc 4.2.1
changes:
- fix precedence and correct parsing of `sizeof' operator
- add findkth.c test case for the above (a nice little algorithm, to boot)
- x86: code dereferences in a more efficient way
- add rot13.c test case for the above (prior to this, it failed to build)
- preprocessor now honours -w flag
- fixed a dumb bug in constfold, inherited from a dumb bug in symdiff
-----------------------------------------------------------------------
0.6 - 19 May 2014
- i should really stop wasting my time on this
- preprocessor: implement #undef
- preprocessor: incremental #define substitutions
(this is a pretty subtle case of making the preprocessor behave
more closely to the way it should. see the long comment in
test/x86/undef.c for details. in a nuthsell, you can
#define something, then succesfully use that #define, and
then #undef it.)
- preprocessor: basic support for parameterized #define's
(see test/x86/pdef.c)
- preprocessor: implement ## concatenation operator
for use in parameterized #defines
- preprocessor: stringification # operator for use in parameterized defines
(see https://gcc.gnu.org/onlinedocs/cpp/Stringification.html#Stringification)
- x86: fix register leakage in array initializer coding
- indentation cleanups
- implement type analysis for sizeof(variable) expressions
(needed if you want to do e.g. sizeof(some_array) / sizeof(int))
- update documentation
-----------------------------------------------------------------------
0.5 - April 30, 2014
- various cleanups (removed old false comments; fix indent; fix warnings)
- constant folding in array bounds expressions and global initializers
- added support for do-while loops
- wcc: -w flag
-----------------------------------------------------------------------
0.4 - April 13, 2014
- achieved self-compilation, self-self-compilation, etc. :)
- multifile support
- basic preprocessor: local recursive #include, #ifdef, #ifndef, #else, #endif,
simple #define without macros
- parse and x86-compile "extern" declarations
- added some useful notes to the docs
- make a list of improvement ideas people sent from reddit
(there was a big thread on reddit.com/r/programming around April 4)
- improve coding style following suggestions
- wcc: --version, --help flags
- several tweaks so that the compiler could compile itself
- cleaned up lots of old hackish code that was broken
- add a compatibility hack so that NULL and FILE* are defined
to 0 and void *, respectively
- wcc: added -Ddefine[=val]... flag (preprocessor define injection)
- new line tracking (i.e. for diagnostics) mechanism, shows file name
- x86: improved support for structs-within-structs
- x86: fixed array to pointer conversion in assignments
- parser: fix parsing of goto statements
- x86: fixed a register fuckup
- x86: fixed sizeof() for structs
- x86: implement a->b = c for large structs
-----------------------------------------------------------------------
0.3 - March 23, 2014
- real-life: i feel like i might be quite busy with "real life" soon
- x86: implement struct assignment
- x86: implement struct-type function return values
- x86: implement struct-typed function arguments
- x86: implement struct-pointer-typed function arguments
- x86: implement expressions like foo()->u, foo().u
- x86: fix array tags in structs
- parser: fix parsing of expressions similar to "b->child[0]->tok->start"
- parser: fix a conflict with the ternary (?:) and sequencing (,) operators
- x86: various fixes to structs
- tokenizer: slightly better line-counting (it was quite broken)
- x86: implement expressions like &(a = b)
- x86: fixed a register leak in switch() statement coding
- x86: fixed a bug in if() statement coding
- test: added symdiff sample code
- fixed the indentation of some comments (the damages done by my
the use of a misconfigured editor over the past year are slowly
being repared...)
- tour: slightly tweaked the tour.pdf document
-----------------------------------------------------------------------
0.2 - March 3, 2014
- implemented a wcc command that acts like the "cc" command
- lexer: consume \r characters
- parser: support "char *foo[]" syntax in function arguments
- parser: support "char foo[] = "XXX"" syntax in declarations
- parser: improved handling of typedefs
- parser: implement unary +
- added more/better comments to the whole codebase
- x86: add support for function prototypes
- tour: added a tour.pdf document that talks about the code internals
- x86: implemented compilation of &(a->b) syntax
- test: added AVL tree test code
- test: added square roots test code
- x86: added support for switch statements
- x86: improved struct-within-struct support
- parser: add support for enums
- parser: implement adjacent string concatenation
- tokenizer: improve speed using a hash table
- parser: track typedef tags using a hash table
- x86: allow symbol tables and other buffers to expand if necessary
-----------------------------------------------------------------------
0.1 - December 18, 2013
0.1 is the first tagged "release". I made it because I fixed most of
the serious bugs I know of at this point, tested it on BSD/Linux/Windows,
and because it's been exactly one year since the first commit.