Branch: Tag:

2003-11-09

2003-11-09 01:32:30 by Martin Stjernholm <mast@lysator.liu.se>

Can't optimize lookups on the type hint when there are objects in the
indices.

Rev: src/mapping.c:1.161

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: mapping.c,v 1.160 2003/09/08 15:28:14 mast Exp $ + || $Id: mapping.c,v 1.161 2003/11/09 01:32:30 mast Exp $   */      #include "global.h" - RCSID("$Id: mapping.c,v 1.160 2003/09/08 15:28:14 mast Exp $"); + RCSID("$Id: mapping.c,v 1.161 2003/11/09 01:32:30 mast Exp $");   #include "main.h"   #include "object.h"   #include "mapping.h"
472:    { \    h=h2 % md->hashsize; \    DO_IF_DEBUG( if(d_flag > 1) check_mapping_type_fields(m); ) \ -  if(md->ind_types & (1 << key->type)) \ +  if(md->ind_types & ((1 << key->type) | BIT_OBJECT)) \    { \    for(prev= md->hash + h;(k=*prev);prev=&k->next) \    { \
495:    { \    h=h2 % md->hashsize; \    DO_IF_DEBUG( if(d_flag > 1) check_mapping_type_fields(m); ) \ -  if(md->ind_types & (1 << key->type)) \ +  if(md->ind_types & ((1 << key->type) | BIT_OBJECT)) \    { \    k2=omd->hash[h2 % omd->hashsize]; \    prev= md->hash + h; \