ObjFW  Diff

Differences From Artifact [b380561a47]:

To Artifact [b5cdf1c42f]:


11
12
13
14
15
16
17


18
19
20
21
22
23
24
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"



struct objc_abi_class {
	struct objc_abi_class *metaclass;
	const char *superclass;
	const char *name;
	unsigned long version;
	unsigned long info;







>
>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include "platform.h"

struct objc_abi_class {
	struct objc_abi_class *metaclass;
	const char *superclass;
	const char *name;
	unsigned long version;
	unsigned long info;
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
	uint8_t i = idx >> 8;
	uint8_t j = idx;

	return dtable->buckets[i]->buckets[j];
#endif
}

#if defined(__ELF__)
# if defined(__x86_64__) || defined(__amd64__) || defined(__i386__) || \
	defined(__ppc__) || defined(__PPC__) || defined(__arm__) || \
	defined(__ARM__)
#  define OF_ASM_LOOKUP
# endif
# if (defined(_MIPS_SIM) && _MIPS_SIM == _ABIO32) || \
	(defined(__mips_eabi) && _MIPS_SZPTR == 32)
#  define OF_ASM_LOOKUP
# endif
# if defined(__sparc__) && !defined(__arch64__)
#  define OF_ASM_LOOKUP
# endif
#elif defined(__MACH__)
# if defined(__x86_64__) || defined(__ppc__)
#  define OF_ASM_LOOKUP
# endif
#elif defined(_WIN32)
# if defined(__x86_64__) || defined(__i386__)
#  define OF_ASM_LOOKUP
# endif
#endif

#define OBJC_ERROR(...)							\
	{								\
		fprintf(stderr, "[objc @ " __FILE__ ":%d] ", __LINE__);	\
		fprintf(stderr, __VA_ARGS__);				\
		fputs("\n", stderr);					\
		abort();						\
	}







|
<
|
|


<
<
<
<
<
<
<
|
|


|
|











180
181
182
183
184
185
186
187

188
189
190
191







192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
	uint8_t i = idx >> 8;
	uint8_t j = idx;

	return dtable->buckets[i]->buckets[j];
#endif
}

#if defined(OF_ELF)

# if defined(OF_X86_64) || defined(OF_X86) || defined(OF_POWERPC) || \
	defined(OF_ARM) || defined(OF_MIPS) || defined(OF_SPARC)
#  define OF_ASM_LOOKUP
# endif







#elif defined(OF_MACH_O)
# if defined(OF_X86_64) || defined(OF_POWERPC)
#  define OF_ASM_LOOKUP
# endif
#elif defined(OF_WINDOWS)
# if defined(OF_X86_64) || defined(OF_X86)
#  define OF_ASM_LOOKUP
# endif
#endif

#define OBJC_ERROR(...)							\
	{								\
		fprintf(stderr, "[objc @ " __FILE__ ":%d] ", __LINE__);	\
		fprintf(stderr, __VA_ARGS__);				\
		fputs("\n", stderr);					\
		abort();						\
	}