diff options
| author | 2023-03-25 05:53:58 +1100 | |
|---|---|---|
| committer | 2023-03-25 05:53:58 +1100 | |
| commit | 5f97af903c8bc7e3d4d031c9794cd620d3b2af98 (patch) | |
| tree | 0052d342c46aee33333b25f3da53c9683c92b8b7 /src/devices/cpu/sh | |
| parent | fbb67a2764e26c03821e66f896b5417a2bfe682e (diff) | |
-Lua engine: run everything in coroutines. (#11019)
* This lets you use emu.wait(...) directly without mucking around creating coroutines.
* Allow emu.wait to accept an attotime argument.
* Added a couple more wait helper functions.
-emu/profiler.h: Actually use scope-based profiling helpers.
* This makes the comment at the top of emu/profile.h less dishonest, and makes it easier to write exception-safe code.
* Got rid of some do { ... } while (0) loops that only existed so break could be used like a goto.
Diffstat (limited to 'src/devices/cpu/sh')
| -rw-r--r-- | src/devices/cpu/sh/sh.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/devices/cpu/sh/sh.cpp b/src/devices/cpu/sh/sh.cpp index 97c2c8a6903..2a7c198668f 100644 --- a/src/devices/cpu/sh/sh.cpp +++ b/src/devices/cpu/sh/sh.cpp @@ -2343,7 +2343,7 @@ void sh_common_execution::code_compile_block(uint8_t mode, offs_t pc) const opcode_desc *desclist; bool override = false; - g_profiler.start(PROFILER_DRC_COMPILE); + auto profile = g_profiler.start(PROFILER_DRC_COMPILE); /* get a description of this sequence */ desclist = get_desclist(pc); @@ -2436,7 +2436,6 @@ void sh_common_execution::code_compile_block(uint8_t mode, offs_t pc) /* end the sequence */ block.end(); - g_profiler.stop(); succeeded = true; } catch (drcuml_block::abort_compilation &) |
