I'm making some kind of interpreter and I'm computing a static const jump table thanks to local label addresses.
You know the drill,static const int JUMP_TABLE[] = { &&case0 - &&case0, &&case1 - &&case0
and so on.
For various reasons, mostly performance, I'd like to copy/compress this table in an object during init.
I'm hurting my head against the wall because I can't figure how to escape the lexical scoping of the function !
How can I somehow reference &&case0 from another function ?
Does somebody have a good trick for this ?
Thanks in advance
↧
Get a label address out of the function scope in gcc/clang (C++)
↧