[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
bruce@puremagic.com wrote:
> 
> This is a patch to help optimize the method cache some.

<snippage>

the line:    if (method->m_access = access) {
should read: if (method->m_access == access) {

> @@ -1162,9 +1172,18 @@
>      method = object_find_method_local(object, name, FROB_ANY);
>      if (method == NULL)
>          return -1;
> +    if (method->m_access = access) {
> +        /* yay, we don't have to do anything. let's go home. */
> +        return access;
> +    }
> +    if ((method->m_access == MS_FROB) || (access == MS_FROB)) {
> +        /*
> +        * only invalidate when changing to or from 'frob' access.
> +        */
> +       cur_stamp++;
> +    }
>      method->m_access = access;
>      object->dirty = 1;
> -    cur_stamp++; /* to invalidate cached frob/!frob defaults */
>      return access;
>  }
>