4 - Changed the generated code for the gcc cleanup attribute so that if a
5 constructor throws, the destructor is not invoked. As in the simple case
6 where we don't have the cleanup attribute and like C++.
11 - [REGRESSIONS] most tests in Samples/ no longer compiled!
12 The one problem was that the function stat() was considered a 'declaration
13 expression' constructing a temporary object 'struct stat'. Typical
15 The other regression is that with the new schema with exceptions, setjmp.h
16 is automatically included and that means that all headers'd better be in
22 - [CHANGE] The 'switch value' feature has been changed to 'switch
23 (declaration)' feature. For example:
24 switch (int x = foo (bar())) {
27 - [IMPROVE] no dtors are emitted if a compound statement ends in 'return',
28 'break', 'continue' or 'goto'.
30 - Removed the comment flaming Drepper for the glibc mess.
35 - [FEATURE] 'typeid' a special virtual variable which is automatically
36 initialized with the name of the class.
38 - [FEATURE] gcc's 'cleanup' attribute. Very useful. If lwc is compiled
39 with gcc 3.4 this is enabled by default. It has two major implications.
41 1) Code for the destruction of local objects is automatically
42 generated by the compiler. lwc produces less code. it also
45 2) cost-free exception cleanups. If the generated C code is
46 compiled with -fexceptions, destructors of all local objects
47 are invoked when exceptions are raised. like c++
49 - [CHANGE] switched from 'setcontext' to 'setjmp' for exceptions.
50 'throw 0;' does no longer re-do the try statement.
52 - [FEATURE] pure typedefs and consequently pure data members.
53 Generic programming can now be done with auto-functions instead.
55 - [BUGFIX] auto-functions using class-typedefs in their arguments
56 have been improved. Everything works better now.
58 - [BUGFIX] programs using __unwind__ while a context was not prepared
59 by a 'try' would segfault.
61 - [BETTER] when local class typedef used and the type is a simple type,
62 we emit the simple type name in the output, like 'int', etc,
63 rather than the confusing TyPeDeF_ name.
65 - [GOOD] lwc understands __builtin_expect.
67 - [FEATURE] declaration expressions of temporary objects.
72 - [**ATTN**] forcing overloaded operator calls. The syntax has been
73 changed. If you used parentheses to force an operator overload, you should
74 fix the code. Now -> is used before the operator to to it. For example:
79 - [FEATURE] modular data members. Same as C++'s static data members.
81 - [BUGFIXES] usual set. Tons of tiny corner-case bugs fixed.
83 - [FEATURE] auto-functions are redefined on the use of local typedefs.
84 That can lead to some extent of generic programming. see doc 8.1
86 - [BUGFIX] don't call constructor for global objects declared 'extern'
88 - [BUGFIX] 'linkonce' specifier on global functions would cause an
89 embarassing segmentation violation.
91 - [FEATURE] non-virtual functions can be pure. This is only useful for
92 auto functions because we don't emit code for an auto function that
93 calls a pure function. (compile-time polymorphism)
95 - [GOOD] no code is emitted for auto-functions that call pure functions.
96 Those functions are, too, considered pure and the procedure goes on
97 recursively to eliminate all the auto-function code that may
100 - [FEATURE] calling member functions from specific parent classes can
101 be done with the syntax 'class.func()'. This is a shortcut for the
102 casts that were previously used '((class*)this)->func()'.
104 - [BUGFIX] modular functions called directly (not through vptr), had
105 a problem with their first argument for which no conversions were done.
107 - [NEW] Long break/Long continue. Break out of more than one nested
108 loops with proper destruction of locals.
110 - [GOOD] not only object names but also typedef'd object names can be
111 used in 'new', inheritance and other places. This is very useful for
112 'typedef specialize'. Sample:
115 modular X f () { return _CLASS_.vv; }
119 typedef specialize T { typedef int X; } O;
137 - [NEW] declaration specifier '__unwind__'. Local objects declared
138 with this are destructed on 'throw'. Info on 3.2-exceptions
140 - [CHANGE] we do not call destructors of static local objects when
143 - [KEWL] now lwc throws a warning if we forget the semicolon after
144 the declaration of a class (very common mistake)
149 - [NEW] enum by name. Generate enum name strings for integer
150 values with __enumstr__(ENUM_TAG, value)
152 - [BETTER] static functions are not placed in linkonce
155 - [FEATURE] attribute 'final' for virtual functions.
157 - [CORRECTION] references should invoke virtual calls and not
158 direct member calls. Other fixes for structures passed by
159 reference resulting in virtual stuff (for example access of
160 virtual base's members in virtual inheritance).
162 - [BUGFIX] auto functions were not cooperating with the "derrived
163 objects without data members" optimization.
165 - [FEATURE] template classes can have real-class ancestors. These
166 are inherited in specializations.
168 - [NEW] Variable length arrays (VLA) are transformed to alloca().
170 - [FIX] The name of a local object can be used in its initialization
171 expression. For example:
174 - [GOOD] added some useful informative warnings in code generation
176 - [BUGFIX] in the conversions of ?: to bring the expressions
177 to a common type. If one is a pointer and the other an int,
178 the resulting type is a pointer.
180 - [BUGFIX] several fixes for 'specialize' in local scopes.
181 It had only been tested for global specializations.
183 - [BUGFIX] modular member functions which were defined outside the
184 body of their class, could not call other modular functions of
187 - [IMPROVEMENT] regular expressions can use strncmp/strncasecmp
188 for long fixed strings. Makes code smaller.
190 - [BUGFIX] in regular expression code generation.
191 A '&&' should be '||' somewhere.
193 - [FEATURE] function call () operator can be overloaded.
195 - [FEATURE] anonymous struct objects supported like anonymous
198 - [BUGFIX] nested anonymous union objects didn't work.
200 - [RIGHT-THING] in the previous version, operator overloading for
201 postfix unary operators (++, --, !!), was not fully implemented.
202 We use the -already- reserved keyword 'postfix' to declare these.
204 - [RIGHT-THING] assignments in initializations are converted
205 to constructor calls.
210 - [FEATURE] construction of each element of array of objects
211 with ctors. see 6.2-doc
213 - [FEATURE] single-quoted strings
215 - [FEATURE] it's possible to assign structures with const
216 members. Normally, the C compiler will complain for changing
217 value of read-only member. lwc uses memcpy for such assignments.
219 - [BETTER] The pointer to the virtual table
220 is declared const and cannot be altered in the lifetime of an
221 object. This is good becase the compiler may be able to optimize.
223 - [DESIGN] An important design decission.
224 lwc will adapt to the compiler it was compiled with and produce
225 code suitable for it. We would like to generate one portable
226 works-for-all C99 code, but unfortunatelly this is utopic.
228 - [FEATURE] if overloaded operators (except unary '*')
229 are applied on "this", overloading function is called.
231 - [FEATURE] references and the dereference() unary operator
233 - [NEW] regular expression to C code expander
237 - [FEATURE] escape raw strings with r"string"
239 - [RIGHT] global initialization constructor function not emitted if
240 not used. Also, we use the __attribute__ ((constructor)) thing to
241 register the global construction function instead of the obsolete
242 __section__ (".ctors")
247 - [FEATURE] linkonce data
249 - [FEATURE] some amazing optimizations which improve the generated
250 C code quality. virtual inheritance can be really gone if derrived
251 objects have no data. see doc
253 - [FEATURE] alternative constructors
255 - [FIX] virtuallity pseudo functions which downcast,
256 now get a name which includes both classes. (should be so)
258 - [NEW] 'modular' member functions that don't have "this"
260 - [NEW] _CLASS_ keyword to be used with macros and auto
263 - [RIGHT-THING] function () const in the declaration
264 is passed to the definition.
266 - [REWRITE] of function namespaces code. Now everything
267 is much better and we can easilly add more new things,
268 inherited specifiers/qualifiers, et all.
270 - [MISC BUGFIXES] in autofunction
272 - [FEATURE] keyword 'specialize' for
273 unique specialization of template classes according to their
276 - [NEW] lwc program can now do C preprocessing.
277 Thus it is independent of the system's preprocessor
278 'cpp' and has the #uses directive to read header
279 files. Still, the system's preprocessor is more
280 portable and used by default.
282 - [BUGFIX] for some invalid expressions with missing
283 operands, lwc would not handle them correctly and
284 would use uninitialized data.
286 - [NEW] operator overloading on -> implemeted
288 - [CHANGE] best virtual table to add new entries
289 is the most recently created one. logically.
294 - [FIXES] many fixes in function overloading resolution, type promotion, etc.
296 - ** [NEW] Generic Programming with template classes + local typedefs
297 - functions of template classes can be declared outside their class.
299 - [FEATURE] class declaration qualifiers
300 apply to all member functions. This undoes the
301 older feature to place 'static' infront of a class
302 declaration to force definition of virtual table.
304 - [RIGHT-THING] destructors return 'this'.
305 The return value is used by free() in delete.
306 This is the right thing for proper destruction
307 in virtual/multiple inheritance.
310 functions returning structures can be arguments
311 to functions receiving structures -- by reference.
313 - ** [NEW] Operator overloading. rewrite of the rexpr.c
316 functions can return references, which are lvalues.
318 - [FORGOT] to update the version number
320 - [CHANGED] the "mEmBeR" post string is really gone. member
321 function names are <function>_<object>_ which is rare-enough
324 - [NEW] the '!!' postfix/prefix operator for boolean negation.
326 - [NEW] portability project. lwc can reinclude files for the
327 C compiler to make the code portable.
329 - [RT] class consts can be used to initialize array members
330 bitfields and virtual variable initialization expressions.
332 - [FIX] yet more fixes in the code which decides if autofuncs
333 are the same and need redefinition or not.
339 using uninitialized value maybe_ctor. thanks valgrind!
342 auto functions are redefined if they reference 'this'
348 linkonce linker sections where discovered and used.
349 This is very useful for several reasons:
350 - virtual tables don't have to be seen by main.
351 they are defined in every object file.
352 - Virtuallity functions which make up the virtual
353 table entries are collapsed (the executable is
355 - this allows the implementation of templates and
358 - [NEW] __thread is a valid storage class specifier
361 As a mechanism to a structured setjmp/longjmp implementation.
364 - [BUGFIX] the "return" statement will generate some
365 more code to call the destructors of all the local objects.
366 In the case of a function returning void, the generated
367 code was broken and syntactically invalid.
369 - [RIGHT-THING/FEATURE]
370 In multiple inheritance if a virtual function redeclared
371 exists in multiple parent classes, it is adjusted for both.
374 In the gnuC extension of conditional operator ?: with omitted
375 middle operand: it is made to work with automatic casts in
378 - [NEW] the cool feature advertised, that it is possible
379 to define member functions without a declaration in the class
380 was not actually working. It is implemented because it's a
384 If a virtual function calls itself recusivelly, the call does
385 not have to go through the virtual table. It knows which function
386 is called at compile-time.
388 - [BUGFIX] embarassing segfaults
389 -if arguments were named in declarations of virtual functions!
390 -in ambiguous member functions (isancestor)
392 - [COOL] auto virtual functions. See the NEW-0.7 for this great
396 the benum declarator will generate constants like enum but
397 with binary exponential succession. 1, 2, 4, 8, 16, 32, ...
398 which can be used for boolean flags.
400 - [NEW] _loadtext <filename>
401 WIth this directive, lwc will read an entrie text file and
402 convert it to a string literal, escaping \" and \n.
403 Null terminate it and quote it.
405 - [NEW] parameter name may be omitted in function definitions
407 - [NEW] anonymous unions: they are supported
409 - [NEW] typeof() is a valid lwc keyword
411 - [NEW] for (int i;) implemented
413 - [NEW] The ability to request the generation of a const/inlined
414 virtual table has been improved.
416 - [RIGHT-THING] Downcasting and upcasting from null pointer (0),
417 results to null pointer (0) again; it should be so.
423 - [CRITICAL] Bugfix. Downcast data which was position dependent
424 was completely broken therefore.
426 - [CRITICAL] expressions in { initializers } were not rewritten!
428 - [BUGFIX] segfaulting in default argument list declarations.
430 - [BUGFIX] automatic casting in "return expression;" was not working properly
433 - [BUGFIX] It used to be impossible to call redeclared virtual functions
434 in multiple virtual inheritance from a base object which was
435 not a pointer! (whatever that means)
437 - [FIXED] Fixed the case where a virtual call must be done for structures
438 passed by reference. These are actually pointers and not objects
439 so we go through the virtual table and call the pointer to function.
441 - [FIXED] automatic casting to common base class is also done for relational
442 operators (used to be in ?: only)
444 - [REWRITE] Major rewrite of the hierarchy module. Now everything is
445 simpler, easier to understand and more efficient. (simple is the enemy of
448 - [REWRITE] The code for naming all the arguments of function prototypes
449 has been rewritten, significantly improved and simplified.
451 - [IMPROVED] "virtual tables done right".
452 The virtual tables are now declared with lots of nested unions so that
453 the order of declaration does not matter. Virtual tables are also
456 - [IMPROVED] in virtual inheritance,
457 compile-time polymorhism is detected to generate constant paths.
458 Internal construction functions are smaller && faster.
460 - [RIGHT-THING] if a virtual base class has no data members (only a virtual
461 table) then virtual inheritance is much more efficient. The derrived
462 class has a direct pointer to the virtual table instead of a pointer to
463 the base class instance. g++ appears to be doing something like that too.
465 - [RIGHT-THING] Now the virtual table declarations and the structure declarations
466 are mixed in the same section. This is required because of virtual
467 variables: A virtual variable may be a structure and thus, virtual
468 table declarations can no longer be *before* the structure declarations.
470 - [CHANGED] The generated names of member functions where changed. Now it is:
471 <function-name>_<structure-name>_mEmBeR which is more descriptive.
473 - [NEW] _lwc_config_ {} command to pass options to the lwc compiler.
474 Interesting options : turn off structure-by-reference,
475 inline virtual tables by default, and other.
477 - [NEW] virtual tables can be constant and into read-only memory.
478 also constness applied to some internal functions.
479 it's possible to declare 'const *this' for member functions.
481 - [NEW] const class members
483 - [NEW] abstract template class macros.
485 - [NEW] access of virtual variables without an instance.
487 - [NEW] introduced "static class" to export the virtual table definition.
489 - [NEW] overloaded operator ~
491 - [NEW] anonymous object call constructor thing.
493 - [NEW] Virtual inheritance declarations.
494 Solve the dynamic_cast problem
496 * see the file doc/CHANGES-0.6 for the new stuff.