⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 todo

📁 早期freebsd实现
💻
字号:
Must eliminate use of stdio.h; that loses when using GNU libc.(It is ok to include stdio.h only when debugging, for the sake of DEBUG_PRINTF.)Can this be done?  If not, how do we make this work?Eliminate the asserts in record.h.Rename the global functions in core.c to GNU-style names; fix object.m at same time.It is undesirable to use statics variables such as errorStatic inhandleRuntimeError--as dennisg noted.  Do programs depend on errorhandling to be compatible with what it is on the NeXT?For example, would it be ok for DoesNotRecognize to returna method to be called, rather than a value to be returned?If that is not ok, I have other ideas, but they are harder toimplement.Why does dennisg say that object_getIvarAddress is not thread-safe?objc_msgSend can be faster.1. Delete the statement  if (!theReceiver->isa).Instead, set the isa field of a deallocated objectto point to a dummy class called "deallocated".This class should have a vector of operationsat least as long as any class has had during this execution.Every element of this vector should point to `abort'.Don't bother to print a fancy message; that is a waste of effort.For something impossible, abort is *exactly* the right thing to do.2. Is it really necessary to call initializeClass here?Can't it be done in __objc_execClass, as soon as the classis complete?  If you can avoid doing this here, that isone fewer statement to execute.3. Get rid of objc_trace.4. Don't check wether getIMP returns null.There should never be a null in the method vector.If the method is not defined, store in the vectora fake method that will print the appropriate error.With these changes, all you need is this:  if (theReceiver)    return getIMP (theReceiver->isa, aSel);  else    return nilMethodIMP;which is something that could plausibly be open-coded in the future.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -