1362 Commits (main)
 

Author SHA1 Message Date
Frederik Seiffert 61eee9e0a2 Pass on Android toolchain flags for CXX runtime check. 7 years ago
David Chisnall 8560a65f21 Add a missing `extern "C"` to slot.h.
Fixes #117
7 years ago
David Chisnall e6e86d309b
Merge pull request #116 from jordo/cpp-compile-fix
_Bool fix for cpp compilation
7 years ago
Jordan Schidlowsky 6e3c618b82 cleanup in blocks runtime for closer consistency with apple 7 years ago
David Chisnall 414e0baa0e Add Control Flow Guard checks on Windows. 7 years ago
Frederik Seiffert 5308d21c1e Use const pointers for associated object keys.
Matches Apple platform implementations.
7 years ago
Jordan Schidlowsky a1a3b7a4db cleanup cpp and c defines 7 years ago
Jordan Schidlowsky 72b1f9d1fa _Bool fix for cpp compilation 7 years ago
Frederik Seiffert d16faeded9 Fixed warning in imp_implementationWithBlock.
This was caused by switching the method signature to use "id" for the block parameter.
7 years ago
David Chisnall 375018a933 Fix upgrading legacy properties with qualifiers.
This fixes PropertyIntrospectionTest2_arc with the 1.x ABI and enables
the test that was disabled in this mode.
7 years ago
Frederik Seiffert 5aa82d059a Disabled atomic property tests on legacy ABI versions. 7 years ago
Frederik Seiffert 09fdceaa7d Fixed property_copyAttributeList skipping logic
Was incrementing the index twice and thereby possibly skipping over the string end with undefined results.
7 years ago
Frederik Seiffert fb32780698 Extended property introspection test with atomic-type property. 7 years ago
Frederik Seiffert 5917514ac1 Added test for atomic ivars. 7 years ago
Frederik Seiffert ae6a777742 Add support for atomic type qualifiers.
Fixes #101.
7 years ago
Frederik Seiffert a2463192d0 Use `id` as type for block runtime functions.
Fixes #103.
7 years ago
David Chisnall 1ab65ca818 Replace incorrect magic number with sensible number. 7 years ago
David Chisnall 945bbd760d Mark some tests as big.
Setting these tests to use 3 processors is weird, but it means that in
CI (where we do 4 tests in parallel), we won't ever run more than one of
these at a time (though we can run any other one test at the same time
as these).  This should fix the intermittent failure.
7 years ago
David Chisnall c4cb965033 Add more assertions to ManyManySelectors test.
This is intermittently failing in CI.  It looks as if the CI machine is
running out of memory in a way that we are not gracefully handling.
7 years ago
David Chisnall e5eaeae9ac Update ANNOUNCE. 7 years ago
David Chisnall 9d790b4118 Fix long vs size_t error on Windows.
On win64, long is 32 bits, not 64 bits as it is everywhere else.
7 years ago
David Chisnall d4438095ed Add note to ANNOUNCE about WinObjC. 7 years ago
David Chisnall ed1de9e9f6 Explain the badges. 7 years ago
David Chisnall 54f7840d92 Add badge for FreeBSD CI. 7 years ago
David Chisnall 893417c7c9 Bump clang to 8.0 - some tests fail with 6. 7 years ago
David Chisnall 405b745a17 Initial attempt at FreeBSD CI. 7 years ago
David Chisnall f0d7fd4165 Optimise some ARC functions a little bit.
The calls to objc_storeWeak were not being inlined, so we were not
benefiting from optimisations based on the invariants.
7 years ago
David Chisnall 722a2c3b0d Fix some weak pointer bugs.
These most likely led to some intermittent failures in weak references.
The `objc_moveWeak` and `objc_copyWeak` functions were assuming that the
target may contain valid data, but the spec for these says that it may
be uninitialised data.  We were reading uninitialised data and then
seeing if it happened to be a valid object.  Most of the time it was
likely to be nil, so this wasn't an easily reproduceable problem...

I believe this is the correct fix for PR #95.

Fixes #95
7 years ago
David Chisnall 369c84db35 Fix compiler warnings. 7 years ago
David Chisnall 50493c38d7 Don't use pthread storage for exceptions.
If an exception unwinds to the top of a thread, the process will die, so
don't worry about leaking memory for this case.
7 years ago
David Chisnall 00ce6fe46f Make CI work with 32-bit and 64-bit Windows 7 years ago
David Chisnall 2b9b868cf7 Remove inline from isSelRegistered.
It seems to not be exported in the Windows release configuration.
7 years ago
David Chisnall 318ae27d8b Allow attempting to load a module twice.
This is necessary because FreeBSD/ARM and possibly other platforms use
.init_array and not .ctors, so never call the init functions.  As a
result, we will need the compiler to move to putting the load function
in .init_array and may end up with it being called by both variants.
7 years ago
Li Keqing 6eb1e51a49 _CYGWIN is not defined internally in cygwin but __CYGWIN__ 7 years ago
Li Keqing e9e8bd3997 __CYGWIN32__ to _CYGWIN 7 years ago
Li Keqing a48030b12e Fix some link-stage errors when compiling with Cygwin 7 years ago
David Chisnall 2e6528e82b Fix accidentally inverted preprocessor directive. 7 years ago
David Chisnall f05f3f73b3 Revert C++ exception structure changes.
The C++ runtime library passes pointers to the middle of the structure,
so we need to ignore the fields that were previously missing.
7 years ago
David Chisnall acf44d64cb Fix invalid preprocessor directives. 7 years ago
David Chisnall 6cb6d15dfe Fix unwind info in objc_msgSend.arm.S
We were failing to properly indicate the locations of the spilled
floating-point (vector) registers.
7 years ago
David Chisnall 088977679e DWARF EH cleanups.
Update the C++ ABI for the C++11 ABI and fix the missing ARM-specific
bits.  Work around a bug in ARM.
7 years ago
David Chisnall 959a0f1998 Make alignTest pass on ARM.
This test assumed that a vector of 4 ints needed 16-byte alignment, but
this is target specific.  Now check that the runtime provides at least
as strong alignment as the compiler expects.
7 years ago
David Chisnall fe5ad93523 Don't require text relocations on AArc32.
This has been tested with a few hacks on FreeBSD, where everything
except for throwing exceptions in +initialize appears to work (most
likely an unrelated issue, though it's possible that there are problems
with the unwind tables in objc_msgSend.)

Fixes #92
7 years ago
David Chisnall bd5637af6d Fix memory leak in @synchronized.
This was actually a memory leak in the hidden class implementation, but
it was mostly visible in the @synchronized implementation.  Every hidden
class registered a custom .cxx_destruct method, to handle cleanup of all
of the hidden class structures.  Unfortunately, this destructor failed
to delete the reflection metadata structures associated with the class,
specifically the objc_method_list containing the objc_method pointing to
the destructor itself.

Fixes #98
7 years ago
David Chisnall c5fbeb7287 Revert "Provide compat classes only in compat builds."
This reverts commit 1970ba6d7b.

Some code paths are not resilient against these classes not existing.
7 years ago
David Chisnall 1970ba6d7b Provide compat classes only in compat builds.
Don't provide the two legacy protocol classes if we're building without
legacy compatibility.
7 years ago
David Chisnall 49bf9378fb Force linking the protocol classes.
We use the existence of the `Protocol` class in a set of loaded objects
to determine whether we are mixing ABIs in a safe way (i.e. only mixing
a new ABI runtime with old ABI everything else).  Unfortunately, in
static linking, the Protocol class was not being linked because it is
never directly referenced, which made this check fail.

Fixes #85
7 years ago
David Chisnall afee197c67 Rework some of the ivar offset calculations.
We now correctly handle ivars that overlap with the end of what the
compiler thinks is the start of the superclass and bitfields at the
start of a class.
7 years ago
David Chisnall 8dd9c9a0ae Fix an issue with incorrect offsets for the first ivar.
Clang rounds up the size of a class to the size of a word.  If the first
instance variable in a subclass has a field that has smaller alignment
requirements than a word, it is generated with a negative offset,
indicating that it belongs in the space allocated for the parent.

This did not work at all with the code we have for recomputing instance
variable layouts, which uses only the size and the alignment.

Fixes #96
7 years ago
Jordan Schidlowsky f5f452bcb9 cmake fails when project is used in other cmake projects. CMAKE_CURRENT_LIST_DIR should be a more portable path 7 years ago