davide carboni / Mbed 2 deprecated pymite_http_get

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers pmfeatures.h Source File

pmfeatures.h

00001 /*
00002 # This file is Copyright 2009 Dean Hall.
00003 #
00004 # This file is part of the Python-on-a-Chip program.
00005 # Python-on-a-Chip is free software: you can redistribute it and/or modify
00006 # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
00007 # 
00008 # Python-on-a-Chip is distributed in the hope that it will be useful,
00009 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00011 # A copy of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1
00012 # is seen in the file COPYING up one directory from this.
00013 */
00014 
00015 
00016 /**
00017  * VM feature configuration
00018  *
00019  * Compile time switches to include features or save space.
00020  *
00021  * IMPORTANT: All of the HAVE_* items in this file should also exist in the
00022  * PM_FEATURES dict in src/tools/pmImgCreator.py.  If the item is defined here,
00023  * the corresponding dict value should be True; False otherwise.
00024  */
00025 
00026 
00027 #ifndef FEATURES_H_
00028 #define FEATURES_H_
00029 
00030 
00031 /** Defines the size of the static heap */
00032 #define PM_HEAP_SIZE 0x2000
00033 
00034 
00035 /**
00036  * When defined, bytecodes PRINT_ITEM and PRINT_NEWLINE are supported. Along
00037  * with these, helper routines in the object type are compiled in that allow
00038  * printing of the object.
00039  * REQUIRES stdio.h to have snprintf()
00040  */
00041 #define HAVE_PRINT
00042 
00043 
00044 /**
00045  * When defined, the code to perform mark-sweep garbage collection is included
00046  * in the build and automatic GC is enabled.  When undefined the allocator
00047  * will distribute memory until none is left, after which a memory exception
00048  * will occur.
00049  */
00050 #define HAVE_GC
00051 
00052 
00053 /* #148 Create configurable float datatype */
00054 /**
00055  * When defined, the code to support floating point objects is included
00056  * in the build.
00057  */
00058 #define HAVE_FLOAT
00059 #define PM_FLOAT_LITTLE_ENDIAN
00060 
00061 /**
00062  * When defined, the code to support the keyword del is included in the build.
00063  * This involves the bytecodes: DELETE_SUBSCR, DELETE_NAME, DELETE_ATTR,
00064  * DELETE_GLOBAL and DELETE_FAST.
00065  */
00066 #define HAVE_DEL
00067 
00068 /**
00069  * When defined, the code to support the IMPORT_FROM and IMPORT_STAR styles
00070  * is included in the build.
00071  */
00072 #define HAVE_IMPORTS
00073 
00074 /* #157 Support default args */
00075 /**
00076  * When defined, the code to support default arguments to functions is included
00077  * in the build.
00078  */
00079 #define HAVE_DEFAULTARGS
00080 
00081 /* #160 Add support for string and tuple replication */
00082 /**
00083  * When defined, the code to support sequence (list, tuple, string) replcation
00084  * is included in the build.
00085  * This feature is required by the builtin function __bi.map().
00086  */
00087 #define HAVE_REPLICATION
00088 
00089 /* #202 Implement classes in the vm */
00090 /**
00091  * When defined, the code to support classes, instances, methods, etc.
00092  * is included in the build.
00093  */
00094 #define HAVE_CLASSES
00095 
00096 /**
00097  * When defined, the code to support the assert statement is included
00098  * in the build.
00099  */
00100 #define HAVE_ASSERT
00101 #if defined(HAVE_ASSERT) && !defined(HAVE_CLASSES)
00102 #error HAVE_ASSERT requires HAVE_CLASSES
00103 #endif
00104 
00105 /* #207 Add support for the yield keyword */
00106 /**
00107  * When defined, the code to support the yield keyword's use for 
00108  * generator-iterators is included in the build.
00109  */
00110 #define HAVE_GENERATORS
00111 #if defined(HAVE_GENERATORS) && !defined(HAVE_CLASSES)
00112 #error HAVE_GENERATORS requires HAVE_CLASSES
00113 #endif
00114 
00115 /* #244 Add support for the backtick operation (UNARY_CONVERT) */
00116 /**
00117  * When defined, the code to support the backtick operation (`x`) is included
00118  * in the build.
00119  * REQUIRES stdio.h to have snprintf()
00120  */
00121 #define HAVE_BACKTICK
00122 
00123 /* #205 Add support for string format operation */
00124 /**
00125  * When defined, the code to perform string formatting using the binary modulo
00126  * operator is included in the build.
00127  * REQUIRES stdio.h to have snprintf()
00128  */
00129 #define HAVE_STRING_FORMAT
00130 
00131 /* #256 Add support for closures */
00132 /**
00133  * When defined, the code to support function closures is included in the 
00134  * build.
00135  */
00136 #define HAVE_CLOSURES
00137 #if defined(HAVE_CLOSURES) && !defined(HAVE_DEFAULTARGS)
00138 #error HAVE_CLOSURES requires HAVE_DEFAULTARGS
00139 #endif
00140 
00141 /* #289 Create bytearray datatype */
00142 /**
00143  * When defined, the code to support the bytearray type is included in the
00144  * build.
00145  */
00146 #define HAVE_BYTEARRAY
00147 #if defined(HAVE_BYTEARRAY) && !defined(HAVE_CLASSES)
00148 #error HAVE_BYTEARRAY requires HAVE_CLASSES
00149 #endif
00150 
00151 #endif /* FEATURES_H_ */