+void registry_dump()
+{
+ int t;
+ for(t=0;t<registry_classes->hashsize;t++) {
+ dictentry_t*e = registry_classes->slots[t];
+ while(e) {
+ slotinfo_t*i = (slotinfo_t*)e->key;
+ printf("[%s] %s.%s\n", access2str(i->access), i->package, i->name);
+ e = e->next;
+ }
+ }
+}
+
+memberinfo_t* registry_findmember(classinfo_t*cls, const char*ns, const char*name, char recursive)
+{
+ memberinfo_t tmp;
+ tmp.name = name;
+ tmp.package = ns?ns:"";
+
+ if(!recursive) {
+ return (memberinfo_t*)dict_lookup(&cls->members, &tmp);
+ }
+ /* look at classes directly extended by this class */
+ slotinfo_t*m = 0;
+ classinfo_t*s = cls;
+
+ if(recursive>1) // check *only* superclasses
+ s = s->superclass;
+
+ while(s) {
+ if(s->kind == INFOTYPE_UNRESOLVED)
+ break;
+
+ m = (slotinfo_t*)dict_lookup(&s->members, &tmp);
+ if(m) {
+ return (memberinfo_t*)m;
+ }
+ s = s->superclass;
+ }
+ /* look at interfaces, and parent interfaces */
+ int t=0;
+ while(cls->interfaces[t]) {
+ classinfo_t*s = cls->interfaces[t];
+ if(s->kind != INFOTYPE_UNRESOLVED) {
+ while(s) {
+ m = (slotinfo_t*)dict_lookup(&s->members, &tmp);
+ if(m) {
+ return (memberinfo_t*)m;
+ }
+ s = s->superclass;
+ }
+ }
+ t++;
+ }
+ return 0;
+}
+
+memberinfo_t* registry_findmember_nsset(classinfo_t*cls, namespace_list_t*ns, const char*name, char superclasses)
+{
+ memberinfo_t*m = 0;
+ while(ns) {
+ m = registry_findmember(cls, ns->namespace->name, name, superclasses);
+ if(m) return m;
+ ns = ns->next;
+ }
+ m = registry_findmember(cls, "", name, superclasses);
+ if(m) return m;
+ /* TODO: it maybe would be faster to just store the builtin namespace as "" in
+ builtins.c (update: some members (e.g. XML.length) are present both for
+ "" and "http:...builtin") */
+ m = registry_findmember(cls, "http://adobe.com/AS3/2006/builtin", name, superclasses);
+ if(m) return m;
+ return 0;
+}
+
+
+void registry_fill_multiname(multiname_t*m, namespace_t*n, slotinfo_t*c)