| 29 | // ============================================================================ |
| 30 | |
| 31 | static void CodeHolder_setGlobalOption(CodeHolder* self, uint32_t clear, uint32_t add) noexcept { |
| 32 | // Modify global options of `CodeHolder` itself. |
| 33 | self->_globalOptions = (self->_globalOptions & ~clear) | add; |
| 34 | |
| 35 | // Modify all global options of all `CodeEmitter`s attached. |
| 36 | CodeEmitter* emitter = self->_emitters; |
| 37 | while (emitter) { |
| 38 | emitter->_globalOptions = (emitter->_globalOptions & ~clear) | add; |
| 39 | emitter = emitter->_nextEmitter; |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | static void CodeHolder_resetInternal(CodeHolder* self, bool releaseMemory) noexcept { |
| 44 | // Detach all `CodeEmitter`s. |