From: Johan K. <joh...@id...> - 2001-09-13 15:50:31
|
I continued my work on the aggregate (array AND structure) initializers. What else should I do. I can't be of any help somewhere else. Assuming you set the environmental variable TRY_THE_NEW_INITIALIZER to something: Global and local aggregate initializers are put into code space. From there it is copied to where it belongs (only xseg for now) at either program startup (for globals and static locals) or at every invocation of a function (for non-static local's of course). I considered a special segment that would prevent to initialize on a per global-var, but that isn't worth it: it won't happen that often. The next step should be to implement a _native_memcpy() that prevents the use the generic memcpy() and would be even much more efficient, (see the comments in src/mcs51/gen.c:gen51AggregateAssign() 1.88). Please let me know what you think. Johan P.S. I only tested this with (multi dimension) arrays, not for structures yet. |