Implement NSDate as a small object (tagged pointer) - clang/libobjc2 only (#451)

* Implement GSSmallObject Class

* Remove private concrete class access

* Change secondary bias

* NSDate: Get interval from rhs object in comparison

* Add prefix to CONCRETE_CLASS_NAME  macro
This commit is contained in:
Hugo Melder 2024-10-28 03:52:44 -07:00 committed by GitHub
parent 1cb846e607
commit 8fd2c06ddd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 710 additions and 315 deletions

View file

@ -35,9 +35,8 @@
#import "Foundation/NSRunLoop.h"
#import "Foundation/NSInvocation.h"
@class NSGDate;
@interface NSGDate : NSObject // Help the compiler
@end
#import "NSDatePrivate.h"
static Class NSDate_class;
/**
@ -58,7 +57,7 @@ static Class NSDate_class;
{
if (self == [NSTimer class])
{
NSDate_class = [NSGDate class];
NSDate_class = [DATE_CONCRETE_CLASS_NAME class];
}
}