1194 Commits (c4cb9650332450895a158ae567ca698dc26a836b)
 

Author SHA1 Message Date
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
David Chisnall dde74a8219 Call the batch file, don't run it.
Hopefully this prevents the CI step from exiting when the batch file
exits.
7 years ago
David Chisnall 571e45a814 Another try at making the Windows build work... 7 years ago
David Chisnall fe637ace1b Again, with extra quoting... 7 years ago
David Chisnall da955b6ed4 Attempt to fix the Windows build.
It appears that there's a link.exe from GNU coreutils on the path before
the one from Visual Studio.
7 years ago
David Chisnall d92618169d Try skipping the environment setup step 7 years ago
David Chisnall 4e99187dc6 Even more logging. 7 years ago
David Chisnall 0a9a306884 Add some logging to the CI build on Windows.
Something is still not working, hopefully this will let me figure out
what...
7 years ago
David Chisnall a2914ede8b Fix copying objc.dll into the tests directory. 7 years ago
David Chisnall 7ac971d3ad Actually build the tests on Windows. 7 years ago
David Chisnall 27a7abd0ad Make more Windows build steps explicit. 7 years ago
David Chisnall 542fd814bf More tweaks to Windows CMake. 7 years ago
David Chisnall cdb673b9c1 Try to manually run cmake on Windows. 7 years ago
David Chisnall 2521ebabd5 Fix typo in cmake command. 7 years ago
David Chisnall 61c7414fed Undo incorrect change. 7 years ago
David Chisnall 0db1f383b9 More pipelines stuff. 7 years ago
David Chisnall da4c4e414c Remove explicit triggers from azure-pipelines.yml
These are better configured in the web interface.
7 years ago
David Chisnall a9c8eb0629 Remove accidental copy-and-paste. 7 years ago
David Chisnall a0a8482357 Attempt to add Windows to CI. 7 years ago