Skip to content

Commit 8041de5

Browse files
stinosdpgeorge
authored andcommitted
windows/mpconfigport: Enable some features, including the Python stack
Add some features which are already enabled in the unix port and default to using the Python stack for scoped allocations: this can be more performant in cases the heap is heavily used because for example the memory needed for storing *args and **kwargs doesn't require scanning the heap to find a free block.
1 parent 6fc58db commit 8041de5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ports/windows/mpconfigport.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#define MICROPY_COMP_RETURN_IF_EXPR (1)
4242
#define MICROPY_ENABLE_GC (1)
4343
#define MICROPY_ENABLE_FINALISER (1)
44+
#define MICROPY_ENABLE_PYSTACK (1)
4445
#define MICROPY_STACK_CHECK (1)
4546
#define MICROPY_MALLOC_USES_ALLOCATED_SIZE (1)
4647
#define MICROPY_MEM_STATS (1)
@@ -56,6 +57,7 @@
5657
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_DOUBLE)
5758
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)
5859
#define MICROPY_STREAMS_NON_BLOCK (1)
60+
#define MICROPY_STREAMS_POSIX_API (1)
5961
#define MICROPY_OPT_COMPUTED_GOTO (0)
6062
#define MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE (1)
6163
#define MICROPY_CAN_OVERRIDE_BUILTINS (1)
@@ -73,6 +75,7 @@
7375
#define MICROPY_PY_BUILTINS_POW3 (1)
7476
#define MICROPY_PY_MICROPYTHON_MEM_INFO (1)
7577
#define MICROPY_PY_ALL_SPECIAL_METHODS (1)
78+
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (1)
7679
#define MICROPY_PY_ARRAY_SLICE_ASSIGN (1)
7780
#define MICROPY_PY_BUILTINS_SLICE_ATTRS (1)
7881
#define MICROPY_PY_SYS_EXIT (1)
@@ -109,9 +112,12 @@
109112
#define MICROPY_MACHINE_MEM_GET_WRITE_ADDR mod_machine_mem_get_addr
110113

111114
#define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_DETAILED)
115+
#define MICROPY_ERROR_PRINTER (&mp_stderr_print)
112116
#define MICROPY_WARNINGS (1)
113117
#define MICROPY_PY_STR_BYTES_CMP_WARN (1)
114118

119+
extern const struct _mp_print_t mp_stderr_print;
120+
115121
#ifdef _MSC_VER
116122
#define MICROPY_GCREGS_SETJMP (1)
117123
#endif

0 commit comments

Comments
 (0)