Skip to content

Commit

Permalink
Reorder checks in CallSignature.get_attr_str to put "named" on top. W…
Browse files Browse the repository at this point in the history
…e are mostly use this attribute.

git-svn-id: https://svn.parrot.org/parrot/branches/pcc_reapply@41876 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
bacek committed Oct 15, 2009
1 parent 9e9e01a commit ce247dd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pmc/callsignature.pmc
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,10 @@ Retrieves the hash of named arguments.
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"))) {
Expand All @@ -540,9 +543,6 @@ Retrieves the hash of named arguments.
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,
Expand Down

0 comments on commit ce247dd

Please sign in to comment.