Skip canaries/simpleflexapp.as in performance suite while Dan Schaffer investigates...
[tamarin-stm.git] / shell / avmshell-features.h
blob1a78bfa08be205338943746b857e17f7a23f4754
1 /* -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */
2 /* vi: set ts=4 sw=4 expandtab: (add to ~/.vimrc: set modeline modelines=5) */
3 /* ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
16 * The Original Code is [Open Source Virtual Machine.].
18 * The Initial Developer of the Original Code is
19 * Adobe System Incorporated.
20 * Portions created by the Initial Developer are Copyright (C) 1993-2006
21 * the Initial Developer. All Rights Reserved.
23 * Contributor(s):
24 * Adobe AS3 Team
26 * Alternatively, the contents of this file may be used under the terms of
27 * either the GNU General Public License Version 2 or later (the "GPL"), or
28 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 * in which case the provisions of the GPL or the LGPL are applicable instead
30 * of those above. If you wish to allow use of your version of this file only
31 * under the terms of either the GPL or the LGPL, and not to allow others to
32 * use your version of this file under the terms of the MPL, indicate your
33 * decision by deleting the provisions above and replace them with the notice
34 * and other provisions required by the GPL or the LGPL. If you do not delete
35 * the provisions above, a recipient may use your version of this file under
36 * the terms of any one of the MPL, the GPL or the LGPL.
38 * ***** END LICENSE BLOCK ***** */
40 #ifndef __avmshell_features__
41 #define __avmshell_features__
43 // Include the refactored, standard, system determination. It defines
44 // all the AVMSYSTEM_ names for tier-one platforms. It may be used by
45 // other feature definition files than this one.
47 #include "system-selection.h"
49 // vm features for shell builds
51 // In general these can and will be set by our external build script, and
52 // any external definition should override the ones here. So every definition
53 // here is a default and should be protected by an #ifdef
55 #ifndef AVMFEATURE_DEBUGGER
56 // DEBUGGER is typically defined by the project file and gets preferenatial
57 // treatment here, but we should get rid of DEBUGGER by and by and switch
58 // to AVMFEATURE_DEBUGGER as the only external control
59 #ifdef DEBUGGER
60 #define AVMFEATURE_DEBUGGER 1
61 #else
62 #define AVMFEATURE_DEBUGGER 0
63 #endif
64 #endif
66 #ifndef AVMFEATURE_DEBUGGER_STUB
67 #define AVMFEATURE_DEBUGGER_STUB 0
68 #endif
70 #ifndef AVMFEATURE_ALLOCATION_SAMPLER
71 // This is compatible with existing behavior: debugging support enables
72 // sampling support.
73 #if AVMFEATURE_DEBUGGER
74 #define AVMFEATURE_ALLOCATION_SAMPLER 1
75 #else
76 #define AVMFEATURE_ALLOCATION_SAMPLER 0
77 #endif
78 #endif
80 #ifndef AVMFEATURE_VTUNE
81 #define AVMFEATURE_VTUNE 0
82 #endif
84 #ifndef AVMFEATURE_JIT
85 #define AVMFEATURE_JIT 1
86 #endif
88 #ifndef AVMFEATURE_AOT
89 #define AVMFEATURE_AOT 0
90 #endif
92 #ifndef AVMFEATURE_ABC_INTERP
93 #define AVMFEATURE_ABC_INTERP 1
94 #endif
96 #ifndef AVMFEATURE_WORDCODE_INTERP
97 #define AVMFEATURE_WORDCODE_INTERP 0
98 #endif
100 #if AVMFEATURE_WORDCODE_INTERP
101 #ifndef AVMFEATURE_THREADED_INTERP
102 #ifdef __GNUC__
103 #define AVMFEATURE_THREADED_INTERP 1
104 #else
105 #define AVMFEATURE_THREADED_INTERP 0
106 #endif
107 #endif
108 #else
109 #define AVMFEATURE_THREADED_INTERP 0
110 #endif
112 #ifndef AVMFEATURE_SELFTEST
113 #define AVMFEATURE_SELFTEST 1
114 #endif
116 // https://bugzilla.mozilla.org/show_bug.cgi?id=491866
117 // eval is causing insteresting compilation errors that appear
118 // to be caused by a compiler bug.
119 #ifndef SOLARIS
120 #ifndef AVMFEATURE_EVAL
121 #define AVMFEATURE_EVAL 1
122 #endif
123 #else
124 #define AVMFEATURE_EVAL 0
125 #endif
127 #ifndef AVMFEATURE_PROTECT_JITMEM
128 #define AVMFEATURE_PROTECT_JITMEM 1
129 #endif
131 #ifndef AVMFEATURE_SHARED_GCHEAP
132 #define AVMFEATURE_SHARED_GCHEAP 1
133 #endif
135 #ifndef AVMFEATURE_USE_SYSTEM_MALLOC
136 #define AVMFEATURE_USE_SYSTEM_MALLOC 0
137 #endif
139 #ifndef AVMFEATURE_CPP_EXCEPTIONS
140 #define AVMFEATURE_CPP_EXCEPTIONS 0
141 #endif
143 #ifndef AVMFEATURE_INTERIOR_POINTERS
144 #define AVMFEATURE_INTERIOR_POINTERS 0
145 #endif
147 #ifndef AVMFEATURE_JNI
148 #define AVMFEATURE_JNI 0
149 #endif
151 #ifndef AVMFEATURE_HEAP_ALLOCA
152 #if AVMSYSTEM_SYMBIAN
153 // symbian doesn't support alloca
154 #define AVMFEATURE_HEAP_ALLOCA 1
155 #elif AVMSYSTEM_WIN32 && defined(__MSVC_RUNTIME_CHECKS)
156 // MSVC's runtime stack checking isn't smart about longjmp/setjmp,
157 // and will get all crashy if used in the wrong way. RTC is typically
158 // only in Debug builds though, so just fall back to heap-always for those.
159 #define AVMFEATURE_HEAP_ALLOCA 1
160 #else
161 #define AVMFEATURE_HEAP_ALLOCA 0
162 #endif
163 #endif
165 #ifndef AVMFEATURE_STATIC_FUNCTION_PTRS
166 #define AVMFEATURE_STATIC_FUNCTION_PTRS 1
167 #endif
169 #ifndef AVMFEATURE_INDIRECT_NATIVE_THUNKS
170 // if not specified, default to direct thunks in DEBUGGER builds
171 #if AVMFEATURE_DEBUGGER
172 #define AVMFEATURE_INDIRECT_NATIVE_THUNKS 0
173 #else
174 #define AVMFEATURE_INDIRECT_NATIVE_THUNKS 1
175 #endif
176 #endif
178 #ifndef AVMFEATURE_OVERRIDE_GLOBAL_NEW
179 #define AVMFEATURE_OVERRIDE_GLOBAL_NEW 0
180 #endif
182 #ifndef AVMFEATURE_MEMORY_PROFILER
183 #if AVMFEATURE_DEBUGGER
184 #if AVMSYSTEM_MAC && !(AVMSYSTEM_PPC && AVMSYSTEM_64BIT)
185 #define AVMFEATURE_MEMORY_PROFILER 1
186 #elif AVMSYSTEM_WIN32 && !AVMSYSTEM_ARM // note, does not require DEBUG
187 #define AVMFEATURE_MEMORY_PROFILER 1
188 #else
189 #define AVMFEATURE_MEMORY_PROFILER 0
190 #endif
191 #else
192 #define AVMFEATURE_MEMORY_PROFILER 0
193 #endif
194 #endif
196 #ifndef AVMFEATURE_CACHE_GQCN
197 #define AVMFEATURE_CACHE_GQCN 1
198 #endif
200 #if AVMSYSTEM_SYMBIAN
201 #undef AVMFEATURE_SELFTEST
202 #define AVMFEATURE_SELFTEST 0
203 //#define NJ_NO_VARIADIC_MACROS
204 #undef AVMFEATURE_JIT
205 #if AVMSYSTEM_ARM
206 #define AVMFEATURE_JIT 1
207 #else
208 #define AVMFEATURE_JIT 0
209 #endif // AVMSYSTEM_ARM
210 #undef AVMFEATURE_HEAP_ALLOCA
211 #define AVMFEATURE_HEAP_ALLOCA 1
212 #undef AVMFEATURE_STATIC_FUNCTION_PTRS
213 #define AVMFEATURE_STATIC_FUNCTION_PTRS 0 // Very important on Symbian
214 #undef AVMFEATURE_OVERRIDE_GLOBAL_NEW
215 #define AVMFEATURE_OVERRIDE_GLOBAL_NEW 0
216 #undef AVMFEATURE_EVAL // Don't compile in this feature yet.
217 #define AVMFEATURE_EVAL 0
218 #if AVMSYSTEM_SYMBIAN && AVMSYSTEM_IA32
219 #undef AVMFEATURE_CPP_EXCEPTIONS
220 #define AVMFEATURE_CPP_EXCEPTIONS 1 // winscw compiler wants
221 #endif // AVMSYSTEM_SYMBIAN && AVMSYSTEM_IA32
222 #endif // AVMSYSTEM_SYMBIAN
224 #ifndef AVMFEATURE_VALGRIND
225 #define AVMFEATURE_VALGRIND 0
226 #endif
228 #endif // __avmshell_features__