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__
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.
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()
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
52 * When defined, the code to support floating point objects is included
54 * Issue #148 Create configurable float datatype
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.
68 * When defined, the code to support the IMPORT_FROM and IMPORT_STAR styles
69 * is included in the build.
75 * When defined, the code to support default arguments to functions is included
77 * Issue #157 Support default args
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
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
100 * When defined, the code to support the assert statement is included
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
115 * When defined, the code to support the backtick operation (`x`) is included
117 * REQUIRES stdio.h to have snprintf()
118 * Issue #244 Add support for the backtick operation (UNARY_CONVERT)
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
133 * When defined, the code to support function closures is included in the
135 * Issue #256 Add support for closures
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
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
162 #if defined(HAVE_GENERATORS) && !defined(HAVE_CLASSES)
163 #error HAVE_GENERATORS requires HAVE_CLASSES
167 #if defined(HAVE_CLOSURES) && !defined(HAVE_DEFAULTARGS)
168 #error HAVE_CLOSURES requires HAVE_DEFAULTARGS
172 #if defined(HAVE_BYTEARRAY) && !defined(HAVE_CLASSES)
173 #error HAVE_BYTEARRAY requires HAVE_CLASSES
176 #endif /* __PM_EMPTY_PM_FEATURES_H__ */