Remove the test for whether the uninstalled dtable is present from

objc_msgSend().  If the class does have the uninstalled dtable, then every
method will be the nil slot and so, after navigating the dtable we will
discover that it is nil and go into the slow path.  The cost of this change is
a slight slowdown in the first message sent to every class.  The benefit is
that every subsequent message send needs one fewer memory access and one fewer
conditional jump.
main
theraven 13 years ago
parent a6b6a9779c
commit d80689e3e4

@ -15,8 +15,6 @@
1: # classLoaded
movl \sel(%esp), %ecx
mov DTABLE_OFFSET(%eax), %eax # Load the dtable from the class
cmpl uninstalled_dtable, %eax # If this is not (yet) a valid dtable
je 5f # Do a slow lookup
mov (%ecx), %ecx # Load the selector index

@ -20,8 +20,6 @@
mov (\receiver), %r10 # Load the dtable from the class
1: # classLoaded
mov DTABLE_OFFSET(%r10), %r10 # Load the dtable from the class
cmpq uninstalled_dtable(%rip), %r10 # If this is not (yet) a valid dtable
je 5f # Do a slow lookup
push %r12
push %r13

Loading…
Cancel
Save