-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathjsb.config.h
120 lines (91 loc) · 4.1 KB
/
jsb.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
#ifndef GODOTJS_CONFIG_H
#define GODOTJS_CONFIG_H
#ifndef JSB_DEBUG
# if defined(DEBUG_ENABLED)
# define JSB_DEBUG 1
# else
# define JSB_DEBUG 0
# endif
#endif
// lower log levels are completely skipped (at compile-time)
// see `internal/jsb_log_severity.def.h`
#ifndef JSB_MIN_LOG_LEVEL
# if JSB_DEBUG
# define JSB_MIN_LOG_LEVEL Verbose
# else
# define JSB_MIN_LOG_LEVEL Warning
# endif
#endif // JSB_MIN_LOG_LEVEL
// enable jsb_check
#ifndef JSB_WITH_CHECK
#define JSB_WITH_CHECK JSB_DEBUG
#endif
// output verbose log anyway even if `OS::get_singleton()->is_stdout_verbose()` is false
#define JSB_VERBOSE_ENABLED 0
// print benchmark
#define JSB_BENCHMARK 1
// [EXPERIMENTAL] enable auto-complete feature in the input field of REPL.
//NOTE this feature introduces side effects since it will try to evaluate the input string before you submit.
#define JSB_REPL_AUTO_COMPLETE 1
// Check if the type of `p_pointer` is really NativeClassType::GodotObject.
#define JSB_VERIFY_GODOT_OBJECT 1
// (only available when using v8)
// enable `RequestGarbageCollectionForTesting` (not recommended)
#define JSB_EXPOSE_GC_FOR_TESTING 0
// (only available when using v8)
// print gc time cost in milliseconds
#define JSB_PRINT_GC_TIME 1
// (only available in editor build)
// support hot-reload for javascript modules
#define JSB_SUPPORT_RELOAD 1
// translate the js source stacktrace with source map (currently, the `.map` file must locate at the same filename & directory of the js source)
#define JSB_WITH_SOURCEMAP 1
// log with C++ [source filename, line number, function name]
#define JSB_LOG_WITH_SOURCE 0
// use a pool allocator for creating variant instances
#define JSB_WITH_VARIANT_POOL 1
// construct a Variant with `Variant::construct` instead of `VariantUtilityFunctions::type_convert`
#define JSB_CONSTRUCT_DEFAULT_VARIANT_SLOW 0
// NOT IMPLEMENTED YET
#define JSB_WITH_STATIC_BINDINGS 0
// utf16 conversion may have less overhead, but uses more memory?
#define JSB_UTF16_CONV_PREFERRED 1
// quickjs.impl only, all Object(JSValue) must be explicitly free-ed on the Isolate disposing
#define JSB_STRICT_DISPOSE 1
// use bigint if a value can not represented as Integer(Number)
#define JSB_WITH_BIGINT 1
// use `BigInt` if a value from godot greater than JSB_MAX_SAFE_INTEGER which can not represented as Integer(Number).
// used only if `JSB_WITH_BIGINT` is enabled.
// DO NOT CHANGE THIS VALUE.
#define JSB_MAX_SAFE_INTEGER (((int64_t)1 << 53) - 1) // 9007199254740991
// [EXPERIMENTAL] use optimized wrapper function calls if possible
#define JSB_FAST_REFLECTION 1
// implicitly convert a javascript array as godot Vector<T> which is convenient but less performant if massively used
#define JSB_IMPLICIT_PACKED_ARRAY_CONVERSION 1
// not to generate method declaration if already defined as get/set property
#define JSB_EXCLUDE_GETSET_METHODS 1
// [low level] debug value add/remove issues in SArray
#define JSB_SARRAY_DEBUG 0
#define JSB_SARRAY_CONSISTENCY_CHECK 0
// use url scheme to avoid the file separator conversion on windows.
// disable if not supported by the remote debugger.
#define JSB_WITH_URI_SCRIPT_ORIGIN 0
// slots for object/script/class info is reallocated on heap (as a whole block of memory)
// a suitable value can avoid unnecessary reallocation
#define JSB_MASTER_INITIAL_OBJECT_SLOTS (1024 * 64)
#define JSB_MASTER_INITIAL_SCRIPT_SLOTS 1024
#define JSB_MASTER_INITIAL_CLASS_EXTRA_SLOTS 0
#define JSB_MASTER_VARIANT_DELETION_QUEUE_SIZE (1024 * 16)
#define JSB_WORKER_INITIAL_OBJECT_SLOTS (1024 * 8)
#define JSB_WORKER_INITIAL_SCRIPT_SLOTS 1024
#define JSB_WORKER_INITIAL_CLASS_SLOTS 512
#define JSB_WORKER_VARIANT_DELETION_QUEUE_SIZE (1024)
#define JSB_DTS_EXT "d.ts"
#define JSB_TYPESCRIPT_EXT "ts"
#define JSB_JAVASCRIPT_EXT "js"
#define JSB_COMMONJS_EXT "cjs"
// A helper version tag for the jsb.*.bundle.js scripts (which is embedded in .cpp source).
// It could ensure your engine built with the expected version of the jsb bundle scripts.
// If static_assert in `jsb_project_preset.gen.cpp` fails, please run your `scons` command again to update all bundle scripts.
#define JSB_BUNDLE_VERSION 6
#endif