forked from wasm3/wasm3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathm3_config.h
129 lines (93 loc) · 3.45 KB
/
m3_config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
//
// m3_config.h
//
// Created by Steven Massey on 5/4/19.
// Copyright © 2019 Steven Massey. All rights reserved.
//
#ifndef m3_config_h
#define m3_config_h
#include "m3_config_platforms.h"
// general --------------------------------------------------------------------
# ifndef d_m3CodePageAlignSize
# define d_m3CodePageAlignSize 4096
# endif
# ifndef d_m3EnableCodePageRefCounting
# define d_m3EnableCodePageRefCounting 0
# endif
# ifndef d_m3MaxFunctionStackHeight
# define d_m3MaxFunctionStackHeight 2000 // TODO: comment on upper limit
# endif
# ifndef d_m3MaxFunctionSlots
# define d_m3MaxFunctionSlots 4000 // twice d_m3MaxFunctionStackHeight
# endif
# ifndef d_m3MaxConstantTableSize
# define d_m3MaxConstantTableSize 120
# endif
# ifndef d_m3LogOutput
# define d_m3LogOutput 1
# endif
# ifndef d_m3VerboseLogs
# define d_m3VerboseLogs 1
# endif
# ifndef d_m3FixedHeap
# define d_m3FixedHeap false
//# define d_m3FixedHeap (32*1024)
# endif
# ifndef d_m3FixedHeapAlign
# define d_m3FixedHeapAlign 16
# endif
# ifndef d_m3Use32BitSlots
# define d_m3Use32BitSlots 1
# endif
# ifndef d_m3ProfilerSlotMask
# define d_m3ProfilerSlotMask 0xFFFF
# endif
// profiling and tracing ------------------------------------------------------
# ifndef d_m3EnableOpProfiling
# define d_m3EnableOpProfiling 0 // opcode usage counters
# endif
# ifndef d_m3EnableOpTracing
# define d_m3EnableOpTracing 0 // only works with DEBUG
# endif
// logging --------------------------------------------------------------------
# ifndef d_m3LogParse
# define d_m3LogParse 0 // .wasm binary decoding info
# endif
# ifndef d_m3LogModule
# define d_m3LogModule 0 // wasm module info
# endif
# ifndef d_m3LogCompile
# define d_m3LogCompile 0 // wasm -> metacode generation phase
# endif
# ifndef d_m3LogWasmStack
# define d_m3LogWasmStack 0 // dump the wasm stack when pushed or popped
# endif
# ifndef d_m3LogEmit
# define d_m3LogEmit 0 // metacode generation info
# endif
# ifndef d_m3LogCodePages
# define d_m3LogCodePages 0 // dump metacode pages when released
# endif
# ifndef d_m3LogExec
# define d_m3LogExec 0 // low-level interpreter specific logs
# endif
# ifndef d_m3LogRuntime
# define d_m3LogRuntime 0 // higher-level runtime information
# endif
# ifndef d_m3LogStackTrace
# define d_m3LogStackTrace 0 // dump the call stack when traps occur
# endif
# ifndef d_m3LogNativeStack
# define d_m3LogNativeStack 0 // track the memory usage of the C-stack
# endif
// other ----------------------------------------------------------------------
# ifndef d_m3HasFloat
# define d_m3HasFloat 1 // implement floating point ops
# endif
# ifndef d_m3SkipStackCheck
# define d_m3SkipStackCheck 0 // skip stack overrun checks
# endif
# ifndef d_m3SkipMemoryBoundsCheck
# define d_m3SkipMemoryBoundsCheck 0 // skip memory bounds checks
# endif
#endif // m3_config_h