implemented more prechecks including the existence of the primitive function handler and the number of supported arguments when compiling primitive method defintions

This commit is contained in:
hyunghwan.chung
2017-03-31 14:21:22 +00:00
parent 0f84a115ae
commit 447670aba8
14 changed files with 172 additions and 80 deletions

View File

@ -263,9 +263,9 @@ static int import (moo_t* moo, moo_mod_t* mod, moo_oop_class_t _class)
return 0;
}
static moo_pfbase_t* query (moo_t* moo, moo_mod_t* mod, const moo_ooch_t* name)
static moo_pfbase_t* query (moo_t* moo, moo_mod_t* mod, const moo_ooch_t* name, moo_oow_t namelen)
{
return moo_findpfbase(moo, pfinfos, MOO_COUNTOF(pfinfos), name);
return moo_findpfbase(moo, pfinfos, MOO_COUNTOF(pfinfos), name, namelen);
}

View File

@ -545,9 +545,9 @@ static int import (moo_t* moo, moo_mod_t* mod, moo_oop_class_t _class)
return 0;
}
static moo_pfbase_t* query (moo_t* moo, moo_mod_t* mod, const moo_ooch_t* name)
static moo_pfbase_t* query (moo_t* moo, moo_mod_t* mod, const moo_ooch_t* name, moo_oow_t namelen)
{
return moo_findpfbase (moo, pfinfos, MOO_COUNTOF(pfinfos), name);
return moo_findpfbase (moo, pfinfos, MOO_COUNTOF(pfinfos), name, namelen);
}
static void unload (moo_t* moo, moo_mod_t* mod)

View File

@ -227,9 +227,9 @@ static int import (moo_t* moo, moo_mod_t* mod, moo_oop_class_t _class)
/*return moo_genpfmethods (moo, mod, _class, pfinfos, MOO_COUNTOF(pfinfos));*/
}
static moo_pfbase_t* query (moo_t* moo, moo_mod_t* mod, const moo_ooch_t* name)
static moo_pfbase_t* query (moo_t* moo, moo_mod_t* mod, const moo_ooch_t* name, moo_oow_t namelen)
{
return moo_findpfbase (moo, pfinfos, MOO_COUNTOF(pfinfos), name);
return moo_findpfbase (moo, pfinfos, MOO_COUNTOF(pfinfos), name, namelen);
}
#if 0

View File

@ -499,9 +499,9 @@ static int x11_import (moo_t* moo, moo_mod_t* mod, moo_oop_class_t _class)
return 0;
}
static moo_pfbase_t* x11_query (moo_t* moo, moo_mod_t* mod, const moo_ooch_t* name)
static moo_pfbase_t* x11_query (moo_t* moo, moo_mod_t* mod, const moo_ooch_t* name, moo_oow_t namelen)
{
return moo_findpfbase (moo, x11_pfinfo, MOO_COUNTOF(x11_pfinfo), name);
return moo_findpfbase (moo, x11_pfinfo, MOO_COUNTOF(x11_pfinfo), name, namelen);
}
static void x11_unload (moo_t* moo, moo_mod_t* mod)
@ -573,9 +573,9 @@ static int x11_gc_import (moo_t* moo, moo_mod_t* mod, moo_oop_class_t _class)
return 0;
}
static moo_pfbase_t* x11_gc_query (moo_t* moo, moo_mod_t* mod, const moo_ooch_t* name)
static moo_pfbase_t* x11_gc_query (moo_t* moo, moo_mod_t* mod, const moo_ooch_t* name, moo_oow_t namelen)
{
return moo_findpfbase(moo, x11_gc_pfinfo, MOO_COUNTOF(x11_gc_pfinfo), name);
return moo_findpfbase(moo, x11_gc_pfinfo, MOO_COUNTOF(x11_gc_pfinfo), name, namelen);
}
static void x11_gc_unload (moo_t* moo, moo_mod_t* mod)
@ -614,9 +614,9 @@ static int x11_win_import (moo_t* moo, moo_mod_t* mod, moo_oop_class_t _class)
return 0;
}
static moo_pfbase_t* x11_win_query (moo_t* moo, moo_mod_t* mod, const moo_ooch_t* name)
static moo_pfbase_t* x11_win_query (moo_t* moo, moo_mod_t* mod, const moo_ooch_t* name, moo_oow_t namelen)
{
return moo_findpfbase(moo, x11_win_pfinfo, MOO_COUNTOF(x11_win_pfinfo), name);
return moo_findpfbase(moo, x11_win_pfinfo, MOO_COUNTOF(x11_win_pfinfo), name, namelen);
}
static void x11_win_unload (moo_t* moo, moo_mod_t* mod)