Norimasa Okamoto
/
pymite
python-on-a-chip online compiler
Embed:
(wiki syntax)
Show/hide line numbers
pmFeatureDependencies.h
Go to the documentation of this file.
00001 /* 00002 # This file is Copyright 2010 Dean Hall. 00003 # This file is part of the PyMite VM. 00004 # This file is licensed under the MIT License. 00005 # See the LICENSE file for details. 00006 */ 00007 00008 00009 #ifndef __PM_EMPTY_PM_FEATURES_H__ 00010 #define __PM_EMPTY_PM_FEATURES_H__ 00011 00012 00013 /** 00014 * \file 00015 * \brief Platform feature descriptions and dependency checks 00016 * 00017 * This file explains the purpose of all of the HAVE_* features 00018 * and provides logical checks for features that depend on other features. 00019 * 00020 * A platform defines the features it wants in src/platform/<plat>/pmfeatures.py 00021 * A tool generates C HAVE_* definitions in pmfeatures.h from pmfeatures.py. 00022 * 00023 * 00024 * HAVE_PRINT 00025 * ---------- 00026 * 00027 * When defined, bytecodes PRINT_ITEM and PRINT_NEWLINE are supported. Along 00028 * with these, helper routines in the object type are compiled in that allow 00029 * printing of the object. 00030 * REQUIRES stdio.h to have snprintf() 00031 * 00032 * 00033 * HAVE_GC 00034 * ------- 00035 * 00036 * When defined, the code to perform mark-sweep garbage collection is included 00037 * in the build and automatic GC is enabled. When undefined the allocator 00038 * will distribute memory until none is left, after which a memory exception 00039 * will occur. 00040 * 00041 * 00042 * HAVE_FLOAT 00043 * ---------- 00044 * 00045 * When defined, the code to support floating point objects is included 00046 * in the build. 00047 * Issue #148 Create configurable float datatype 00048 * 00049 * 00050 * HAVE_DEL 00051 * -------- 00052 * 00053 * When defined, the code to support the keyword del is included in the build. 00054 * This involves the bytecodes: DELETE_SUBSCR, DELETE_NAME, DELETE_ATTR, 00055 * DELETE_GLOBAL and DELETE_FAST. 00056 * 00057 * 00058 * HAVE_IMPORTS 00059 * ------------ 00060 * 00061 * When defined, the code to support the IMPORT_FROM and IMPORT_STAR styles 00062 * is included in the build. 00063 * 00064 * 00065 * HAVE_DEFAULTARGS 00066 * ---------------- 00067 * 00068 * When defined, the code to support default arguments to functions is included 00069 * in the build. 00070 * Issue #157 Support default args 00071 * 00072 * 00073 * HAVE_REPLICATION 00074 * ---------------- 00075 * 00076 * When defined, the code to support sequence (list, tuple, string) replcation 00077 * is included in the build. 00078 * This feature is required by the builtin function __bi.map(). 00079 * #160 Add support for string and tuple replication 00080 * 00081 * 00082 * HAVE_CLASSES 00083 * ------------ 00084 * 00085 * When defined, the code to support classes, instances, methods, etc. 00086 * is included in the build. 00087 * Issue #202 Implement classes in the vm 00088 * 00089 * 00090 * HAVE_ASSERT 00091 * ----------- 00092 * 00093 * When defined, the code to support the assert statement is included 00094 * in the build. 00095 * 00096 * 00097 * HAVE_GENERATORS 00098 * --------------- 00099 * 00100 * When defined, the code to support the yield keyword's use for 00101 * generator-iterators is included in the build. 00102 * Issue #207 Add support for the yield keyword 00103 * 00104 * 00105 * HAVE_BACKTICK 00106 * ------------- 00107 * 00108 * When defined, the code to support the backtick operation (`x`) is included 00109 * in the build. 00110 * REQUIRES stdio.h to have snprintf() 00111 * Issue #244 Add support for the backtick operation (UNARY_CONVERT) 00112 * 00113 * 00114 * HAVE_STRING_FORMAT 00115 * ------------------ 00116 * 00117 * When defined, the code to perform string formatting using the binary modulo 00118 * operator is included in the build. 00119 * REQUIRES stdio.h to have snprintf() 00120 * Issue #205 Add support for string format operation 00121 * 00122 * 00123 * HAVE_CLOSURES 00124 * ------------- 00125 * 00126 * When defined, the code to support function closures is included in the 00127 * build. 00128 * Issue #256 Add support for closures 00129 * 00130 * 00131 * HAVE_BYTEARRAY 00132 * -------------- 00133 * 00134 * When defined, the code to support the bytearray type is included in the 00135 * build. NOTE: If this is defined, the bytearray class in src/lib/__bi.py 00136 * must also be uncommented. 00137 * Issue #289 Create bytearray datatype 00138 * 00139 * 00140 * HAVE_DEBUG_INFO 00141 * --------------- 00142 * 00143 * When defined, the code to support debug information in exception reports 00144 * is included in the build. 00145 * Issue #103 Add debug info to exception reports 00146 * 00147 * 00148 * HAVE_SNPRINTF_FORMAT 00149 * -------------------- 00150 * 00151 * When defined, the string format operation is performed using C's snprintf(). 00152 * The snprintf() function and all its helper functions can take up program 00153 * memory, so some people may choose to do without this. 00154 * You should define this when you need precise control over numeric formatting 00155 * such as when you supply numbers between the '%' and the type specifier, 00156 * like so:: 00157 * 00158 * printf "Number = %4d" % someNumber 00159 * pirntf "PI approx = %1.2" % 3.1415 00160 */ 00161 00162 /* Check for dependencies */ 00163 00164 #if defined(HAVE_ASSERT) && !defined(HAVE_CLASSES) 00165 #error HAVE_ASSERT requires HAVE_CLASSES 00166 #endif 00167 00168 00169 #if defined(HAVE_GENERATORS) && !defined(HAVE_CLASSES) 00170 #error HAVE_GENERATORS requires HAVE_CLASSES 00171 #endif 00172 00173 00174 #if defined(HAVE_CLOSURES) && !defined(HAVE_DEFAULTARGS) 00175 #error HAVE_CLOSURES requires HAVE_DEFAULTARGS 00176 #endif 00177 00178 00179 #if defined(HAVE_BYTEARRAY) && !defined(HAVE_CLASSES) 00180 #error HAVE_BYTEARRAY requires HAVE_CLASSES 00181 #endif 00182 00183 #if defined(HAVE_SNPRINTF_FORMAT) && !defined(HAVE_STRING_FORMAT) 00184 #error HAVE_SNPRINTF_FORMAT requires HAVE_STRING_FORMAT 00185 #endif /* __PM_EMPTY_PM_FEATURES_H__ */
Generated on Tue Jul 12 2022 23:13:47 by 1.7.2