Information on BMax's build system?
BlitzMax Forums/BlitzMax Beginners Area/Information on BMax's build system?
| ||
I've been using Blide, but I'd like to look further into creating custom modules and understanding how bmax works underneath in general. I think I read somewhere that bmax just converts to C++ and then compiles it? Is there any documentation on this? I've searched around a bit, but can't seem to find what I'm looking for. A gentle nudge in the right direction should be enough. |
| ||
the official Blitzmax compiler converts blitzmax source into x86 ASM, which then gets compiled by FASM under windows. There's an experimental port of the Blitzmax compiler by Brucey which does generate C code instead. As far as modules are concerned: blitzmax modules can either be written in blitzmax itself, or in C (which then gets compiled by MinGW under Windows.) |
| ||
I assume they're built with gcc under *nix? Any information on that process in general, including the BMX C API's exposed to the underlying code? I'm also interested in getting a better handle on the memory management of BMX. I know it's reference counted and can't handle cyclic structures, but I'm curious about things like arrays. Are they an object themself that points to a heap allocated contiguous area of memory, for example. I find myself wondering what's really happening underneath. I'm willing to dig into source, I'm just not sure where to look. The BMX utilities are a bit of a mystery to me. |
| ||
Everything you could want to know about the runtime is in BRL.Blitz. Specifically blitz_object.*, blitz_string.*, blitz_array.* and blitz_gc*. Every Object is on the heap, straight from the system malloc, with a virtual function table for all methods. The simplest form of class based objects really, like what you would make by hand in C (which is exactly what it is ;) |
| ||
Thanks for that, I've been poking around a bit and I have a better handle on how things are done. It helps me a lot knowing how the memory is being dealt with underneath. I also noticed TList doesn't track its size so it has to iterate the entire thing every single time, is there a reason for that? |