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=a1f10a51da2add8555e39fc1f002ad5b691c2d86;hp=f922a7fbbe440c4a5a36a25fcfdbd7494f8d8226;hb=1ac390fe1e18444008857b056c947710be9621a8;hpb=7da27a216a7f4bb3331fe315cdbec69bfcf2c762 diff --git a/lib/c++/orb.cc b/lib/c++/orb.cc index f922a7f..a1f10a5 100644 --- a/lib/c++/orb.cc +++ b/lib/c++/orb.cc @@ -26,8 +26,8 @@ namespace System { // optimization by changing it now without testing how GCC // behaves. - do { - if (*tbl->guid == new_guid_first && + while (true) { + if (tbl->guid[0] == new_guid_first && tbl->guid[1] == new_guid[1] && (sizeof(long) == 8 || (tbl->guid[2] == new_guid[2] && @@ -35,8 +35,10 @@ namespace System { break; tbl++; - } while (tbl->guid); - + if (__builtin_expect(!tbl->guid, 0)) + return 0; + } + uintptr_t ptr = reinterpret_cast(obj); ptr += obj->info->concrete;