]> git.buserror.net Git - polintos/scott/priv.git/blobdiff - lib/c++/orb.cc
update
[polintos/scott/priv.git] / lib / c++ / orb.cc
index f922a7fbbe440c4a5a36a25fcfdbd7494f8d8226..a1f10a51da2add8555e39fc1f002ad5b691c2d86 100644 (file)
@@ -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<uintptr_t>(obj);
                        
                        ptr += obj->info->concrete;