X-Git-Url: http://git.buserror.net/cgi-bin/gitweb.cgi?p=polintos%2Fscott%2Fpriv.git;a=blobdiff_plain;f=lib%2Fc%2B%2B%2Forb.cc;h=636ee9a9a8694930f973912c476b4c369f15d944;hp=30b1bcc576c364893fe5a69ea4e5e93b1835b6db;hb=bc696ad9b0d5a2ad04e2de5ad8b89f746dd78491;hpb=b5cbe98949d5b279965d607c9618d404b26d4760 diff --git a/lib/c++/orb.cc b/lib/c++/orb.cc index 30b1bcc..636ee9a 100644 --- a/lib/c++/orb.cc +++ b/lib/c++/orb.cc @@ -7,8 +7,7 @@ namespace RunTime { // This function could be made to do a binary search if we can // manage to somehow sort the IFaceTables... - uintptr_t downcast(::System::_i_Object *obj, - const unsigned long *new_guid) + uintptr_t downcast(::System::_i_Object *obj, const GUID *new_guid) { if (!obj) return 0; @@ -19,7 +18,7 @@ namespace RunTime { unsupported_long_size(); IFaceTable *tbl = obj->info->concrete_IFaceTable; - unsigned long new_guid_first = *new_guid; + unsigned long new_guid_first = new_guid->l[0]; // This doesn't use guids_equal(), as that would eliminate the // ability to cache the first word of new_guid. The compiler @@ -29,15 +28,15 @@ namespace RunTime { // behaves. while (true) { - if (tbl->guid[0] == new_guid_first && - tbl->guid[1] == new_guid[1] && + if (tbl->info->guid->l[0] == new_guid_first && + tbl->info->guid->l[1] == new_guid->l[1] && (sizeof(long) == 8 || - (tbl->guid[2] == new_guid[2] && - tbl->guid[3] == new_guid[3]))) + (tbl->info->guid->l[2] == new_guid->l[2] && + tbl->info->guid->l[3] == new_guid->l[3]))) break; tbl++; - if (__builtin_expect(!tbl->guid, 0)) + if (__builtin_expect(!tbl->info->guid->l[0], 0)) return 0; } @@ -49,6 +48,8 @@ namespace RunTime { return ptr; }; +// ::System::Object create_wrapper( + namespace Priv { typedef void (*MethodEntry)(ParamInfoBlock *pib); @@ -58,7 +59,7 @@ namespace RunTime { }; typedef ::Util::RadixTree ObjTable; - ObjTable objtable; +// ObjTable objtable; unsigned long get_pc() { @@ -69,7 +70,7 @@ namespace RunTime { { // FIXME: marshall struct } - + void handle_message(ParamInfoBlock *pib) { Message *msg = reinterpret_cast(pib->segments[0].ptr); @@ -81,8 +82,6 @@ namespace RunTime { sizeof(InvokeMethod)); // ID obj = pib->objlist[0]; - - break; }