Merged in f5soh/librepilot/update_credits (pull request #529)
[librepilot.git] / flight / libraries / PyMite / vm / pmFeatureDependencies.h
blobca3c05bc06b92b3d27e7767f4bbeb2bba5c84682
1 /*
2 # This file is Copyright 2010 Dean Hall.
4 # This file is part of the PyMite VM.
5 # The PyMite VM is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU GENERAL PUBLIC LICENSE Version 2.
8 # The PyMite VM is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11 # A copy of the GNU GENERAL PUBLIC LICENSE Version 2
12 # is seen in the file COPYING in this directory.
16 #ifndef __PM_EMPTY_PM_FEATURES_H__
17 #define __PM_EMPTY_PM_FEATURES_H__
20 /**
21 * \file
22 * \brief Platform feature descriptions and dependency checks
24 * This file explains the purpose of all of the HAVE_* features
25 * and provides logical checks for features that depend on other features.
27 * A platform defines the features it wants in src/platform/<plat>/pmfeatures.py
28 * A tool generates C HAVE_* definitions in pmfeatures.h from pmfeatures.py.
31 * HAVE_PRINT
32 * ----------
34 * When defined, bytecodes PRINT_ITEM and PRINT_NEWLINE are supported. Along
35 * with these, helper routines in the object type are compiled in that allow
36 * printing of the object.
37 * REQUIRES stdio.h to have snprintf()
40 * HAVE_GC
41 * -------
43 * When defined, the code to perform mark-sweep garbage collection is included
44 * in the build and automatic GC is enabled. When undefined the allocator
45 * will distribute memory until none is left, after which a memory exception
46 * will occur.
49 * HAVE_FLOAT
50 * ----------
52 * When defined, the code to support floating point objects is included
53 * in the build.
54 * Issue #148 Create configurable float datatype
57 * HAVE_DEL
58 * --------
60 * When defined, the code to support the keyword del is included in the build.
61 * This involves the bytecodes: DELETE_SUBSCR, DELETE_NAME, DELETE_ATTR,
62 * DELETE_GLOBAL and DELETE_FAST.
65 * HAVE_IMPORTS
66 * ------------
68 * When defined, the code to support the IMPORT_FROM and IMPORT_STAR styles
69 * is included in the build.
72 * HAVE_DEFAULTARGS
73 * ----------------
75 * When defined, the code to support default arguments to functions is included
76 * in the build.
77 * Issue #157 Support default args
80 * HAVE_REPLICATION
81 * ----------------
83 * When defined, the code to support sequence (list, tuple, string) replcation
84 * is included in the build.
85 * This feature is required by the builtin function __bi.map().
86 * #160 Add support for string and tuple replication
89 * HAVE_CLASSES
90 * ------------
92 * When defined, the code to support classes, instances, methods, etc.
93 * is included in the build.
94 * Issue #202 Implement classes in the vm
97 * HAVE_ASSERT
98 * -----------
100 * When defined, the code to support the assert statement is included
101 * in the build.
104 * HAVE_GENERATORS
105 * ---------------
107 * When defined, the code to support the yield keyword's use for
108 * generator-iterators is included in the build.
109 * Issue #207 Add support for the yield keyword
112 * HAVE_BACKTICK
113 * -------------
115 * When defined, the code to support the backtick operation (`x`) is included
116 * in the build.
117 * REQUIRES stdio.h to have snprintf()
118 * Issue #244 Add support for the backtick operation (UNARY_CONVERT)
121 * HAVE_STRING_FORMAT
122 * ------------------
124 * When defined, the code to perform string formatting using the binary modulo
125 * operator is included in the build.
126 * REQUIRES stdio.h to have snprintf()
127 * Issue #205 Add support for string format operation
130 * HAVE_CLOSURES
131 * -------------
133 * When defined, the code to support function closures is included in the
134 * build.
135 * Issue #256 Add support for closures
138 * HAVE_BYTEARRAY
139 * --------------
141 * When defined, the code to support the bytearray type is included in the
142 * build. NOTE: If this is defined, the bytearray class in src/lib/__bi.py
143 * must also be uncommented.
144 * Issue #289 Create bytearray datatype
147 * HAVE_DEBUG_INFO
148 * ---------------
150 * When defined, the code to support debug information in exception reports
151 * is included in the build.
152 * Issue #103 Add debug info to exception reports
155 /* Check for dependencies */
157 #if defined(HAVE_ASSERT) && !defined(HAVE_CLASSES)
158 #error HAVE_ASSERT requires HAVE_CLASSES
159 #endif
162 #if defined(HAVE_GENERATORS) && !defined(HAVE_CLASSES)
163 #error HAVE_GENERATORS requires HAVE_CLASSES
164 #endif
167 #if defined(HAVE_CLOSURES) && !defined(HAVE_DEFAULTARGS)
168 #error HAVE_CLOSURES requires HAVE_DEFAULTARGS
169 #endif
172 #if defined(HAVE_BYTEARRAY) && !defined(HAVE_CLASSES)
173 #error HAVE_BYTEARRAY requires HAVE_CLASSES
174 #endif
176 #endif /* __PM_EMPTY_PM_FEATURES_H__ */