亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sarray.c

?? GUN開源阻止下的編譯器GCC
?? C
字號:
/* Sparse Arrays for Objective C dispatch tables   Copyright (C) 1993, 1995 Free Software Foundation, Inc.This file is part of GNU CC.GNU CC is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2, or (at your option)any later version.GNU CC is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with GNU CC; see the file COPYING.  If not, write tothe Free Software Foundation, 59 Temple Place - Suite 330,Boston, MA 02111-1307, USA.  *//* As a special exception, if you link this library with files   compiled with GCC to produce an executable, this does not cause   the resulting executable to be covered by the GNU General Public License.   This exception does not however invalidate any other reasons why   the executable file might be covered by the GNU General Public License.  */#include "objc/sarray.h"#include <stdio.h>#include "assert.h"int nbuckets = 0;int nindices = 0;int narrays = 0;int idxsize = 0;#ifdef OBJC_SPARSE2const char* __objc_sparse2_id = "2 level sparse indices";#endif#ifdef OBJC_SPARSE3const char* __objc_sparse3_id = "3 level sparse indices";#endif#ifdef __alpha__const void *memcpy (void*, const void*, size_t);void free (const void*);#endifvoidsarray_at_put(struct sarray* array, sidx index, void* element){#ifdef OBJC_SPARSE3  struct sindex** the_index;#endif  struct sbucket** the_bucket;#ifdef OBJC_SPARSE3  size_t ioffset;#endif  size_t boffset;  size_t eoffset;#ifdef PRECOMPUTE_SELECTORS  union sofftype xx;   xx.idx = index;#ifdef OBJC_SPARSE3  ioffset = xx.off.ioffset;#endif  boffset = xx.off.boffset;  eoffset = xx.off.eoffset;#else /* not PRECOMPUTE_SELECTORS */#ifdef OBJC_SPARSE3  ioffset = index/INDEX_CAPACITY;  boffset = (index/BUCKET_SIZE)%INDEX_SIZE;  eoffset = index%BUCKET_SIZE;#else  boffset = index/BUCKET_SIZE;  eoffset = index%BUCKET_SIZE;#endif#endif /* not PRECOMPUTE_SELECTORS */  assert(soffset_decode(index) < array->capacity); /* Range check */#ifdef OBJC_SPARSE3  the_index = &(array->indices[ioffset]);  the_bucket = &((*the_index)->buckets[boffset]);#else  the_bucket = &(array->buckets[boffset]);#endif    if ((*the_bucket)->elems[eoffset] == element)    return;		/* great! we just avoided a lazy copy */#ifdef OBJC_SPARSE3  /* First, perform lazy copy/allocation of index if needed */  if ((*the_index) == array->empty_index) {    /* The index was previously empty, allocate a new */    *the_index = (struct sindex*)__objc_xmalloc(sizeof(struct sindex));    memcpy(*the_index, array->empty_index, sizeof(struct sindex));    (*the_index)->version = array->version;    the_bucket = &((*the_index)->buckets[boffset]);    nindices += 1;      } else if ((*the_index)->version != array->version) {    /* This index must be lazy copied */    struct sindex* old_index = *the_index;    *the_index = (struct sindex*)__objc_xmalloc(sizeof(struct sindex));    memcpy( *the_index,old_index, sizeof(struct sindex));    (*the_index)->version = array->version;    the_bucket = &((*the_index)->buckets[boffset]);    nindices += 1;      }#endif /* OBJC_SPARSE3 */  /* next, perform lazy allocation/copy of the bucket if needed */  if ((*the_bucket) == array->empty_bucket) {    /* The bucket was previously empty (or something like that), */    /* allocate a new.  This is the effect of `lazy' allocation */      *the_bucket = (struct sbucket*)__objc_xmalloc(sizeof(struct sbucket));    memcpy((void *) *the_bucket, (const void*)array->empty_bucket, sizeof(struct sbucket));    (*the_bucket)->version = array->version;    nbuckets += 1;  } else if ((*the_bucket)->version != array->version) {    /* Perform lazy copy. */    struct sbucket* old_bucket = *the_bucket;    *the_bucket = (struct sbucket*)__objc_xmalloc(sizeof(struct sbucket));    memcpy( *the_bucket,old_bucket, sizeof(struct sbucket));    (*the_bucket)->version = array->version;    nbuckets += 1;  }  (*the_bucket)->elems[eoffset] = element;}voidsarray_at_put_safe(struct sarray* array, sidx index, void* element){  if(soffset_decode(index) >= array->capacity)    sarray_realloc(array, soffset_decode(index)+1);  sarray_at_put(array, index, element);}struct sarray* sarray_new (int size, void* default_element){#ifdef OBJC_SPARSE3  size_t num_indices = ((size-1)/(INDEX_CAPACITY))+1;#else /* OBJC_SPARSE2 */  size_t num_indices = ((size-1)/BUCKET_SIZE)+1;#endif  int counter;  struct sarray* arr;  assert(size > 0);  /* Allocate core array */  arr = (struct sarray*) __objc_xmalloc(sizeof(struct sarray));  arr->version = 0;  narrays  += 1;    /* Initialize members */#ifdef OBJC_SPARSE3  arr->capacity = num_indices*INDEX_CAPACITY;  arr->indices = (struct sindex**)     __objc_xmalloc(sizeof(struct sindex*)*num_indices);  idxsize  += num_indices;  arr->empty_index = (struct sindex*) __objc_xmalloc(sizeof(struct sindex));  arr->empty_index->version = 0;  nindices += 1;#else /* OBJC_SPARSE2 */  arr->capacity = num_indices*BUCKET_SIZE;  arr->buckets = (struct sbucket**)     __objc_xmalloc(sizeof(struct sbucket*)*num_indices);  idxsize  += num_indices;#endif  arr->empty_bucket = (struct sbucket*) __objc_xmalloc(sizeof(struct sbucket));  arr->empty_bucket->version = 0;  nbuckets += 1;  arr->ref_count = 1;  arr->is_copy_of = (struct sarray*)0;    for (counter=0; counter<BUCKET_SIZE; counter++)    arr->empty_bucket->elems[counter] = default_element;#ifdef OBJC_SPARSE3  for (counter=0; counter<INDEX_SIZE; counter++)    arr->empty_index->buckets[counter] = arr->empty_bucket;  for (counter=0; counter<num_indices; counter++)    arr->indices[counter] = arr->empty_index;#else /* OBJC_SPARSE2 */  for (counter=0; counter<num_indices; counter++)    arr->buckets[counter] = arr->empty_bucket;#endif  return arr;}/* Reallocate the sparse array to hold `newsize' entries */void sarray_realloc(struct sarray* array, int newsize){#ifdef OBJC_SPARSE3  size_t old_max_index = (array->capacity-1)/INDEX_CAPACITY;  size_t new_max_index = ((newsize-1)/INDEX_CAPACITY);  size_t rounded_size = (new_max_index+1)*INDEX_CAPACITY;#else /* OBJC_SPARSE2 */  size_t old_max_index = (array->capacity-1)/BUCKET_SIZE;  size_t new_max_index = ((newsize-1)/BUCKET_SIZE);  size_t rounded_size = (new_max_index+1)*BUCKET_SIZE;#endif  int counter;  assert(newsize > 0);  /* The size is the same, just ignore the request */  if(rounded_size == array->capacity)    return;  assert(array->ref_count == 1);	/* stop if lazy copied... */  if(rounded_size < array->capacity)     {      /* update capacity */      array->capacity = rounded_size;      /* free buckets above new_max_index */      for(counter = old_max_index; counter > new_max_index; counter-- ) {#ifdef OBJC_SPARSE3	struct sindex* idx = array->indices[counter];	if((idx != array->empty_index) && (idx->version == array->version)) {	  int c2; 	  for(c2=0; c2<INDEX_SIZE; c2++) {	    struct sbucket* bkt = idx->buckets[c2];	    if((bkt != array->empty_bucket) && (bkt->version == array->version))	      {		free(bkt);		nbuckets -= 1;	      }	  }	  free(idx);	  nindices -= 1;	}#else /* OBJC_SPARSE2 */	struct sbucket* bkt = array->buckets[counter];	if ((bkt != array->empty_bucket) && (bkt->version == array->version))	  {	    free(bkt);	    nbuckets -= 1;	  }#endif      }	  #ifdef OBJC_SPARSE3      /* realloc to free the space above new_max_index */      array->indices = (struct sindex**)	__objc_xrealloc(array->indices, 			(new_max_index+1)*sizeof(struct sindex*));#else /* OBJC_SPARSE2 */      array->buckets = (struct sbucket**)	__objc_xrealloc(array->buckets, 			(new_max_index+1)*sizeof(struct sbucket*));#endif            idxsize -= (old_max_index-new_max_index);      return;    }  /* We are asked to extend the array -- reallocate the bucket table, */  /* and insert empty_bucket in newly allocated places. */  if(rounded_size > array->capacity)     {      /* update capacity */      array->capacity = rounded_size;#ifdef OBJC_SPARSE3      /* realloc to make room in table above old_max_index */      array->indices = (struct sindex**)	__objc_xrealloc(array->indices, 			(new_max_index+1)*sizeof(struct sindex*));      /* reset entries above old_max_index to empty_bucket */      for(counter = old_max_index+1; counter <= new_max_index; counter++)	array->indices[counter] = array->empty_index;#else /* OBJC_SPARSE2 */      /* realloc to make room in table above old_max_index */      array->buckets = (struct sbucket**)	__objc_xrealloc(array->buckets, 			(new_max_index+1)*sizeof(struct sbucket*));      /* reset entries above old_max_index to empty_bucket */      for(counter = old_max_index+1; counter <= new_max_index; counter++)	array->buckets[counter] = array->empty_bucket;#endif      idxsize += (new_max_index-old_max_index);      return;    }}/* Free a sparse array allocated with sarray_new */void sarray_free(struct sarray* array) {#ifdef OBJC_SPARSE3  size_t old_max_index = (array->capacity-1)/INDEX_CAPACITY;#else  size_t old_max_index = (array->capacity-1)/BUCKET_SIZE;#endif  int counter = 0;  assert(array->ref_count != 0);	/* Freed multiple times!!! */  if(--(array->ref_count) != 0)	/* There exists copies of me */    return;  if((array->is_copy_of) && ((array->is_copy_of->ref_count - 1) == 0))    sarray_free(array->is_copy_of);  /* Free all entries that do not point to empty_bucket */  for(counter = 0; counter <= old_max_index; counter++ ) {#ifdef OBJC_SPARSE3    struct sindex* idx = array->indices[counter];    if((idx != array->empty_index) && (idx->version == array->version)) {      int c2;       for(c2=0; c2<INDEX_SIZE; c2++) {	struct sbucket* bkt = idx->buckets[c2];	if((bkt != array->empty_bucket) && (bkt->version == array->version))	  {	    free(bkt);	    nbuckets -= 1;	  }      }      free(idx);      nindices -= 1;    }#else /* OBJC_SPARSE2 */    struct sbucket* bkt = array->buckets[counter];    if ((bkt != array->empty_bucket) && (bkt->version == array->version))      {	free(bkt);	nbuckets -= 1;      }#endif  }	#ifdef OBJC_SPARSE3    /* free empty_index */  if(array->empty_index->version == array->version) {    free(array->empty_index);    nindices -= 1;  }#endif  /* free empty_bucket */  if(array->empty_bucket->version == array->version) {    free(array->empty_bucket);    nbuckets -= 1;  }#ifdef OBJC_SPARSE3  /* free bucket table */  free(array->indices);  idxsize -= (old_max_index+1);#else  /* free bucket table */  free(array->buckets);  idxsize -= (old_max_index+1);#endif  /* free array */  free(array);  narrays -= 1;}/* This is a lazy copy.  Only the core of the structure is actually *//* copied.   */struct sarray* sarray_lazy_copy(struct sarray* oarr){#ifdef OBJC_SPARSE3  size_t num_indices = ((oarr->capacity-1)/INDEX_CAPACITY)+1;#else /* OBJC_SPARSE2 */  size_t num_indices = ((oarr->capacity-1)/BUCKET_SIZE)+1;#endif  struct sarray* arr;  /* Allocate core array */  arr = (struct sarray*) __objc_xmalloc(sizeof(struct sarray));  memcpy( arr,oarr, sizeof(struct sarray));  arr->version = oarr->version + 1;  arr->is_copy_of = oarr;  oarr->ref_count += 1;  arr->ref_count = 1;  #ifdef OBJC_SPARSE3  /* Copy bucket table */  arr->indices = (struct sindex**)     __objc_xmalloc(sizeof(struct sindex*)*num_indices);  memcpy( arr->indices,oarr->indices, 	sizeof(struct sindex*)*num_indices);#else   /* Copy bucket table */  arr->buckets = (struct sbucket**)     __objc_xmalloc(sizeof(struct sbucket*)*num_indices);  memcpy( arr->buckets,oarr->buckets, 	sizeof(struct sbucket*)*num_indices);#endif  idxsize += num_indices;  narrays += 1;  return arr;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产在线精品一区二区夜色 | 亚洲欧美一区二区视频| 欧美午夜一区二区三区免费大片| 久久99精品国产| 日韩精品国产欧美| 久久久91精品国产一区二区精品| 日韩一区二区三区四区| 欧美日韩精品电影| 欧美影片第一页| 色综合久久99| 色哟哟国产精品免费观看| 精品一二线国产| 免播放器亚洲一区| 三级一区在线视频先锋| 亚洲国产综合色| 亚洲高清免费观看高清完整版在线观看| 国产亚洲一本大道中文在线| 久久综合色综合88| 日韩午夜在线影院| 日韩精品专区在线| 精品少妇一区二区三区视频免付费 | 日韩精品91亚洲二区在线观看 | 56国语精品自产拍在线观看| 91九色02白丝porn| 色94色欧美sute亚洲13| 国产精品911| 国产成人在线观看免费网站| 国产精品一区专区| 国产乱一区二区| 成人av网在线| 91性感美女视频| 日本丰满少妇一区二区三区| av电影一区二区| 91在线看国产| 欧美日韩国产美| 欧美日韩国产经典色站一区二区三区 | 欧美国产激情二区三区 | 日本成人在线不卡视频| 亚洲国产精品久久不卡毛片| 香蕉乱码成人久久天堂爱免费| 亚洲va天堂va国产va久| 精品一区二区三区欧美| 国产成人免费网站| 欧美最猛黑人xxxxx猛交| 日韩精品专区在线影院观看| 中文字幕精品三区| 午夜伊人狠狠久久| 国产精品77777| 在线视频一区二区免费| 日韩午夜电影在线观看| 国产欧美精品区一区二区三区| 亚洲人成亚洲人成在线观看图片| 日韩国产欧美视频| 国产成人欧美日韩在线电影| 91免费在线视频观看| 日韩午夜电影在线观看| 亚洲国产精品精华液网站| 9i在线看片成人免费| 精品成a人在线观看| 丝袜诱惑制服诱惑色一区在线观看| 91视频国产资源| 国产精品国产三级国产a | 成人av电影观看| 久久免费视频一区| 精品一区二区免费在线观看| 制服丝袜亚洲色图| 亚洲成人动漫精品| 欧美日韩精品福利| 午夜伦理一区二区| 欧美性生活影院| 午夜激情综合网| 欧美久久高跟鞋激| 亚洲一二三四区不卡| 欧美亚洲国产一区二区三区va| 亚洲美女视频在线| 欧美自拍偷拍一区| 亚洲一区中文日韩| 欧美日韩国产另类一区| 免费一级片91| 久久一二三国产| 国产99久久久国产精品潘金网站| 国产欧美一区二区精品久导航| 国产一区二区免费看| 日本一区免费视频| 色综合久久久久综合体桃花网| 一区二区三区在线视频播放| 在线观看国产91| 日本女人一区二区三区| 欧美不卡一区二区三区| 国产福利91精品一区二区三区| 国产精品久久久久影院老司| 91蜜桃婷婷狠狠久久综合9色| 一区二区在线免费| 日韩写真欧美这视频| 国产福利一区二区三区视频在线| 1024成人网色www| 欧美调教femdomvk| 狠狠色丁香久久婷婷综| 日本一区二区成人在线| 91国偷自产一区二区开放时间| 五月激情综合色| 国产日韩精品一区| 欧美性大战久久久久久久蜜臀| 蜜桃免费网站一区二区三区| 国产日韩欧美一区二区三区乱码| 色猫猫国产区一区二在线视频| 青青草国产精品亚洲专区无| 国产精品午夜春色av| 欧美精品乱码久久久久久按摩| 国产成人aaaa| 午夜伊人狠狠久久| 国产女人水真多18毛片18精品视频| 欧洲一区二区三区在线| 国产一区999| 亚洲国产日韩一级| 欧美国产精品一区二区三区| 欧美美女bb生活片| 一本到不卡精品视频在线观看| 精品综合久久久久久8888| 国产精品二三区| 欧美不卡在线视频| 欧美精品久久一区| 色婷婷av久久久久久久| 国产盗摄女厕一区二区三区| 男女性色大片免费观看一区二区| 亚洲日本va午夜在线电影| 精品国产在天天线2019| 欧美日韩午夜在线| 一本久久综合亚洲鲁鲁五月天| 国产一区二区日韩精品| 日本vs亚洲vs韩国一区三区二区| 一区二区在线观看视频| 久久精品免视看| 日韩欧美亚洲国产另类| 欧美日韩二区三区| 在线观看精品一区| 色哟哟一区二区| 成人激情免费视频| 国产成人精品影视| 国产美女视频一区| 毛片av一区二区| 午夜精品久久久久久| 亚洲欧美视频在线观看视频| 亚洲国产精品黑人久久久| 久久蜜臀精品av| 久久久精品tv| 国产欧美日本一区二区三区| 国产天堂亚洲国产碰碰| 久久久国产精品午夜一区ai换脸| 精品av久久707| 久久久五月婷婷| 久久精品日韩一区二区三区| 国产亚洲va综合人人澡精品| 欧美精品一区二区三区在线播放| 欧美大胆人体bbbb| 欧美成人vr18sexvr| 精品sm捆绑视频| 亚洲国产精品传媒在线观看| 中文字幕一区日韩精品欧美| 亚洲精品视频免费观看| 夜夜嗨av一区二区三区网页| 午夜欧美在线一二页| 秋霞影院一区二区| 精品写真视频在线观看| 国产成人精品在线看| 91免费看片在线观看| 欧美日韩在线观看一区二区| 欧美精品久久99| 久久久不卡网国产精品一区| 国产精品免费aⅴ片在线观看| 亚洲精品国产精华液| 亚洲成av人综合在线观看| 激情亚洲综合在线| eeuss影院一区二区三区| 欧美熟乱第一页| www成人在线观看| 亚洲天堂福利av| 美女在线视频一区| 99久久精品国产一区二区三区| 欧美人牲a欧美精品| 久久久久久久久久久久电影 | 亚洲天天做日日做天天谢日日欢 | 亚洲一二三四在线观看| 久久超级碰视频| 91麻豆高清视频| 日韩一区二区免费在线观看| 国产精品午夜久久| 亚洲成人资源在线| 成人a免费在线看| 欧美一级国产精品| 亚洲免费在线观看| 国产在线精品一区二区三区不卡| 91色乱码一区二区三区| 日韩视频一区在线观看| 亚洲精品ww久久久久久p站| 精品一区二区三区在线播放| 色综合久久综合| 国产日韩av一区二区| 三级不卡在线观看| 91蜜桃婷婷狠狠久久综合9色|