[svn:parrot] r41876 - branches/pcc_reapply/src/pmc

bacek at svn.parrot.org bacek at svn.parrot.org
Thu Oct 15 09:01:32 UTC 2009


Author: bacek
Date: Thu Oct 15 09:01:31 2009
New Revision: 41876
URL: https://trac.parrot.org/parrot/changeset/41876

Log:
Reorder checks in CallSignature.get_attr_str to put "named" on top. We are mostly use this attribute.

Modified:
   branches/pcc_reapply/src/pmc/callsignature.pmc

Modified: branches/pcc_reapply/src/pmc/callsignature.pmc
==============================================================================
--- branches/pcc_reapply/src/pmc/callsignature.pmc	Thu Oct 15 09:01:06 2009	(r41875)
+++ branches/pcc_reapply/src/pmc/callsignature.pmc	Thu Oct 15 09:01:31 2009	(r41876)
@@ -528,7 +528,10 @@
     VTABLE PMC *get_attr_str(STRING *key) {
         PMC *value = PMCNULL;
 
-        if (Parrot_str_equal(INTERP, key, CONST_STRING(INTERP, "results"))) {
+        if (Parrot_str_equal(INTERP, key, CONST_STRING(INTERP, "named"))) {
+            value = get_named_names(INTERP, SELF);
+        }
+        else if (Parrot_str_equal(INTERP, key, CONST_STRING(INTERP, "results"))) {
             GET_ATTR_results(interp, SELF, value);
         }
         else if (Parrot_str_equal(INTERP, key, CONST_STRING(INTERP, "returns"))) {
@@ -540,9 +543,6 @@
         else if (Parrot_str_equal(INTERP, key, CONST_STRING(INTERP, "return_flags"))) {
             GET_ATTR_return_flags(interp, SELF, value);
         }
-        else if (Parrot_str_equal(INTERP, key, CONST_STRING(INTERP, "named"))) {
-            value = get_named_names(INTERP, SELF);
-        }
         else {
             /* If unknown attribute name, throw an exception. */
             Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_ATTRIB_NOT_FOUND,


More information about the parrot-commits mailing list