Artifact 297f1bd34745e333d9d739f0ba482b243a3b1246c56fe553e0075104ea1e70ad:
- File
src/runtime/init.m
— part of check-in
[1ebb9eb7b3]
at
2014-05-15 15:32:35
on branch trunk
— Multiple dtable / sparse array improvements
* dtable.m is now the old sparse array, using IMP as type for values and
thus not violating the C standard anymore (functions may not be stored
in void*)
* New sparsearray.m which can work with any size, based on the sparse
array from the fast path of class.m
* Fast path of class.m now uses the new sparsearray.m (user: js, size: 1211) [annotate] [blame] [check-ins using]
/* * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014 * Jonathan Schleifer <js@webkeks.org> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in * the packaging of this file. * * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #import "runtime.h" #import "runtime-private.h" void __objc_exec_class(struct objc_abi_module *module) { objc_global_mutex_lock(); objc_register_all_selectors(module->symtab); objc_register_all_classes(module->symtab); objc_register_all_categories(module->symtab); objc_init_static_instances(module->symtab); objc_global_mutex_unlock(); } void objc_exit(void) { objc_global_mutex_lock(); objc_unregister_all_categories(); objc_unregister_all_classes(); objc_unregister_all_selectors(); objc_forget_pending_static_instances(); objc_dtable_cleanup(); objc_global_mutex_unlock(); objc_global_mutex_free(); }