Skip to content

Commit 4a0dc38

Browse files
committed
Execute prepared calls with the exact thread-local machine
1 parent 2853f52 commit 4a0dc38

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

engine/src/script/event.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ struct Event
5858

5959
template <typename F, EventUsagePattern Usage>
6060
inline Event<F, Usage>::Event(Script& script, Script::gaddr_t address)
61-
: m_pcall((Usage == SharedScript) ? script.machine() : script.get_fork().machine(), address)
61+
: m_pcall(script.machine(), address)
6262
{
6363
}
6464

engine/src/script/script.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ inline std::optional<Script::sgaddr_t> Script::prepared_call(riscv::PreparedCall
383383
try
384384
{
385385
if (LIKELY(meter.is_one()))
386-
return {pcall.vmcall(std::forward<Args>(args)...)};
386+
return {pcall.call_with(*m_machine, std::forward<Args>(args)...)};
387387
else if (LIKELY(meter.get() < MAX_CALL_DEPTH))
388388
return {machine().preempt(MAX_CALL_INSTR, pcall.address(),
389389
std::forward<Args>(args)...)};

ext/libriscv

0 commit comments

Comments
 (0)