ObjFW  Changes On Branch 9a64964dd0f399ef

Changes In Branch 1.0 Through [9a64964dd0] Excluding Merge-Ins

This is equivalent to a diff from 39863b3503 to 9a64964dd0

2021-09-02
18:52
Merge trunk into 1.0 branch check-in: fb7b9709b8 user: js tags: 1.0
2021-05-01
02:39
Fix compiling for AmigaOS check-in: 171f3ba831 user: js tags: trunk
2021-04-30
23:06
Merge trunk into branch "sctp" check-in: a82e7f4b3d user: js tags: sctp
22:26
Merge trunk into branch "invoke-invocation" check-in: efca87b509 user: js tags: invoke-invocation
22:04
Merge trunk into branch "ofsock" check-in: 4eb272eb8b user: js tags: ofsock
21:56
Merge trunk into branch "asn1" check-in: 4507e0bee3 user: js tags: asn1
21:37
Merge trunk into 1.0 branch check-in: 9a64964dd0 user: js tags: 1.0
21:23
Make OFHashSeed private check-in: 39863b3503 user: js tags: trunk
21:15
OFTCPSocketSOCKS5Connector: Move state enum to .m check-in: f7abfde081 user: js tags: trunk
2021-04-25
20:01
Merge trunk into 1.0 branch check-in: b9744f93bf user: js tags: 1.0

Modified configure.ac from [efc36f0030] to [b26fbd3aeb].

1

2
3
4
5
6
7

8
9
10
11
12
13
14
15

1
2
3
4
5
6

7

8
9
10
11
12
13
14
-
+





-
+
-







AC_INIT(ObjFW, 1.1-dev, js@nil.im)
AC_INIT(ObjFW, 1.0, js@nil.im)
AC_CONFIG_SRCDIR(src)
AC_CONFIG_AUX_DIR(build-aux)
AC_CONFIG_MACRO_DIR(build-aux/m4)

AC_DEFINE(OBJFW_VERSION_MAJOR, 1, [The major version of ObjFW])
AC_DEFINE(OBJFW_VERSION_MINOR, 1, [The minor version of ObjFW])
AC_DEFINE(OBJFW_VERSION_MINOR, 0, [The minor version of ObjFW])
dnl This may only be set to 1.1 once 1.1 is released
AC_SUBST(BUNDLE_VERSION, 1.0.0)
AC_SUBST(BUNDLE_SHORT_VERSION, 1.0)

for i in configure.ac build-aux/m4/*; do
	AS_IF([test $i -nt configure], [
		AC_MSG_ERROR([$i is newer than configure! Run ./autogen.sh!])
	])
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455



456
457
458
459
460
461
462
463
464








465
466
467
468
469
470
471
472
439
440
441
442
443
444
445


446
447
448




449
450
451
452








453
454
455
456
457
458
459
460

461
462
463
464
465
466
467







-
-



-
-
-
-
+
+
+

-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-







	CPPFLAGS="-D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS $CPPFLAGS"
	;;
esac

objc_runtime="ObjFW runtime"
AC_CHECK_HEADER(objc/objc.h)
AC_MSG_CHECKING(which Objective C runtime to use)
AC_ARG_ENABLE(runtime,
	AS_HELP_STRING([--enable-runtime], [use the included runtime]))
AC_ARG_ENABLE(seluid24,
	AS_HELP_STRING([--enable-seluid24],
		[use 24 bit instead of 16 bit for selector UIDs]))
AS_IF([test x"$enable_runtime" != x"yes"], [
	AS_IF([test x"$ac_cv_header_objc_objc_h" = x"yes"], [
		AC_EGREP_CPP(egrep_cpp_yes, [
			#import <objc/objc.h>
AS_IF([test x"$ac_cv_header_objc_objc_h" = x"yes"], [
	AC_EGREP_CPP(egrep_cpp_yes, [
		#import <objc/objc.h>

			#ifdef OBJC_BOOL_DEFINED
			egrep_cpp_yes
			#endif
		], [
			objc_runtime="Apple runtime"
		], [
			dnl We don't want the GNU runtime
			:
		#ifdef OBJC_BOOL_DEFINED
		egrep_cpp_yes
		#endif
	], [
		objc_runtime="Apple runtime"
	], [
		dnl We don't want the GNU runtime
		:
		])
	])
])
AC_MSG_RESULT($objc_runtime)

case "$objc_runtime" in
"ObjFW runtime")
	AC_DEFINE(OF_OBJFW_RUNTIME, 1, [Whether we use the ObjFW runtime])

Modified extra.mk.in from [70070944b6] to [26c5acc6ce].

1
2
3
4
5

6
7
8
9
10
11
12
1
2
3
4

5
6
7
8
9
10
11
12




-
+







OBJFW_SHARED_LIB = @OBJFW_SHARED_LIB@
OBJFW_STATIC_LIB = @OBJFW_STATIC_LIB@
OBJFW_FRAMEWORK = @OBJFW_FRAMEWORK@
OBJFW_LIB_MAJOR = 9
OBJFW_LIB_MINOR = 1
OBJFW_LIB_MINOR = 0
OBJFW_LIB_MAJOR_MINOR = ${OBJFW_LIB_MAJOR}.${OBJFW_LIB_MINOR}

OBJFWRT_SHARED_LIB = @OBJFWRT_SHARED_LIB@
OBJFWRT_STATIC_LIB = @OBJFWRT_STATIC_LIB@
OBJFWRT_FRAMEWORK = @OBJFWRT_FRAMEWORK@
OBJFWRT_AMIGA_LIB = @OBJFWRT_AMIGA_LIB@
OBJFWRT_LIB_MAJOR = 1

Deleted src/runtime/lookup-asm/lookup-asm-x86_64-macho.S version [30cd6d5c1f].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
























































































-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
/*
 * Copyright (c) 2008-2021 Jonathan Schleifer <js@nil.im>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * 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"

.globl _objc_msg_lookup
.globl _objc_msg_lookup_stret
.globl _objc_msg_lookup_super
.globl _objc_msg_lookup_super_stret

.section __TEXT, __text, regular, pure_instructions
.macro generate_lookup
$0:
	testq	%rdi, %rdi
	jz	ret_nil

	testb	$$1, %dil
	jnz	Ltagged_pointer_$0

	movq	(%rdi), %r8
	movq	64(%r8), %r8

Lmain_$0:
	movq	(%rsi), %rax
	movzbl	%ah, %ecx
	movzbl	%al, %edx
#ifdef OF_SELUID24
	shrl	$$16, %eax

	movq	(%r8,%rax,8), %r8
#endif
	movq	(%r8,%rcx,8), %r8
	movq	(%r8,%rdx,8), %rax

	testq	%rax, %rax
	jz	$1

	ret

Ltagged_pointer_$0:
	movq	_objc_tagged_pointer_secret@GOTPCREL(%rip), %rax
	xorq	(%rax), %rdi
	andb	$$0xE, %dil
	movzbl	%dil, %r8d

	movq	_objc_tagged_pointer_classes@GOTPCREL(%rip), %rax
	movq	(%rax,%r8,4), %r8
	movq	64(%r8), %r8

	jmp	Lmain_$0
.endmacro

.macro generate_lookup_super
$0:
	movq	%rdi, %r8
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	jz	ret_nil

	movq	8(%r8), %r8
	movq	64(%r8), %r8
	jmp	Lmain_$1
.endmacro

generate_lookup _objc_msg_lookup, _objc_method_not_found
generate_lookup _objc_msg_lookup_stret, _objc_method_not_found_stret
generate_lookup_super _objc_msg_lookup_super, _objc_msg_lookup
generate_lookup_super _objc_msg_lookup_super_stret, _objc_msg_lookup_stret

ret_nil:
	leaq	nil_method(%rip), %rax
	ret

nil_method:
	xorq	%rax, %rax
	ret

Modified src/runtime/lookup-asm/lookup-asm.S from [079786db12] to [1ecf7e177f].

33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
33
34
35
36
37
38
39




40
41
42
43
44
45
46







-
-
-
-







# elif defined(OF_MIPS)
#  include "lookup-asm-mips-elf.S"
# elif defined(OF_SPARC64)
#  include "lookup-asm-sparc64-elf.S"
# elif defined(OF_SPARC)
#  include "lookup-asm-sparc-elf.S"
# endif
#elif defined(OF_MACH_O)
# if defined(OF_X86_64)
#  include "lookup-asm-x86_64-macho.S"
# endif
#elif defined(OF_WINDOWS)
# if defined(OF_X86_64)
#  include "lookup-asm-x86_64-win64.S"
# elif defined(OF_X86)
#  include "lookup-asm-x86-win32.S"
# endif
#endif

Modified src/runtime/private.h from [13fad70e4b] to [d3cd5c0dc0].

358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
358
359
360
361
362
363
364




365
366
367
368
369
370
371







-
-
-
-







	    __VA_ARGS__)

#if defined(OF_ELF)
# if defined(OF_X86_64) || defined(OF_X86) || defined(OF_POWERPC) || \
    defined(OF_ARM64) || defined(OF_ARM) || \
    defined(OF_MIPS64_N64) || defined(OF_MIPS) || \
    defined(OF_SPARC64) || defined(OF_SPARC)
#  define OF_ASM_LOOKUP
# endif
#elif defined(OF_MACH_O)
# if defined(OF_X86_64)
#  define OF_ASM_LOOKUP
# endif
#elif defined(OF_WINDOWS)
# if defined(OF_X86_64) || defined(OF_X86)
#  define OF_ASM_LOOKUP
# endif
#endif