Differences From Artifact [ca3819c013]:
- File src/runtime/linklib/linklib.m — part of check-in [1cae2c720c] at 2018-05-05 15:57:32 on branch trunk — runtime: Make exceptions work in Amiga library (user: js, size: 5340) [annotate] [blame] [check-ins using]
To Artifact [c7c08d7d39]:
- File
src/runtime/linklib/linklib.m
— part of check-in
[dff419362e]
at
2018-05-05 17:46:52
on branch trunk
— runtime: Work around compiler bug in Amiga library
This adds the same workaround for objc_enumerationMutation() as for
objc_exception_throw(). (user: js, size: 5855) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
212 213 214 215 216 217 218 | objc_setPropertyStruct(void *dest, const void *src, ptrdiff_t size, bool atomic, bool strong) { glue_objc_setPropertyStruct(dest, src, size, atomic, strong); } void | | > > > > > | > > > > > > | 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | objc_setPropertyStruct(void *dest, const void *src, ptrdiff_t size, bool atomic, bool strong) { glue_objc_setPropertyStruct(dest, src, size, atomic, strong); } void objc_enumerationMutation(id object) { /* * This does not use the glue code to hack around a compiler bug. * * When using the generated inline stubs, the compiler does not emit * any frame information, making the unwind fail. As a result * objc_enumerationMutation() might throw an exception that could never * be caught. If, however, we're using a function pointer instead of * the inline stub, the compiler does generate a frame and everything * works fine. */ uintptr_t throw = (((uintptr_t)ObjFWRTBase) - 0x8A); ((void (*)(id OBJC_M68K_REG("a0")))throw)(object); } int __gnu_objc_personality_v0(int version, int actions, uint64_t ex_class, void *ex, void *ctx) { return glue___gnu_objc_personality_v0(version, actions, &ex_class, ex, ctx); } |