Commit graph

8 commits

Author SHA1 Message Date
Christoph Oelckers
6926875b21 - allow parsing of static constant arrays in class scope.
This is only the parsing part, the arrays are not yet getting evaluated.
This required quite a hacky workaround because the gramma couldn't be made to accept the rule. The scanner will check if a 'static' token is immediately followed by a 'const' token and will combine both to a new 'staticconst' token that does not create conflicts with other rules.
2017-03-14 20:22:37 +01:00
Christoph Oelckers
8ab562ef13 - the fourth. 2017-03-08 18:55:54 +01:00
Christoph Oelckers
3cbd62479b - took VMFunction out of the DObject hierarchy.
As it stood, just compiling the internal ZScript code created more than 9000 DObjects, none of which really need to be subjected to garbage collection, aside from allowing lazy deallocation.
This puts an incredible drag on the garbage collector which often needs several minutes to finish processing before actual deletion can start.

The VM functions with roughly 1800 of these objects were by far the easiest to refactor so they are now. They also use a memory arena now which significantly reduces their memory footprint.
2017-02-08 11:13:41 +01:00
Edoardo Prezioso
6eff1cb8be - Fixed more GCC/Clang warnings. 2016-11-27 02:34:32 +01:00
Christoph Oelckers
a60bdc2bfb use a memory arena for allocating code generation nodes.
- Since the number of small allocations here is extremely high this will help a lot to prevent fragmentation and since most nodes are collected up front and this is done when no large resources are being loaded it won't cause heap spikes.

let Emit methods delete FxExpression arrays when they are done.
- For some reason the deletion process does not work 100%, there are always some nodes left behind and so far I haven't found them. This ensures that these arrays do not live any longer than needed.
2016-11-10 15:13:31 +01:00
Randy Heit
55142078d8 Normalize line endings 2016-03-01 09:47:10 -06:00
Christoph Oelckers
789c937635 - use FSharedStringArena to handle AActor's tag strings properly. They were names before which are not case sensitive and could cause problems.
- fixed FSharedStringArena::FreeAll did not NULL TopBlock.
- bumped savegame version for above changes.


SVN r3100 (trunk)
2011-01-12 00:17:13 +00:00
Randy Heit
2add3fb381 - Merge voxels back into trunk. Even if it needs further tweaking, it should at least be stable now.
SVN r3086 (trunk)
2011-01-02 18:02:27 +00:00