Hi Martin,

That can definitely done better, if I see correctly only reference from sem_item, sem_function and sem_variable
is in sem_item::add_type. That can be removed.

Yes, only sem_item::add_type uses this variable. Do you think the whole static optimizer variable should be removed?


Sure, that's strange. But I can't find the reference in current trunk.

Can you please update to trunk and check the remaining problematic references?

Okay, I got the current trunk and I believe that this is still existent.
The problem is that the function `sem_item_optimizer::parse_funcs_and_vars` calls `sem_function::parse` which calls `sem_function::init` which calls `sem_function::hash_stmt` which calls `sem_item::add_type` (a static member function) which finally uses the static `optimizer` variable. In short: `sem_item_optimizer::parse_funcs_and_vars` finally calls `sem_item::add_type` I retraced this in the source code and with gdb – this is not the simplest code so I hope I got everything right.
However, this is not a separate issue from the one above.


Regards

Flo

Reply via email to