-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCHANGELOG.txt
359 lines (313 loc) · 15.6 KB
/
CHANGELOG.txt
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
master
---------------------------------------------------------------------------------------
[Compiler]
- Change build system.
In order to get rid of CMake as dependency, a new custom build system was implemened
using 'nob' as the base "library". In fact, it's just a bunch of helper functions
implemented in C, thus whole new build system is implemented in the same language as
the compiler itself. This way we don't need special DSL to handle compilation process.
Use ./build.bat or ./build.sh now.
- Redesign module system.
This version introduces a new module system completely changing the way the import and
symbol visibility works.
The original solution used one big shared global scope for all symbols in the program, thus
no matter where the import was used, all its symbols were public and accessible even
from other (completely unrelated) modules.
With the new system, imported module symbols might be private or even explicitly
namespaced based on the usage. In general, each module (even target assembly) has its
own namespace (module namespace) divided into public and private part. The private part
might be introduced by `#scope_module` directive. All symbols and other modules imported
in the `#scope_module` block are visible only inside the parent module.
By calling the #import directive, all "public" symbols of imported module are implicitly
inserted into the parent scope of the `#import` directive.
As result, one should have to import explicitly all used modules, so for example even
a simple "hello world" application now have to import print module in order to get access
to the print function. However, this way we can be 100% sure about what dependencies each
module require and achieve better module isolation.
- Load directive now loads source units multiple times in case the #load directive appears
in different scope context.
- Remove ModuleImportPolicy.
The import policy (originally used to allow automatic bundling of used modules into the
project local module directory) was removed. In general it was unnecessary complexity in
the build system I've never used. Note that the same behaviour can be still achieved by
manual copying of required modules into the custom module directory.
- Remove named scopes (introduced by #scope directive).
Named scopes were completely removed from the language with introduction of a new
module system. This reduced amount of 'using' required for 'std' for example. Imported
modules can be namespaced on "import" side like this:
foo :: #import "std/string";
- Modules injected into the module scope are accessible recursively on use-side.
Modules imported into "public" module scope are accessible from outside when the module
gets imported. This allows creation of module merging bunch of other modules for example.
- Add windows flag --legacy-colors to enable old style of output coloring on Windows.
Compiler by default outputs ANSI color codes for error messages in terminal even on
Windows. To get back old style of coloring use --legacy-colors compiler flag. This option
is available only on Windows.
- Add explicit module namespacing.
- Compiler will report all possible ambiguous symbol in case there is more of them.
- Fix module import and load to not use current working directory implicitly.
- Fix reports of ambiguous symbols coming from module imports in case we have symbols
with the same name in current module.
- Module congifuration use comma separators on all platforms.
- Add new examples into 'how-to' showing how to do static and dynamic linking of external
libraries.
- Nob on linux tries to fallback to `llvm-config` in case `llvm-config-X` wasnt found.
- Add LLVM version check on linux.
- Add more search paths for compiler dependencies on linux.
- Add support for character escape code parsing in strings and character literals.
Newly '\0OOO' (octal notation) and '\xHH' (hex notation) can be used to specify ASCII code.
Thus we can now handle things like:
print("\033[34mBlue Text\033[0m\n");
- Compile-time test run when '--run-tests' is used now outputs ANSI colored reports, this
might by disabled by passing '--no-color' argument to the compiler.
- Fix 'blc -init' to produce compilable 'src/main.bl'.
- Generated documentation for structs now contains name of base struct.
- Compiler macOS setup now include search path for system frameworks and library path provided
by brew by default.
Generate new configuration by 'blc --configure'.
- Add --no-finished-report compiler flag to disable printing of final compilation time report.
- Doctor now outputs warnings in examples.
- #base directive now can take any arbitrary expression evaluating to 'type'. So we can do:
get_type :: fn (T: type #comptime) type #comptime {
return T;
}
Foo :: struct #base get_type(s32) {
}
[Modules]
- Add math module.
std/sync:
- Mutex now can be explicitly initialized as recursive or non-recursive.
std/string
- Add tstrtoc function which automatically checks if passed string can be directly converted
to C string (checks zero terminator). In case the string is not zero-terminated,
implicit zero-terminated copy is created using temporary allocator.
std/fs
- Fix invalid file descriptor reported by `copy` function on linux and mac.
std/test
- test_run now output ANSI colored reports in case 'ansi_color' argument passed to the
function is 'true'.
build.bl
- Add link_static_library. This function just formats name of static library based on current
platform and use append_linker_options to adjust linker arguments.
- Add link_framework. For linking of macOS frameworks.
- Add add_framework_path. For adding search path for macOS framewors.
[Documentation]
- Improved "Libraries" section in documentation.
- Improved documentation of library linking.
- Add more examples into web documentation. Web listed examples now points directly to the
github.
- Fix syntax highlight issues caused by multiline comments in generated documentation.
- Fix warnings in examples.
0.12.0
---------------------------------------------------------------------------------------
Add symlink resolve for the current executable on macos.
Add new #scope_private and #scope_public to freely enter and exit private scope block.
Make #private directive deprecated.
Fix interp function callbacks without arguments.
Paralelize MIR generation.
Performance improvements.
0.11.2
---------------------------------------------------------------------------------------
Add demo program.
Fix conversion of builtin array.len to Any on function call.
Fix defer statements used with inline ifs.
Fix local scope struct type composition.
0.11.1
---------------------------------------------------------------------------------------
Add compiler option to set output name.
Changed reports of unreachable code.
Dirty mode compiler flag renamed to "do-cleanup".
Fix hash table bugs.
Fix if branching.
Provide LLD linker only on Windows.
Update to LLVM 18.
0.11.0 - PRE-RELEASE
---------------------------------------------------------------------------------------
Add 'then' keyword and inline if statements.
Add --dirty-mode compiler flag.
Add SIMD implementation for some hot code paths (Windows only).
Add automatic static array element count using [_]s32 syntax for compound initializers.
Add builder configuration api for build pipelines.
Add dlib VM runtime support.
Add fmod and trunc math functions.
Add new documentation web generator.
Add support for x86_64-unknown-linux-gnu target architecture triple.
Add ternary if expression.
Add untyped compound expressions.
Fix group initialization of multiple variables at once in global scope.
Fix invalid position of vargs generated before call causing stack problem in VM execution.
Fix member access directly on call result.
Fix reports of unused symbols declared after usage in local scopes.
Fix rpmalloc missing terminations for threads causing deadlocks sometimes.
Fix unary not operator precedence.
Fix unroll on global variables.
Improved documentation generator (added more value expressions).
RPMalloc used for the compiler.
Reduced amount of types generated internally by the compiler (use cache).
Reworked thread pool.
Rewrite string handling inside the compiler.
0.10.0 - PRE-RELEASE
---------------------------------------------------------------------------------------
Add lazy IR generation to reduce LLVM generated stuff.
Add thread local global storage support.
Add compilation time report.
Add polymorphic function.
Add temporary allocator.
Add missing operators and change deref operator to @.
Add evaluation of compile time known conditional breaks.
Add static assert.
Add static if.
Add experimental #comptime directive for the functions evaluated in compile time.
Add typeof builtin.
Add enumcount helper function.
Add hash table.
Add buffer allocator.
Add using statement for scopes and enums.
Add implicit conversion from string to slice []u8.
Add naming of compound members for structs.
Add release-with-debug-info target.
Add realloc_slice.
Add type alignment into the type info.
Add #obsolete directive.
Add silent-run compiler argument.
Add call-stack getter for Windows and improve assert and panic reports.
Add function name into code location.
Add glwindow and draw modules + some example projects.
Add #maybe_unused for function arguments.
Add mixed function signature.
Add Static Array and Bucket Array
Add target triple API to the build system pipeline settings.
Add semaphores into synchronization API.
Add API to get ID of current thread.
Add #enable_if function directive.
Fix crash on unnamed function argument RTTI generation.
Fix crash when invalid type of default argument value is provided by user.
Fix invalid conversion of enum variants to Any.
Fix DI locations using Code View.
Fix generation of unused LLVM IR code paths.
Fix missing usage check for symbols in named scope.
Fix DWARF generation for local anonymous functions.
Fix DI Generation of global variables using CodeView.
Fix evaluation of multi-return and struct comptime functions.
Fix conversion of constants into slice.
Fix 0 size reported from sizeof for incomplete types.
Fix implicit conversion of alignof to Any.
Fix array type decomposition.
Fix bug related to unresolved types waiting for self.
Fix invalid binary operation volatile type borrowing for explicitly not matching types.
Fix argparse issues in doctor.
Fix emitting of string literals produced by compile time functions.
Fix invalid resolving of named-scope nested symbols via explicit operator.
Fix resume of postponed stack based call interpretations in compile-time.
Fix missing completeness check for value types converted to generic vargs (vargs of Any).
Documentation format changed to markdown.
Test cases are no longer reported as unused during compilation.
Update dyncall to version 1.2 (due to experimental support of M1 Macs).
Redesign allocator structure.
Change array API.
Change enum naming conventions to uppercase.
Redesign libc importing into modules.
Redesign of bl-config + using YAML as main config format.
Move file read/write into io module.
Tags are now simple unsigned numbers.
Change constant string representation from 'string' to 'string_view' aka []u8.
Change syntax of compound initializers.
Redesign memory allocators.
Simplify error handling API.
Redesign hash table implementation.
Simplified memory allocation API.
Rename slice_init and slice_terminate to alloc_slice and free_slice.
Improve compile time execution restore after postpone.
Function arguments are now immutable.
Improved error handling in synchronization API.
Improved error messages reporting unknown symbols.
Allow bunch of binary operations for enum flags types.
Update to LLVM 16.
0.9.0 - PRE-RELEASE
---------------------------------------------------------------------------------------
Use LLD as default linker on Windows and Linux (experimental on macOS).
Update command line arguments to match unix common naming standards.
Improve build system api and remove some obsolete functions.
Change build pipeline to call compile/compile_all explicitly.
Fix switch related parser bugs.
Fix unit mixing when using multithreaded build pipeline.
Add support of shared library output.
Add cmake build target Utils.
Add hash into CodeLocation.
Add namespace support.
Add unnamed symbols. (underscore used as name is not inserted into scope)
Add support of inline function group members.
Use faster custom system library and SDK lookup on Windows.
Compiler now reports unused private or local symbols.
Cleanup modules.
0.8.0 - BETA
---------------------------------------------------------------------------------------
Migration to LLVM 11.
Add multiple return values and group declarations.
Add automatic documentation generator (-docs flag).
Add debug allocator.
Add new FileSystem module.
Add #import directive for modules
Add BL Doctor for better unit testing.
Add first prototype of modules and #import hash directive.
Add support of shebang and silent execution.
Add -silent and -rs options.
Add -verify-llvm option to enable LLVM IR verification.
Add modules: thread, sync, fs
Add forward of command line arguments into bl executed by interpreter (-r, -rs).
Add multithread compilation.
Support custom allocators in containers.
Compiler now returns numerical maximum error code if compilation fail.
Less descriptive terminal output during compilation.
Fix segfault on error get line.
Fix invalid character when comment block is very last in source file.
Fix garbage in unknown symbol reports.
Fix attempt to generate type info for incomplete types referenced by aliases.
Fix invalid multi-line string literals parsing.
Fix usage of function call to initialize loop iterator.
Fix invalid generation of more complex PHI expressions.
0.7.1 - BETA
---------------------------------------------------------------------------------------
Fix nested self-references to incomplete types.
Fix crash on incomplete struct RTTI generation.
Fix crash error report at the end of file.
Fix invalid report for duplicate arguments.
Fix invalid duplicate switch value checking.
Fix invalid IS_DEBUG builtin value in debug mode.
0.7.0 - BETA
---------------------------------------------------------------------------------------
DI generation reimplemented.
Memory allocations provided via allocator API.
Unit testing reimplemented to support native code testing.
Speed up compilation with use of llvm.memset intrinsic for default values.
Add default variable initialization.
Add noinit hash directive for variables.
Add builtin dynamic array.
Add slice_init and slice_terminate builtins.
Add -no-vcvars to disable VS environment injection.
Add implicit cast from dynamic array to slice.
Add support of Tracy profiler.
Add function call default argument values.
Add #call_location hash directive.
Add default argument type inferring.
Add explicit function overload.
Fix invalid type ID generation for incomplete structure types.
Fix naming of array types in type info.
Fix number serialization in print.
Fix invalid insertion of empty vargs.
Fix invalid casting of volatile-typed expressions.
0.6.0 - BETA
---------------------------------------------------------------------------------------
Add implicit cast from array to slice. (Fixed compile time vs constant IR code emit).
Fix invalid conversion of the sizeof result to Any.
Fix local functions in nested scope.
Fix nested function implicitly capturing members of upper scope.
Fix segfault on global initializer nesting.
Fix LLVM cast assertions on string array to slice conversion.
Fix invalid sizeof operator result on array elem values and struct members.
Fix lambda functions inside nested scope.
Add implicit conversion from pointers to bool.
Add union data type.
Add support of Windows terminal color output.
Add testing formatters for printing float values.
Add support of MSVC CoveView and PDB debug database generation via LLVM API.