Optimize native call if statically bound (bug 5842, r=ds,fyren f=dvander).
Original patch written by David Anderson (original r from Fyren). - Updated to function with the current JIT compiler. - Took in clean-ups from later-dated patches.
This commit is contained in:
@@ -331,6 +331,13 @@ void ShareSystem::BindNativeToPlugin(CPlugin *pPlugin, sp_native_t *native, uint
|
||||
native->status = SP_NATIVE_BOUND;
|
||||
native->pfn = pEntry->func();
|
||||
|
||||
if (pEntry->fake)
|
||||
{
|
||||
/* This native is not necessarily optional, but we don't guarantee
|
||||
* that its address is long-lived. */
|
||||
native->flags |= SP_NTVFLAG_EPHEMERAL;
|
||||
}
|
||||
|
||||
/* We don't bother with dependency crap if the owner is Core. */
|
||||
if (pEntry->owner != &g_CoreNatives)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user