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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? core.c

?? 早期freebsd實(shí)現(xiàn)
?? C
?? 第 1 頁 / 共 3 頁
字號(hào):
/* Method dispatcher and class-object creator for Objective C.   Copyright (C) 1992 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, 675 Mass Ave, Cambridge, MA 02139, 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 "tconfig.h"#include "assert.h"#include <ctype.h>#include "gstdarg.h"#include <stdio.h>#include "gstddef.h"#include "hash.h"#include "objc.h"#include "objc-proto.h"#define MODULE_HASH_SIZE 32   /* Initial module hash table size.				 Value doesn't really matter.  */#define CLASS_HASH_SIZE 32    /* Initial number of buckets size of				 class hash table.  Value doesn't				 really matter.  *//* Forward declare some functions.  */id            objc_object_create (Class_t),              objc_object_dispose (id),              objc_object_realloc (id, unsigned int),              objc_object_copy (id);void          objc_error (id object, const char *fmt, va_list ap);static id     nil_method (id, SEL, ...);static id     return_error_static (id, SEL, ...);static IMP    handle_runtime_error (id, SEL);static void   initialize_dispatch_tables (void);static SEL    record_selector (const char*);static void   record_methods_from_class (Class_t);static void   record_methods_from_list (MethodList_t);static void   initialize_class (const char*);/* * This is a hash table of Class_t structures.  * * At initialization the executable is searched for all Class_t structures.  * Since these structures are created by the compiler they are therefore * located in the TEXT segment.   * * A identical structure is allocated from the free store and initialized from * its TEXT counterpart and placed in the hash table using the TEXT part as * its key.  * * Since the free store structure is now writable, additional initialization * takes place such as its "info" variable, method cache allocation, and * linking of all of its method and ivar lists from multiple implementations.  */cache_ptr	class_hash_table = NULL;/* * This variable is a flag used within the messaging routines.  If a * application sets it to !0 then the messager will print messages sent to * objects.  */BOOL  objc_trace = NO;/* This mutex provides a course lock for method dispatch.  */MUTEX	runtimeMutex;/* * This hash table is used by the initialization routines.  When the * constructor function (__objc_execClass) is called it is passed a pointer * to a module structure.  That pointer is stored in this table and its * contents are processed in __objcInit.  */cache_ptr    module_hash_table = NULL;/* * This hash table is used in the constructor subroutine to hold pointers  * to categories that have not been attached to a class.  Constructors are * received in a random order.  Files may contain category implementation * of objects whose constructor hasn't been executed yet.  Therefore,  * there is no object to attach the categories. * * This hash table holds pointers to categories that haven't been * attached to objects.  As objects are processed the category hash * table is searched for attachments.  If a category is found for the * object it is attached to the object and deleted from the hash table. */cache_ptr    unclaimed_category_hash_table = NULL;/* * This flag is used by the messager routines to determine if the run-time * has been initialized.  If the run-time isn't initialized then a * initialization clean up routine is called.  */static int	initialized = 0;/* * Records that hold pointers to arrays of records.  The terminal records are * method implementations.  * * The size of the first record is the number of unique classes in the * executable.  The second is the number of selectors.  * * The second record conatins methods that are visible to the class -- that is, * methods that are not overriden from the classt to the root object.  * * The cache pointers of class and meta class structures point to one of these * records.  */static struct record *instance_method_record	= NULL;static struct record *factory_method_record	= NULL;/* * This structure is used to translate between selectors and their ASCII * representation.  A NULL terminated array of char*, * OBJC_SELECTOR_REFERENCES, is passed to the constructor routine:  * __objc_execClass. That routine places entries from that array into this * structure.  The location within OBJC_SELECTOR_REFERENCES where the string * was taken from is replaced with a small integer, the index into the array * inside selectorTranslateTable.  That integer then becomes the selector.  * * Selectors begin at 1 to numEntries.  A selector outside of that range is * considered an error.  The selector integers are used as the first index * into the instance_method_record and factory_method_record arrays.  */static struct record *selector_record = NULL;/* * This data structure is used in the special case where usual fatal error * functions are called but have been overridden in a class.  The value * returned by that function is returned to the calling object.  error_static * holds the returned value until it is retrieved by return_error_static * which returns it to the calling function.  */static id	error_static;/* Given a class and selector, return the selector's implementation.  */static inline IMP	get_imp (Class_t class, SEL sel){  IMP	imp = NULL;  imp = record_get (getClassNumber (class),		    record_get ((unsigned int)sel, *class->cache));  return imp;}static voiderror (msg, arg1, arg2)     char *msg, *arg1, *arg2;{#if 0 /* There is no portable way to get the program name.  Too bad.  */  fprintf (stderr, "%s: ", programname);#endif  fprintf (stderr, msg, arg1, arg2);  fprintf (stderr, "\n");}static voidfatal (msg, arg1, arg2)     char *msg, *arg1, *arg2;{  error (msg, arg1, arg2);  exit (1);}static void *xmalloc (unsigned int size){  void *ptr = (void *) malloc (size);  if (ptr == 0)    fatal ("virtual memory exceeded");  return ptr;}static void *xcalloc (unsigned int size, unsigned int units){  void *ptr = (void *) calloc (size, units);  if (ptr == 0)    fatal ("virtual memory exceeded");  return ptr;}void *__objc_xmalloc (unsigned int size){  void *ptr = (void *) malloc (size);  if (ptr == 0)    fatal ("virtual memory exceeded");  return ptr;}void *__objc_xrealloc (void *optr, unsigned int size){  void *ptr = (void *) realloc (optr, size);  if (ptr == 0)    fatal ("virtual memory exceeded");  return ptr;}void *__objc_xcalloc (unsigned int size, unsigned int units){  void *ptr = (void *) calloc (size, units);  if (ptr == 0)    fatal ("virtual memory exceeded");  return ptr;}static inline char *my_strdup (const char *str){  char *new = (char *) xmalloc (strlen (str) + 1);  strcpy (new, str);	  return new;}/* * This function is called by constructor functions generated for each module * compiled.   * * The purpose of this function is to gather the module pointers so that they * may be processed by the initialization clean up routine.  */void __objc_execClass (Module_t module){  /* Has we processed any constructors previously?      Flag used to indicate that some global data structures     need to be built.  */  static BOOL previous_constructors = 0;  Symtab_t    symtab = module->symtab;  Class_t     object_class;  node_ptr node;  SEL         *(*selectors)[] = (SEL *(*)[])symtab->refs;  int         i;  BOOL        incomplete = 0;  assert (module->size == sizeof (Module));  DEBUG_PRINTF ("received load module: %s\n",module->name);  /* Header file data structure hack test.  */  assert (sizeof (Class) == sizeof (MetaClass));  /* On the first call of this routine, initialize     some data structures.  */  if (!previous_constructors) {    /* Enable malloc debugging. This'll slow'er down! */#if defined (DEBUG) && defined (NeXT)    malloc_debug (62);#endif    /* Allocate and initialize the mutex.  */    MUTEX_ALLOC (&runtimeMutex);    MUTEX_INIT (runtimeMutex);    /* Allocate the module hash table.  */    module_hash_table      = hash_new (MODULE_HASH_SIZE, (hash_func_type)hash_ptr,		  (compare_func_type)compare_ptrs);    /* Allocate a table for unclaimed categories.  */    unclaimed_category_hash_table      = hash_new (16, (hash_func_type)hash_ptr,		  (compare_func_type)compare_ptrs);    /* Allocate a master selector table if it doesn't exist.  */    selector_record = record_new ();        previous_constructors = 1;  }  /* Save the module pointer for later processing.  */  hash_add (&module_hash_table, module, module);  /* Parse the classes in the load module and gather selector information.  */  DEBUG_PRINTF ("gathering selectors from module: %s\n",module->name);  for (i = 0; i < symtab->cls_def_cnt; ++i) {    Class_t class = (Class_t)symtab->defs[i];    /* Make sure we have what we think.  */    assert (class->info & CLS_CLASS);    assert (class->class_pointer->info & CLS_META);    DEBUG_PRINTF ("phase 1, processing class: %s\n", class->name);    /* Store the class in the class table and assign class numbers.  */    addClassToHash (class);    /* Store all of the selectors in the class and meta class.  */    record_methods_from_class (class);    record_methods_from_class ((Class_t)class->class_pointer);    /* Initialize the cache pointers.  */    class->cache = &instance_method_record;    class->class_pointer->cache = &factory_method_record;  }  /* Replace referenced selectors.  */  for (i=0; i < symtab->sel_ref_cnt; ++i)    (*selectors)[i] = record_selector ((const char*)(*selectors)[i]);  /* Try to build the class hierarchy and initialize the data structures.  */  object_class = objc_getClass ("Object");  if (object_class) {        /* Make sure we have what we think we have.  */    assert (object_class->class_pointer->info & CLS_META);    assert (object_class->info & CLS_CLASS);        /* Connect the classes together (at least as much as we can).  */     for (node = hash_next (class_hash_table, NULL); node;	 node = hash_next (class_hash_table, node)) {      Class_t class1 = node->value;      /* Make sure we have what we think we have.  */      assert (class1->info & CLS_CLASS);      assert (class1->class_pointer->info & CLS_META);      /* The class_pointer of all meta classes point to Object's meta class.  */      class1->class_pointer->class_pointer = object_class->class_pointer;       /* Assign super class pointers */      if (class1->super_class) {	Class_t aSuperClass = objc_getClass ((char*)class1->super_class);	if (aSuperClass) {	  DEBUG_PRINTF ("making class connections for: %s\n", 			class1->name);	  class1->super_class = aSuperClass; 	  if (class1->class_pointer->super_class)	    class1->class_pointer->super_class = class1->super_class->class_pointer;	  /* Mark the class as initialized.  */	  class1->info |= CLS_RTI;	} else	  /* Couldn't find the class's super class.  */	  incomplete = 1;      }    }  } else    /* Couldn't find class Object.  */    incomplete = 1;  /* Process category information from the module.  */  for (i = 0; i < symtab->cat_def_cnt; ++i) {    Category_t  category = symtab->defs[i + symtab->cls_def_cnt];    Class_t     class = objc_getClass (category->class_name);    /* If the class for the category exists then append its       methods.  */    if (class) {      DEBUG_PRINTF ("processing categories from (module,object): %s, %s\n",		    module->name, 		    class_getClassName (class));      /* Do instance methods.  */      if (category->instance_methods)        addMethodsToClass (class, category->instance_methods);      /* Do class methods.  */      if (category->class_methods)        addMethodsToClass ((Class_t)class->class_pointer, category->class_methods);    } else {      /* The object to which the category methods belong can't	 be found.  Save the information.  */      hash_add (&unclaimed_category_hash_table, category, category);      incomplete = 1;    }  }  /* Scan the unclaimed category hash.       Attempt to attach any unclaimed categories to objects.  */  for (node = hash_next (unclaimed_category_hash_table, NULL); node;       node = hash_next (unclaimed_category_hash_table, node)) {    Category_t  category = node->value;    Class_t     class = objc_getClass (category->class_name);    if (class) {      DEBUG_PRINTF ("attaching stored categories to object: %s\n",		    class_getClassName (class));      /* Delete this class from the hash table.  */      hash_remove (unclaimed_category_hash_table, category);      node = NULL;      if (category->instance_methods)	addMethodsToClass (class, category->instance_methods);      if (category->class_methods)	addMethodsToClass ((Class_t)class->class_pointer,			   category->class_methods);    } else      incomplete = 1;  }  /* Can we finish the run time initialization? */  if (!incomplete) {    initialize_dispatch_tables ();    /* Debug run time test.       We're initialized! */    initialized = 1;    /* Print out class tables if debugging.  */    DEBUG_PRINTF ("dump of class tables from objcInit\n");    debug_dump_classes ();  }}IMP  objc_msgSend (id receiver, SEL sel){  /*   * A method is always called by the compiler.  If a method wasn't   * found then supply a default.    */  IMP  imp = nil_method;  /* The run time must be initialized at this point.     Otherwise we get a message sent to a object with a bogus selector.  */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
韩国三级电影一区二区| 国产精品亚洲午夜一区二区三区| 久久久久久久免费视频了| 一本色道久久综合精品竹菊| 麻豆91小视频| 亚洲亚洲精品在线观看| 中文在线资源观看网站视频免费不卡| 欧美日韩精品一区二区天天拍小说| 国产一区二区三区在线看麻豆| 亚洲一区在线观看网站| 中文字幕不卡的av| 欧美变态tickle挠乳网站| 色播五月激情综合网| 国产精品一区二区x88av| 免费日本视频一区| 亚洲国产成人av网| 一区二区三区资源| 亚洲女女做受ⅹxx高潮| 久久精品男人天堂av| 欧美一区二区女人| 欧美高清激情brazzers| 色先锋久久av资源部| 成人听书哪个软件好| 国产乱妇无码大片在线观看| 奇米精品一区二区三区在线观看一| 亚洲国产综合色| 亚洲一区在线看| 一区二区三区精密机械公司| 日韩一区欧美小说| 18欧美乱大交hd1984| ...av二区三区久久精品| 中文字幕亚洲在| 成人欧美一区二区三区小说| 中文字幕成人在线观看| 国产精品久久久久婷婷二区次| 国产三级精品三级在线专区| 久久日韩粉嫩一区二区三区| 精品国产麻豆免费人成网站| 日韩午夜精品电影| 欧美精品一区二区三区在线播放| 精品美女一区二区三区| 久久综合色综合88| 久久精品男人天堂av| 国产精品色在线| 国产日产欧美精品一区二区三区| 国产性色一区二区| 欧美国产精品专区| 国产精品灌醉下药二区| 亚洲精品中文字幕乱码三区| 亚洲老司机在线| 亚洲一二三级电影| 日韩高清在线一区| 美女高潮久久久| 国产一区二区三区观看| 风间由美中文字幕在线看视频国产欧美| 国产成人精品三级| 色婷婷综合中文久久一本| 欧美色图第一页| 日韩女优电影在线观看| 国产视频不卡一区| **欧美大码日韩| 亚洲午夜免费电影| 激情久久五月天| 成人午夜免费电影| 91在线视频18| 欧美人与z0zoxxxx视频| 欧美tickling挠脚心丨vk| 久久久久久综合| 18欧美乱大交hd1984| 亚洲一级在线观看| 精品一区二区三区在线观看国产 | av在线不卡网| 欧美亚洲丝袜传媒另类| 日韩女优电影在线观看| 中文字幕不卡一区| 一卡二卡欧美日韩| 捆绑调教美女网站视频一区| 国产美女在线精品| 91久久精品午夜一区二区| 欧美一卡二卡在线观看| 国产欧美精品一区二区三区四区| 亚洲精品一二三| 久久精品国产秦先生| 99久久婷婷国产精品综合| 精品视频在线免费看| 欧美极品xxx| 视频一区国产视频| 99久久99久久精品免费观看| 欧美一区二区三区精品| 亚洲欧洲av色图| 韩国一区二区视频| 国内精品国产三级国产a久久| 色婷婷综合在线| 国产性色一区二区| 日韩电影免费在线观看网站| av亚洲精华国产精华精华| 欧美一级黄色录像| 一区二区三区在线观看欧美| 国产一区三区三区| 欧美日韩国产高清一区二区 | 亚洲欧美日韩国产成人精品影院| 日韩精品电影在线观看| 99久久久无码国产精品| 欧美tickling网站挠脚心| 亚洲国产日日夜夜| 成人sese在线| 久久久亚洲午夜电影| 日本最新不卡在线| 欧美日韩你懂的| 伊人开心综合网| 成人黄色国产精品网站大全在线免费观看| 91精品国产欧美一区二区| 亚洲精品美国一| 成人福利视频网站| 久久亚洲二区三区| 美女一区二区视频| 欧美精品久久久久久久多人混战| 综合激情网...| 国产suv精品一区二区三区| 日韩欧美综合在线| 日韩精品乱码免费| 欧美在线视频全部完| 亚洲免费观看高清完整版在线观看 | 国产91在线观看| 精品成人一区二区三区| 日韩精品一二三四| 69成人精品免费视频| 性欧美疯狂xxxxbbbb| 日本二三区不卡| 亚洲最新视频在线观看| 色哟哟在线观看一区二区三区| 国产精品久久福利| 不卡一区二区三区四区| 国产精品免费网站在线观看| 国产成人综合网站| 久久蜜桃av一区精品变态类天堂| 久久99在线观看| 91精品国产入口在线| 日本欧美久久久久免费播放网| 欧美一区二区三区在线观看| 麻豆精品视频在线观看免费| 日韩精品一区二区三区在线观看 | 国产·精品毛片| 国产色一区二区| 成人一道本在线| 中文字幕亚洲成人| 在线一区二区三区做爰视频网站| 亚洲一区二区三区免费视频| 欧美日韩在线精品一区二区三区激情| 亚洲成人1区2区| 欧美一二三区精品| 国产综合成人久久大片91| 国产欧美一区二区三区在线看蜜臀| 国产91富婆露脸刺激对白| 亚洲图片欧美激情| 欧美丰满美乳xxx高潮www| 日韩电影免费一区| 国产亚洲精久久久久久| 99在线精品观看| 午夜免费久久看| 久久综合久久鬼色| www.一区二区| 五月天欧美精品| 国产亚洲欧美中文| 色成人在线视频| 久久精品国产精品亚洲综合| 久久一二三国产| 91看片淫黄大片一级在线观看| 亚洲国产aⅴ天堂久久| 欧美电影免费提供在线观看| aa级大片欧美| 日韩成人精品在线| 亚洲国产精品成人综合色在线婷婷| 国产a视频精品免费观看| 99re这里只有精品视频首页| 亚洲国产中文字幕在线视频综合| 在线一区二区三区四区| 另类小说综合欧美亚洲| 中文字幕一区日韩精品欧美| 欧美日本乱大交xxxxx| 成人午夜碰碰视频| 奇米一区二区三区| 亚洲色图欧洲色图婷婷| 精品乱人伦小说| 在线区一区二视频| 国内久久精品视频| 亚洲成a人在线观看| 日本一区二区动态图| 欧美美女视频在线观看| www.色精品| 国内成+人亚洲+欧美+综合在线| 亚洲综合色成人| 国产无人区一区二区三区| 在线不卡的av| 色综合久久99| 国产成人h网站| 日韩中文字幕区一区有砖一区| 国产精品美女久久久久高潮| 精品人伦一区二区色婷婷| 欧美视频一区二区在线观看|