Differences From Artifact [17dd02bdde]:
- File src/runtime/protocol.m — part of check-in [2d8aa8b1e6] at 2018-04-29 19:26:23 on branch trunk — runtime: Specify m68k registers for most functions (user: js, size: 2184) [annotate] [blame] [check-ins using]
To Artifact [35e4a9c6cb]:
- File
src/runtime/protocol.m
— part of check-in
[482698c5be]
at
2018-05-06 21:39:06
on branch trunk
— runtime: Make Amiga library work with -fbaserel
This currently uses __saveds on all exported functions for simplicity.
As an optimization, __saveds can be removed from some functions later
after careful verification that no code path starting from that function
accesses any data. (user: js, size: 2219) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
21 22 23 24 25 26 27 | #import "ObjFW_RT.h" #import "private.h" @implementation Protocol @end | | | | | | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | #import "ObjFW_RT.h" #import "private.h" @implementation Protocol @end const char *__saveds protocol_getName(Protocol *p OBJC_M68K_REG("a0")) { return p->name; } bool __saveds protocol_isEqual(Protocol *a OBJC_M68K_REG("a0"), Protocol *b OBJC_M68K_REG("a1")) { return (strcmp(protocol_getName(a), protocol_getName(b)) == 0); } bool __saveds protocol_conformsToProtocol(Protocol *a OBJC_M68K_REG("a0"), Protocol *b OBJC_M68K_REG("a1")) { if (protocol_isEqual(a, b)) return true; for (struct objc_protocol_list *pl = a->protocol_list; pl != NULL; pl = pl->next) for (long i = 0; i < pl->count; i++) if (protocol_conformsToProtocol(pl->list[i], b)) return true; return false; } bool __saveds class_conformsToProtocol(Class cls OBJC_M68K_REG("a0"), Protocol *p OBJC_M68K_REG("a1")) { struct objc_category **cats; if (cls == Nil) return false; |
︙ | ︙ |