Overview
Comment: | Add OF_NO_RETURN and OF_UNREACHABLE |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
b885b6fdfa08a777d65d0d0525b93d0e |
User & Date: | js on 2014-05-05 02:43:51 |
Other Links: | manifest | tags |
Context
2014-05-06
| ||
21:37 | Update buildsys check-in: 9ca6458c5a user: js tags: trunk | |
2014-05-05
| ||
02:43 | Add OF_NO_RETURN and OF_UNREACHABLE check-in: b885b6fdfa user: js tags: trunk | |
02:13 | Check for and use __builtin_bswap{16,32,64} check-in: 2729104cf6 user: js tags: trunk | |
Changes
Modified src/OFApplication.h from [6ad0d38bc0] to [f01ba7a135].
︙ | |||
160 161 162 163 164 165 166 | 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | - + - + | * @return The environment of the application */ + (OFDictionary*)environment; /*! * @brief Terminates the application. */ |
︙ |
Modified src/OFDeflateStream.m from [a82b6b33ea] to [cefc6bbea9].
︙ | |||
741 742 743 744 745 746 747 | 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 | - - + | CTX.state = AWAIT_DISTANCE; } break; #undef CTX } |
Modified src/OFMutableString_UTF8.m from [c7dede3563] to [d5efe167c0].
︙ | |||
263 264 265 266 267 268 269 | 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | - - + | @try { _s->cString = [self resizeMemory: _s->cString size: _s->cStringLength + 1]; } @catch (OFOutOfMemoryException *e) { /* We don't really care, as we only made it smaller */ } |
︙ |
Modified src/OFObject.h from [2a79ae4f27] to [14f340cddc].
︙ | |||
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | + + | # undef false # define false ((bool)0) # endif #endif #if defined(__clang__) || __GCC_VERSION__ >= 406 # define OF_SENTINEL __attribute__((sentinel)) # define OF_NO_RETURN __attribute__((noreturn)) #else # define OF_SENTINEL # define OF_NO_RETURN #endif #if __has_attribute(objc_requires_super) # define OF_REQUIRES_SUPER __attribute__((objc_requires_super)) #else # define OF_REQUIRES_SUPER #endif |
︙ | |||
942 943 944 945 946 947 948 | 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 | - + | * @brief Handles messages which are not understood by the receiver. * * @warning If you override this method, you must make sure that it never * returns. * * @param selector The selector not understood by the receiver */ |
︙ |
Modified src/OFThread.h from [7e258abb92] to [bd27888ffe].
︙ | |||
141 142 143 144 145 146 147 | 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | - + - + | */ + (void)yield; #ifdef OF_HAVE_THREADS /*! * @brief Terminates the current thread, letting it return nil. */ |
︙ |
Modified src/OFThread.m from [68ca15bbc7] to [75412d8593].
︙ | |||
234 235 236 237 238 239 240 241 242 243 244 245 246 247 | 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | + + + + + + + | #endif } #ifdef OF_HAVE_THREADS + (void)terminate { [self terminateWithObject: nil]; /* * For some reason, Clang thinks terminateWithObject: can return - even * though it is declared noreturn - and warns that terminate returns * while being declared noreturn. */ OF_UNREACHABLE } + (void)terminateWithObject: (id)object { OFThread *thread = of_tlskey_get(threadSelfKey); if (thread != nil) { |
︙ |
Modified src/macros.h from [8621e81b30] to [c9c04d682a].
︙ | |||
143 144 145 146 147 148 149 150 151 152 | 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | + + + + + + - + | extern void objc_setProperty(id, SEL, ptrdiff_t, id, BOOL, signed char); #define OF_IVAR_OFFSET(ivar) ((intptr_t)&ivar - (intptr_t)self) #define OF_GETTER(ivar, atomic) \ return objc_getProperty(self, _cmd, OF_IVAR_OFFSET(ivar), atomic); #define OF_SETTER(ivar, value, atomic, copy) \ objc_setProperty(self, _cmd, OF_IVAR_OFFSET(ivar), value, atomic, copy); #if defined(__clang__) || __GCC_VERSION__ >= 405 # define OF_UNREACHABLE __builtin_unreachable(); #else # define OF_UNREACHABLE abort(); #endif #define OF_UNRECOGNIZED_SELECTOR \ [self doesNotRecognizeSelector: _cmd]; \ |
︙ |
Modified src/threading.h from [a65488fd6f] to [79cb0c24fe].
︙ | |||
139 140 141 142 143 144 145 | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | - + | /* FIXME */ return true; #else # error of_thread_detach not implemented! #endif } |
︙ |