[svn:parrot] r38566 - trunk/src/pmc

chromatic at svn.parrot.org chromatic at svn.parrot.org
Fri May 8 00:54:52 UTC 2009


Author: chromatic
Date: Fri May  8 00:54:52 2009
New Revision: 38566
URL: https://trac.parrot.org/parrot/changeset/38566

Log:
[PMC] Avoided a dual lookup for methods in Object PMC.

Modified:
   trunk/src/pmc/object.pmc

Modified: trunk/src/pmc/object.pmc
==============================================================================
--- trunk/src/pmc/object.pmc	Fri May  8 00:53:46 2009	(r38565)
+++ trunk/src/pmc/object.pmc	Fri May  8 00:54:52 2009	(r38566)
@@ -354,11 +354,10 @@
             /* If it's from this universe or the class doesn't inherit from
              * anything outside of it... */
             if (all_in_universe || VTABLE_isa(interp, cur_class, CONST_STRING(interp, "Class"))) {
-                if (VTABLE_exists_keyed_str(interp, class_info->methods, name)) {
-                    /* Found it! */
-                    method = VTABLE_get_pmc_keyed_str(interp, class_info->methods, name);
+                method = VTABLE_get_pmc_keyed_str(interp, class_info->methods, name);
+                /* Found it! */
+                if (!PMC_IS_NULL(method))
                     break;
-                }
             }
             else {
                 Parrot_ex_throw_from_c_args(INTERP, NULL, -1,


More information about the parrot-commits mailing list