Changeset 448


Ignore:
Timestamp:
Jul 25, 2003, 9:19:41 PM (22 years ago)
Author:
bird
Message:

Optimized away some strcmps.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/src/emxomf/stabshll.c

    • Property cvs2svn:cvs-rev changed from 1.16 to 1.17
    r447 r448  
    20612061                   * TODO: verify that this doesn't really work with overloaded constructors and fix it.
    20622062                   */
    2063                   if (!(tf->flags & MEMBER_STATIC))
     2063                  if (   !(tf->flags & MEMBER_STATIC)
     2064                      && *((unsigned*)tf->name) == ('_' | '_' << 8 | 'c' << 16 | 'o' << 24)
     2065                      && *((unsigned*)tf->name) == ('_' | '_' << 8 | 'b' << 16 | 'a' << 24)
     2066                         )
    20642067                    {
    20652068                      if (!strcmp(tf->name, "__comp_ctor") || !strcmp(tf->name, "__base_ctor"))
     
    30563059  struct relocation_info r;
    30573060  const char *str, *p;
    3058   char *name;
     3061  const char *name;
    30593062  int n, ti;
    30603063
     
    30643067    abort ();
    30653068  n = p - str;
    3066   name = alloca (n + 1);
    3067   memcpy (name, str, n);
    3068   name[n] = 0;
     3069  name = strpool_addn(str_pool, str, n);
    30693070
    30703071  proc_start_addr = symbol->n_value;
     
    30733074  for (t1 = type_head; t1; t1 = t1->next)
    30743075    if (    t1->tag == ty_memfunc
    3075         &&  t.d.memfunc.mnglname
    3076         &&  !strcmp (t1->d.memfunc.mnglname, name))
     3076        &&  t1->d.memfunc.mnglname == name)
    30773077      break;
    30783078
Note: See TracChangeset for help on using the changeset viewer.