IdentityDictionary add_plugin(const wchar_t * name) { Optr symbol = (Optr)new_Symbol(name); IdentityDictionary plugin = (IdentityDictionary)IdentityDictionary_lookup(_NATIVES_, symbol); if (plugin) { return plugin; } plugin = create_plugin(); IdentityDictionary_store(_NATIVES_, (Optr)new_Symbol(name), (Optr)plugin); return plugin; }
Symbol * Symbol::clone(ClonePolicy<Function>& pol) const { Program *prog = pol.context()->getProgram(); Symbol *that = new_Symbol(prog, reg.file, reg.fileIndex); pol.set<Value>(this, that); that->reg.size = this->reg.size; that->reg.type = this->reg.type; that->reg.data = this->reg.data; that->baseSym = this->baseSym; return that; }
void post_init_ReflectionMethod() { SMB_Reflection_Reflection = new_Symbol(L"Reflection.Reflection"); SMB_pinocchioReflective_ = new_Symbol(L"pinocchioReflective:"); }
void store_native(IdentityDictionary dict, const wchar_t *selector, native code) { IdentityDictionary_store(dict, (Optr)new_Symbol(selector), (Optr)code); }