|
|
1.1 root 1: Must eliminate use of stdio.h; that loses when using GNU libc.
2: (It is ok to include stdio.h only when debugging,
3: for the sake of DEBUG_PRINTF.)
4: Can this be done? If not, how do we make this work?
5:
6: Eliminate the asserts in record.h.
7:
8: Rename the global functions in core.c to GNU-style names;
9: fix object.m at same time.
10:
11:
12: It is undesirable to use statics variables such as errorStatic in
13: handleRuntimeError--as dennisg noted. Do programs depend on error
14: handling to be compatible with what it is on the NeXT?
15:
16: For example, would it be ok for DoesNotRecognize to return
17: a method to be called, rather than a value to be returned?
18:
19: If that is not ok, I have other ideas, but they are harder to
20: implement.
21:
22:
23:
24: Why does dennisg say that object_getIvarAddress is not thread-safe?
25:
26:
27:
28: objc_msgSend can be faster.
29: 1. Delete the statement if (!theReceiver->isa).
30: Instead, set the isa field of a deallocated object
31: to point to a dummy class called "deallocated".
32: This class should have a vector of operations
33: at least as long as any class has had during this execution.
34: Every element of this vector should point to `abort'.
35: Don't bother to print a fancy message; that is a waste of effort.
36: For something impossible, abort is *exactly* the right thing to do.
37: 2. Is it really necessary to call initializeClass here?
38: Can't it be done in __objc_execClass, as soon as the class
39: is complete? If you can avoid doing this here, that is
40: one fewer statement to execute.
41: 3. Get rid of objc_trace.
42: 4. Don't check wether getIMP returns null.
43: There should never be a null in the method vector.
44: If the method is not defined, store in the vector
45: a fake method that will print the appropriate error.
46: With these changes, all you need is this:
47: if (theReceiver)
48: return getIMP (theReceiver->isa, aSel);
49: else
50: return nilMethodIMP;
51: which is something that could plausibly be open-coded in the future.
52:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.