]> git.saurik.com Git - apple/objc4.git/blob - runtime/objc-config.h
9b0b334c49eb184e69794f4f4e0932c76d8ca5a5
[apple/objc4.git] / runtime / objc-config.h
1 /*
2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7 * Reserved. This file contains Original Code and/or Modifications of
8 * Original Code as defined in and that are subject to the Apple Public
9 * Source License Version 1.1 (the "License"). You may not use this file
10 * except in compliance with the License. Please obtain a copy of the
11 * License at http://www.apple.com/publicsource and read it before using
12 * this file.
13 *
14 * The Original Code and all software distributed under the License are
15 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
19 * License for the specific language governing rights and limitations
20 * under the License.
21 *
22 * @APPLE_LICENSE_HEADER_END@
23 */
24 // Copyright 1988-1996 NeXT Software, Inc.
25 // objc-config.h created by kthorup on Fri 24-Mar-1995
26
27 // OBJC_INSTRUMENTED controls whether message dispatching is dynamically
28 // monitored. Monitoring introduces substantial overhead.
29 // NOTE: To define this condition, do so in the build command, NOT by
30 // uncommenting the line here. This is because objc-class.h heeds this
31 // condition, but objc-class.h can not #import this file (objc-config.h)
32 // because objc-class.h is public and objc-config.h is not.
33 //#define OBJC_INSTRUMENTED
34
35 // OBJC_COLLECTING_CACHE controls whether the method dispatching caches
36 // are lockless during dispatch. This is a BIG speed win, but can be
37 // implemented only when a thread can figure out the PCs of all the other
38 // threads in the task.
39
40 #if defined(hppa) || defined (__i386__) || defined (i386) || defined (m68k) || defined (__ppc__) || defined(ppc)
41 #if !defined(NeXT_PDO)
42 #define OBJC_COLLECTING_CACHE
43 #endif
44 #endif
45
46 // Turn on support for class refs
47 #define OBJC_CLASS_REFS
48
49 #define __S(x) x
50
51 #if defined(NeXT_PDO)
52 #define GENERIC_OBJC_FILE
53 #endif
54
55 // Get the nice macros for subroutine calling, etc.
56 // Not available on all architectures. Not needed
57 // (by us) on some configurations.
58 #if defined (__i386__) || defined (i386)
59 #import <architecture/i386/asm_help.h>
60 #elif defined (__ppc__) || defined(ppc)
61 #import <architecture/ppc/asm_help.h>
62 #elif (!defined(hppa) && !defined(sparc)) || !defined(NeXT_PDO)
63 #error We need asm_help.h for this architecture
64 #endif