summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/devintrf.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2010-07-02 15:42:18 +0000
committer Aaron Giles <aaron@aarongiles.com>2010-07-02 15:42:18 +0000
commit7f1122418454aa249f89f99ac5db6ecce55a0760 (patch)
treec8369704325344302f1eccc1aa6026a844845da1 /src/emu/devintrf.c
parent553ec7f42716c9bcb35d3efb0e3c903a72f640cb (diff)
Added overrides to fetch the execute and state interfaces without doing
a dynamic_cast<> to speed up common legacy operations.
Diffstat (limited to 'src/emu/devintrf.c')
-rw-r--r--src/emu/devintrf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/emu/devintrf.c b/src/emu/devintrf.c
index 25caae2b1bb..c7e39361618 100644
--- a/src/emu/devintrf.c
+++ b/src/emu/devintrf.c
@@ -683,6 +683,8 @@ void device_interface::interface_debug_setup()
device_t::device_t(running_machine &_machine, const device_config &config)
: machine(&_machine),
m_machine(_machine),
+ m_execute(NULL),
+ m_state(NULL),
m_next(NULL),
m_owner((config.m_owner != NULL) ? _machine.m_devicelist.find(config.m_owner->tag()) : NULL),
m_interface_list(NULL),
@@ -819,6 +821,10 @@ UINT64 device_t::attotime_to_clocks(attotime duration) const
void device_t::start()
{
+ // look up the common interfaces
+ m_execute = dynamic_cast<device_execute_interface *>(this);
+ m_state = dynamic_cast<device_state_interface *>(this);
+
// populate the region field
m_region = m_machine.region(tag());