Branch: Tag:

2015-12-22

2015-12-22 17:26:07 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Use debug_find_shared_string() instead of debug_findstring().

These calls all are to check that the string has been properly added
to the string hash table (ie "finished"), so it is safe to just perform
a straight hash table lookup.

Fixes the performance issue caused when using debug_findstring().

1285: Inside #if defined(PIKE_DEBUG)
  {    if(current_do_debug_cycle == last_stralloc_verify)    { -  if(debug_findstring(s) !=s) +  if(debug_find_shared_string(s) != s)    Pike_fatal("Shared string not shared.\n");    }else{   
1319: Inside #if defined(PIKE_DEBUG)
   Pike_fatal("Hash value changed?\n");    }    -  if(debug_findstring(s) !=s) +  if(debug_find_shared_string(s) != s)    Pike_fatal("Shared string not shared.\n");       if(index_shared_string(s,s->len))