#3861 closed enhancement (fixed)
Do not use preprocessor for code generation
Reported by: | Martin Sjölund | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Code Generation | Version: | |
Keywords: | Cc: | Francesco Casella, Lennart Ochel, Willi Braun, Volker Waurich, Adrian Pop, Per Östlund |
Description
The current code generator uses the pre-processor for lookup from variable name to its corresponding array and index in this array.
This is not scalable and needs to change (with 500k variables, the model.h is 400MB in size and empty files take 15 seconds to compile, prevent speed-up by splitting compilation into more files).
I see two main ways of doing this:
- Walk the SimCode structure, replacing any CREF expressions, etc with a
CREF_CODEGEN(EnumArrayName, IntegerIndex, CREF /* for error-messages*/)
- Send in a hash-table to the generator
I prefer the first choice since we need less logic in the code generator, not more. We could perhaps even have special CREF structures for arrays and records, etc...
Any volunteers for implementation?
Change History (3)
comment:1 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
comment:2 by , 9 years ago
Milestone: | Future → 1.10.0 |
---|---|
Resolution: | → fixed |
Status: | accepted → closed |
Note:
See TracTickets
for help on using tickets.
Fixed in PR:871