Comment: | OFInvocation: Initial support for invoking
So far this is only for x86_64 with the Apple runtime and does not yet |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
95797a4d1c5543e19f6aa5768fef7566 |
User & Date: | js on 2017-09-11 02:05:07 |
Other Links: | manifest | tags |
2017-09-11
| ||
02:28 | Make GCC not complain about -pedantic check-in: ff3dbed5ba user: js tags: trunk | |
02:05 | OFInvocation: Initial support for invoking check-in: 95797a4d1c user: js tags: trunk | |
2017-09-10
| ||
22:32 | Add OFInvocation check-in: d6553b4578 user: js tags: trunk | |
Modified ObjFW.xcodeproj/project.pbxproj from [74b17c0262] to [9e97741e42].
︙ | |||
162 163 164 165 166 167 168 169 170 171 172 173 174 175 | 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | + + + + | 4B187E56163EA3DA0049A832 /* OFDictionary_NSDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B187E35163EA3DA0049A832 /* OFDictionary_NSDictionary.h */; }; 4B187E58163EA3DA0049A832 /* OFDictionary_NSDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B187E36163EA3DA0049A832 /* OFDictionary_NSDictionary.m */; }; 4B187E59163EA3DA0049A832 /* OFDictionary+NSObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B187E37163EA3DA0049A832 /* OFDictionary+NSObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B187E5B163EA3DA0049A832 /* OFDictionary+NSObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B187E38163EA3DA0049A832 /* OFDictionary+NSObject.m */; }; 4B187E5C163EA3DA0049A832 /* OFString+NSObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B187E39163EA3DA0049A832 /* OFString+NSObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B187E5E163EA3DA0049A832 /* OFString+NSObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B187E3A163EA3DA0049A832 /* OFString+NSObject.m */; }; 4B187E62163EA46D0049A832 /* ObjFW.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B3D23761337FBC800DD29B8 /* ObjFW.framework */; }; 4B1F61B61F6623B800278BCB /* call.S in Sources */ = {isa = PBXBuildFile; fileRef = 4B1F61B21F6623B700278BCB /* call.S */; }; 4B1F61B71F6623B800278BCB /* call.S in Sources */ = {isa = PBXBuildFile; fileRef = 4B1F61B21F6623B700278BCB /* call.S */; }; 4B1F61B81F6623B800278BCB /* invoke.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B1F61B31F6623B700278BCB /* invoke.m */; }; 4B1F61B91F6623B800278BCB /* invoke.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B1F61B31F6623B700278BCB /* invoke.m */; }; 4B2227A71D4FE23700A41CD3 /* atomic_builtins.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B2227A11D4FE23700A41CD3 /* atomic_builtins.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B2227A81D4FE23700A41CD3 /* atomic_no_threads.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B2227A21D4FE23700A41CD3 /* atomic_no_threads.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B2227A91D4FE23700A41CD3 /* atomic_osatomic.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B2227A31D4FE23700A41CD3 /* atomic_osatomic.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B2227AA1D4FE23700A41CD3 /* atomic_powerpc.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B2227A41D4FE23700A41CD3 /* atomic_powerpc.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B2227AB1D4FE23700A41CD3 /* atomic_sync_builtins.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B2227A51D4FE23700A41CD3 /* atomic_sync_builtins.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B2227AC1D4FE23700A41CD3 /* atomic_x86.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B2227A61D4FE23700A41CD3 /* atomic_x86.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4B22BE201AE594A000CD320A /* OFKernelEventObserverTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B22BE1F1AE594A000CD320A /* OFKernelEventObserverTests.m */; }; |
︙ | |||
1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 | 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 | + + + + | 4B187E36163EA3DA0049A832 /* OFDictionary_NSDictionary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFDictionary_NSDictionary.m; path = src/bridge/OFDictionary_NSDictionary.m; sourceTree = "<group>"; }; 4B187E37163EA3DA0049A832 /* OFDictionary+NSObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "OFDictionary+NSObject.h"; path = "src/bridge/OFDictionary+NSObject.h"; sourceTree = "<group>"; }; 4B187E38163EA3DA0049A832 /* OFDictionary+NSObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "OFDictionary+NSObject.m"; path = "src/bridge/OFDictionary+NSObject.m"; sourceTree = "<group>"; }; 4B187E39163EA3DA0049A832 /* OFString+NSObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "OFString+NSObject.h"; path = "src/bridge/OFString+NSObject.h"; sourceTree = "<group>"; }; 4B187E3A163EA3DA0049A832 /* OFString+NSObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "OFString+NSObject.m"; path = "src/bridge/OFString+NSObject.m"; sourceTree = "<group>"; }; 4B19023A1338D6A2000374C9 /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; name = Makefile; path = src/Makefile; sourceTree = SOURCE_ROOT; }; 4B19023D1338D6D5000374C9 /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; name = Makefile; path = tests/Makefile; sourceTree = "<group>"; }; 4B1F61B21F6623B700278BCB /* call.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; name = call.S; path = src/invocation/call.S; sourceTree = "<group>"; }; 4B1F61B31F6623B700278BCB /* invoke.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = invoke.m; path = src/invocation/invoke.m; sourceTree = "<group>"; }; 4B1F61B41F6623B800278BCB /* apple-call-x86_64.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; name = "apple-call-x86_64.S"; path = "src/invocation/apple-call-x86_64.S"; sourceTree = "<group>"; }; 4B1F61B51F6623B800278BCB /* invoke-x86_64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "invoke-x86_64.m"; path = "src/invocation/invoke-x86_64.m"; sourceTree = "<group>"; }; 4B2227A11D4FE23700A41CD3 /* atomic_builtins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = atomic_builtins.h; path = src/atomic_builtins.h; sourceTree = "<group>"; }; 4B2227A21D4FE23700A41CD3 /* atomic_no_threads.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = atomic_no_threads.h; path = src/atomic_no_threads.h; sourceTree = "<group>"; }; 4B2227A31D4FE23700A41CD3 /* atomic_osatomic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = atomic_osatomic.h; path = src/atomic_osatomic.h; sourceTree = "<group>"; }; 4B2227A41D4FE23700A41CD3 /* atomic_powerpc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = atomic_powerpc.h; path = src/atomic_powerpc.h; sourceTree = "<group>"; }; 4B2227A51D4FE23700A41CD3 /* atomic_sync_builtins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = atomic_sync_builtins.h; path = src/atomic_sync_builtins.h; sourceTree = "<group>"; }; 4B2227A61D4FE23700A41CD3 /* atomic_x86.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = atomic_x86.h; path = src/atomic_x86.h; sourceTree = "<group>"; }; 4B22BE1F1AE594A000CD320A /* OFKernelEventObserverTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFKernelEventObserverTests.m; path = tests/OFKernelEventObserverTests.m; sourceTree = "<group>"; }; |
︙ | |||
1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 | 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 | + + + + + + + + + + + | isa = PBXGroup; children = ( 4B187E23163EA3DA0049A832 /* Bridge-Info.plist */, 4B187E24163EA3DA0049A832 /* Makefile */, ); name = "Supporting Files"; sourceTree = "<group>"; }; 4B1F61B11F66239200278BCB /* Invocation */ = { isa = PBXGroup; children = ( 4B1F61B41F6623B800278BCB /* apple-call-x86_64.S */, 4B1F61B21F6623B700278BCB /* call.S */, 4B1F61B51F6623B800278BCB /* invoke-x86_64.m */, 4B1F61B31F6623B700278BCB /* invoke.m */, ); name = Invocation; sourceTree = "<group>"; }; 4B3D23771337FBC800DD29B8 /* Products */ = { isa = PBXGroup; children = ( 4BF33AF0133807310059CEF7 /* Tests */, 4B23CA8A133811610047A1D9 /* TestPlugin.bundle */, 4B187E0E163EA29F0049A832 /* ObjFW_Bridge.framework */, |
︙ | |||
2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 | 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 | + | 4B6EF66C123535340076B512 /* ObjFW */ = { isa = PBXGroup; children = ( 4B187E07163EA2730049A832 /* Bridge */, 4B17FF6E133A28E0003E6DCD /* Exceptions */, 4B610DC41E31A46600AB26BA /* Encodings */, 4B5C112717E9AAC1003C917F /* Forwarding */, 4B1F61B11F66239200278BCB /* Invocation */, 4B3D23801337FBC800DD29B8 /* Supporting Files */, 4B175C1D116D130B003C99CB /* OFApplication.h */, 4B175C1E116D130B003C99CB /* OFApplication.m */, 4B67995A1099E7C50041064A /* OFArray.h */, 4B67995B1099E7C50041064A /* OFArray.m */, 4B2B3E73140D430500EC2F7C /* OFArray_adjacent.h */, 4B2B3E74140D430500EC2F7C /* OFArray_adjacent.m */, |
︙ | |||
3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 | 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 | + + | 4B2C218C1DA292BE00735907 /* iso_8859-15.m in Sources */, 4B276E401E493D5000E20CE4 /* koi8-u.m in Sources */, 4B276E3F1E493D5000E20CE4 /* koi8-r.m in Sources */, 4B5EBFBA1E25A937004FE6A2 /* mac_roman.m in Sources */, 4BF3A22A1E25EA48002EA46F /* windows-1251.m in Sources */, 4B2C21971DA292BE00735907 /* windows-1252.m in Sources */, 4B2C21D41DA292BE00735907 /* forwarding.S in Sources */, 4B1F61B71F6623B800278BCB /* call.S in Sources */, 4B1F61B91F6623B800278BCB /* invoke.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 4B3D23711337FBC800DD29B8 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( |
︙ | |||
3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 | 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 | + + | 4B3D23B41337FC0D00DD29B8 /* iso_8859-15.m in Sources */, 4B276E3C1E493D5000E20CE4 /* koi8-r.m in Sources */, 4B276E3D1E493D5000E20CE4 /* koi8-u.m in Sources */, 4B5EBFB91E25A937004FE6A2 /* mac_roman.m in Sources */, 4BF3A2291E25EA48002EA46F /* windows-1251.m in Sources */, 4B3D23BA1337FC0D00DD29B8 /* windows-1252.m in Sources */, 4B5C112F17E9AB3E003C917F /* forwarding.S in Sources */, 4B1F61B61F6623B800278BCB /* call.S in Sources */, 4B1F61B81F6623B800278BCB /* invoke.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 4B5D706D1DA2F87A00B3B2D7 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( |
︙ |
Modified configure.ac from [87db9fc198] to [5c197c36b0].
︙ | |||
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 | + + + + | AS_IF([test x"$enable_shared" != x"no"], [ BUILDSYS_SHARED_LIB AC_SUBST(OBJFW_SHARED_LIB, "${LIB_PREFIX}objfw${LIB_SUFFIX}") AC_SUBST(EXCEPTIONS_LIB_A, "exceptions.lib.a") AC_SUBST(EXCEPTIONS_EXCEPTIONS_LIB_A, "exceptions/exceptions.lib.a") AC_SUBST(FORWARDING_LIB_A, "forwarding.lib.a") AC_SUBST(FORWARDING_FORWARDING_LIB_A, "forwarding/forwarding.lib.a") AC_SUBST(INVOCATION_LIB_A, "invocation.lib.a") AC_SUBST(INVOCATION_INVOCATION_LIB_A, "invocation/invocation.lib.a") AC_SUBST(LOOKUP_ASM_LIB_A, "lookup-asm.lib.a") AC_SUBST(LOOKUP_ASM_LOOKUP_ASM_LIB_A, "lookup-asm/lookup-asm.lib.a") ], [ AC_SUBST(LIBOBJFW_DEP, "../src/libobjfw.a") AC_SUBST(LIBOBJFW_DEP_LVL2, "../../src/libobjfw.a") ]) AC_ARG_ENABLE(static, AS_HELP_STRING([--enable-static], [build static library])) AS_IF([test x"$enable_static" = x"yes" -o x"$enable_shared" = x"no"], [ AC_SUBST(OBJFW_STATIC_LIB, "libobjfw.a") AC_SUBST(EXCEPTIONS_A, "exceptions.a") AC_SUBST(EXCEPTIONS_EXCEPTIONS_A, "exceptions/exceptions.a") AC_SUBST(FORWARDING_A, "forwarding.a") AC_SUBST(FORWARDING_FORWARDING_A, "forwarding/forwarding.a") AC_SUBST(INVOCATION_A, "invocation.a") AC_SUBST(INVOCATION_INVOCATION_A, "invocation/invocation.a") AC_SUBST(LOOKUP_ASM_A, "lookup-asm.a") AC_SUBST(LOOKUP_ASM_LOOKUP_ASM_A, "lookup-asm/lookup-asm.a") ]) AC_DEFINE_UNQUOTED(PLUGIN_SUFFIX, "$PLUGIN_SUFFIX", [Suffix for plugins]) AS_IF([test x"$PLUGIN_SUFFIX" != x""], [ AC_SUBST(USE_SRCS_PLUGINS, '${SRCS_PLUGINS}') |
︙ |
Modified extra.mk.in from [2fee260d4c] to [901b193c8a].
︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | + + + + | EXCEPTIONS_LIB_A = @EXCEPTIONS_LIB_A@ FORWARDING_A = @FORWARDING_A@ FORWARDING_FORWARDING_A = @FORWARDING_FORWARDING_A@ FORWARDING_FORWARDING_LIB_A = @FORWARDING_FORWARDING_LIB_A@ FORWARDING_LIB_A = @FORWARDING_LIB_A@ FOUNDATION_COMPAT_M = @FOUNDATION_COMPAT_M@ INSTANCE_M = @INSTANCE_M@ INVOCATION_A = @INVOCATION_A@ INVOCATION_INVOCATION_A = @INVOCATION_INVOCATION_A@ INVOCATION_INVOCATION_LIB_A = @INVOCATION_INVOCATION_LIB_A@ INVOCATION_LIB_A = @INVOCATION_LIB_A@ LIBOBJFW_DEP = @LIBOBJFW_DEP@ LIBOBJFW_DEP_LVL2 = @LIBOBJFW_DEP_LVL2@ LOOKUP_ASM_A = @LOOKUP_ASM_A@ LOOKUP_ASM_LIB_A = @LOOKUP_ASM_LIB_A@ LOOKUP_ASM_LOOKUP_ASM_A = @LOOKUP_ASM_LOOKUP_ASM_A@ LOOKUP_ASM_LOOKUP_ASM_LIB_A = @LOOKUP_ASM_LOOKUP_ASM_LIB_A@ MAP_LDFLAGS = @MAP_LDFLAGS@ |
︙ |
Modified src/Makefile from [60c6c6163f] to [12f009e244].
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | include ../extra.mk |
︙ | |||
173 174 175 176 177 178 179 | 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | - + + - + + | ${OFKERNELEVENTOBSERVER_POLL_M} \ ${OFKERNELEVENTOBSERVER_SELECT_M} \ OFTCPSocket+SOCKS5.m OBJS_EXTRA = ${RUNTIME_RUNTIME_A} \ ${EXCEPTIONS_EXCEPTIONS_A} \ ${ENCODINGS_ENCODINGS_A} \ |
Modified src/OFInvocation.h from [644970666b] to [c3fa8975c2].
︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | + + + + + + | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" OF_ASSUME_NONNULL_BEGIN #ifdef OF_APPLE_RUNTIME # ifdef OF_X86_64 # define OF_INVOCATION_CAN_INVOKE # endif #endif @class OFMethodSignature; @class OFMutableArray OF_GENERIC(ObjectType); @class OFMutableData; /*! * @class OFInvocation OFInvocation.h ObjFW/OFInvocation.h |
︙ | |||
83 84 85 86 87 88 89 90 91 92 | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | + + + + + + + | /*! * @brief Gets the return value. * * @param buffer The buffer in which the return value is stored */ - (void)getReturnValue: (void *)buffer; #ifdef OF_INVOCATION_CAN_INVOKE /*! * @brief Invokes the method. */ - (void)invoke; #endif @end OF_ASSUME_NONNULL_END |
Modified src/OFInvocation.m from [d28fd7d86d] to [a554855707].
︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | + + + + | #include <string.h> #import "OFInvocation.h" #import "OFArray.h" #import "OFData.h" #import "OFMethodSignature.h" #ifdef OF_INVOCATION_CAN_INVOKE extern void of_invocation_invoke(OFInvocation *); #endif @implementation OFInvocation @synthesize methodSignature = _methodSignature; + (instancetype)invocationWithMethodSignature: (OFMethodSignature *)signature { return [[[self alloc] initWithMethodSignature: signature] autorelease]; |
︙ | |||
102 103 104 105 106 107 108 109 | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | + + + + + + + | memcpy([_returnValue items], buffer, [_returnValue itemSize]); } - (void)getReturnValue: (void *)buffer { memcpy(buffer, [_returnValue items], [_returnValue itemSize]); } #ifdef OF_INVOCATION_CAN_INVOKE - (void)invoke { of_invocation_invoke(self); } #endif @end |
Modified src/ObjFW.h from [81b46b0472] to [478f0cae84].
︙ | |||
36 37 38 39 40 41 42 43 44 45 46 47 48 49 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | + | #import "OFTriple.h" #import "OFEnumerator.h" #import "OFNull.h" #import "OFMethodSignature.h" #import "OFInvocation.h" #import "OFIntrospection.h" #import "OFNumber.h" #import "OFDate.h" #import "OFURL.h" #import "OFStream.h" |
︙ |
Added src/invocation/Makefile version [4d35605397].
|
Added src/invocation/apple-call-x86_64.S version [5b7d96cf0b].
|
Added src/invocation/call.S version [0651a365e6].
|
Added src/invocation/invoke-x86_64.m version [ed5f594770].