X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fas3%2Fregistry.h;fp=lib%2Fas3%2Fregistry.h;h=4d58394c8887a0d9b4853178a0acbacc5b8996d8;hb=15d3df10f09bd780efa101d0c253db96716eb145;hp=148958e0ab8988c83fe439406fdf5e7d18533d23;hpb=cf2ede9f5b6da1f0d143c3fb825b88a3bb183811;p=swftools.git diff --git a/lib/as3/registry.h b/lib/as3/registry.h index 148958e..4d58394 100644 --- a/lib/as3/registry.h +++ b/lib/as3/registry.h @@ -30,6 +30,7 @@ DECLARE(slotinfo); DECLARE(classinfo); DECLARE(memberinfo); DECLARE(methodinfo); +DECLARE(unresolvedinfo); DECLARE(varinfo); DECLARE_LIST(classinfo); DECLARE_LIST(slotinfo); @@ -50,6 +51,7 @@ DECLARE_LIST(slotinfo); #define INFOTYPE_SLOT 1 #define INFOTYPE_METHOD 2 #define INFOTYPE_CLASS 3 +#define INFOTYPE_UNRESOLVED 4 #define SUBTYPE_GET 1 #define SUBTYPE_SET 2 #define SUBTYPE_GETSET 3 @@ -60,6 +62,13 @@ struct _slotinfo { const char*name; int slot; }; +struct _unresolvedinfo { + U8 kind,subtype,flags,access; + const char*package; + const char*name; + int slot; + namespace_list_t*nsset; +}; struct _classinfo { U8 kind,subtype,flags,access; const char*package; @@ -68,7 +77,7 @@ struct _classinfo { classinfo_t*superclass; dict_t members; void*data; //TODO: get rid of this- parser.y should pass type/value/code triples around - classinfo_t*interfaces[]; + classinfo_t*interfaces[0]; }; struct _memberinfo { U8 kind,subtype,flags,access; @@ -111,6 +120,9 @@ methodinfo_t* methodinfo_register_global(U8 access, const char*package, const ch varinfo_t* varinfo_register_onclass(classinfo_t*cls, U8 access, const char*ns, const char*name); varinfo_t* varinfo_register_global(U8 access, const char*package, const char*name); +slotinfo_t* registry_resolve(slotinfo_t*s); +void registry_resolve_all(); + slotinfo_t* registry_find(const char*package, const char*name); void registry_dump(); memberinfo_t* registry_findmember(classinfo_t*cls, const char*ns, const char*name, char superclasses);