aboutsummaryrefslogtreecommitdiff
path: root/jerry-core/config.h
blob: cfc82f6643308e8cddb8c3f69645c771ec7694b5 (plain)
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
/* Copyright JS Foundation and other contributors, http://js.foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef JERRYSCRIPT_CONFIG_H
#define JERRYSCRIPT_CONFIG_H

// @JERRY_BUILD_CFG@

/**
 * Built-in configurations
 *
 * Allowed values for built-in defines:
 *  0: Disable the given built-in.
 *  1: Enable the given built-in.
 */
/*
 * By default all built-ins are enabled if they are not defined.
 */
#ifndef JERRY_BUILTINS
# define JERRY_BUILTINS 1
#endif /* !defined (JERRY_BUILTINS) */

#ifndef JERRY_BUILTIN_ANNEXB
# define JERRY_BUILTIN_ANNEXB JERRY_BUILTINS
#endif /* !defined (JERRY_BUILTIN_ANNEXB) */

#ifndef JERRY_BUILTIN_ARRAY
# define JERRY_BUILTIN_ARRAY JERRY_BUILTINS
#endif /* !defined (JERRY_BUILTIN_ARRAY) */

#ifndef JERRY_BUILTIN_BOOLEAN
# define JERRY_BUILTIN_BOOLEAN JERRY_BUILTINS
#endif /* !defined (JERRY_BUILTIN_BOOLEAN) */

#ifndef JERRY_BUILTIN_DATE
# define JERRY_BUILTIN_DATE JERRY_BUILTINS
#endif /* !defined (JERRY_BUILTIN_DATE) */

#ifndef JERRY_BUILTIN_ERRORS
# define JERRY_BUILTIN_ERRORS JERRY_BUILTINS
#endif /* !defined (JERRY_BUILTIN_ERRORS) */

#ifndef JERRY_BUILTIN_JSON
# define JERRY_BUILTIN_JSON JERRY_BUILTINS
#endif /* !defined (JERRY_BUILTIN_JSON) */

#ifndef JERRY_BUILTIN_MATH
# define JERRY_BUILTIN_MATH JERRY_BUILTINS
#endif /* !defined (JERRY_BUILTIN_MATH) */

#ifndef JERRY_BUILTIN_NUMBER
# define JERRY_BUILTIN_NUMBER JERRY_BUILTINS
#endif /* !defined (JERRY_BUILTIN_NUMBER) */

#ifndef JERRY_BUILTIN_REGEXP
# define JERRY_BUILTIN_REGEXP JERRY_BUILTINS
#endif /* !defined (JERRY_BUILTIN_REGEXP) */

#ifndef JERRY_BUILTIN_STRING
# define JERRY_BUILTIN_STRING JERRY_BUILTINS
#endif /* !defined (JERRY_BUILTIN_STRING) */

/**
 * ES2015+ related features, by default all of them are enabled.
 */
#ifndef JERRY_ESNEXT
# define JERRY_ESNEXT 1
#endif /* !defined (JERRY_ESNEXT) */

#ifndef JERRY_BUILTIN_BIGINT
# define JERRY_BUILTIN_BIGINT JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_BIGINT) */

#ifndef JERRY_BUILTIN_DATAVIEW
# define JERRY_BUILTIN_DATAVIEW JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_DATAVIEW) */

#ifndef JERRY_BUILTIN_MAP
# define JERRY_BUILTIN_MAP JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_MAP) */

#ifndef JERRY_BUILTIN_PROMISE
# define JERRY_BUILTIN_PROMISE JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_PROMISE) */

#ifndef JERRY_BUILTIN_PROXY
# define JERRY_BUILTIN_PROXY JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_PROXY) */

#ifndef JERRY_BUILTIN_REALMS
# define JERRY_BUILTIN_REALMS JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_REALMS) */

#ifndef JERRY_BUILTIN_REFLECT
# define JERRY_BUILTIN_REFLECT JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_REFLECT) */

#ifndef JERRY_BUILTIN_SET
# define JERRY_BUILTIN_SET JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_SET) */

#ifndef JERRY_BUILTIN_TYPEDARRAY
# define JERRY_BUILTIN_TYPEDARRAY JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_TYPEDARRAY) */

#ifndef JERRY_BUILTIN_WEAKMAP
# define JERRY_BUILTIN_WEAKMAP JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_WEAKMAP) */

#ifndef JERRY_BUILTIN_WEAKSET
# define JERRY_BUILTIN_WEAKSET JERRY_ESNEXT
#endif /* !defined (JERRY_BUILTIN_WEAKSET) */

#ifndef JERRY_MODULE_SYSTEM
# define JERRY_MODULE_SYSTEM JERRY_ESNEXT
#endif /* !defined (JERRY_MODULE_SYSTEM) */

/**
 * Engine internal and misc configurations.
 */

/**
 * Specifies the compressed pointer representation
 *
 * Allowed values:
 *  0: use 16 bit representation
 *  1: use 32 bit representation
 *
 * Default value: 0
 * For more details see: jmem/jmem.h
 */
#ifndef JERRY_CPOINTER_32_BIT
# define JERRY_CPOINTER_32_BIT 0
#endif /* !defined (JERRY_CPOINTER_32_BIT) */

/**
 * Enable/Disable the engine's JavaScript debugger interface
 *
 * Allowed values:
 *  0: Disable the debugger parts.
 *  1: Enable the debugger.
 */
#ifndef JERRY_DEBUGGER
# define JERRY_DEBUGGER 0
#endif /* !defined (JERRY_DEBUGGER) */

/**
 * Enable/Disable built-in error messages for error objects.
 *
 * Allowed values:
 *  0: Disable error messages.
 *  1: Enable error message.
 *
 * Default value: 0
 */
#ifndef JERRY_ERROR_MESSAGES
# define JERRY_ERROR_MESSAGES 0
#endif /* !defined (JERRY_ERROR_MESSAGES) */

/**
 * Enable/Disable external context.
 *
 * Allowed values:
 *  0: Disable external context.
 *  1: Enable external context support.
 *
 * Default value: 0
 */
#ifndef JERRY_EXTERNAL_CONTEXT
# define JERRY_EXTERNAL_CONTEXT 0
#endif /* !defined (JERRY_EXTERNAL_CONTEXT) */

/**
 * Maximum size of heap in kilobytes
 *
 * Default value: 512 KiB
 */
#ifndef JERRY_GLOBAL_HEAP_SIZE
# define JERRY_GLOBAL_HEAP_SIZE (512)
#endif /* !defined (JERRY_GLOBAL_HEAP_SIZE) */

/**
 * The allowed heap usage limit until next garbage collection, in bytes.
 *
 * If value is 0, the default is 1/32 of JERRY_HEAP_SIZE
 */
#ifndef JERRY_GC_LIMIT
# define JERRY_GC_LIMIT 0
#endif /* !defined (JERRY_GC_LIMIT) */

/**
 * Maximum stack usage size in kilobytes
 *
 * Note: This feature cannot be used when 'detect_stack_use_after_return=1' ASAN option is enabled.
 * For more detailed description:
 *   - https://github.com/google/sanitizers/wiki/AddressSanitizerUseAfterReturn#compatibility
 *
 * Default value: 0, unlimited
 */
#ifndef JERRY_STACK_LIMIT
# define JERRY_STACK_LIMIT (0)
#endif /* !defined (JERRY_STACK_LIMIT) */

/**
 * Maximum depth of recursion during GC mark phase
 *
 * Default value: 8
 */
#ifndef JERRY_GC_MARK_LIMIT
# define JERRY_GC_MARK_LIMIT (8)
#endif /* !defined (JERRY_GC_MARK_LIMIT) */

/**
 * Enable/Disable property lookup cache.
 *
 * Allowed values:
 *  0: Disable lookup cache.
 *  1: Enable lookup cache.
 *
 * Default value: 1
 */
#ifndef JERRY_LCACHE
# define JERRY_LCACHE 1
#endif /* !defined (JERRY_LCACHE) */

/**
 * Enable/Disable line-info management inside the engine.
 *
 * Allowed values:
 *  0: Disable line-info in the engine.
 *  1: Enable line-info management.
 *
 * Default value: 0
 */
#ifndef JERRY_LINE_INFO
# define JERRY_LINE_INFO 0
#endif /* !defined (JERRY_LINE_INFO) */

/**
 * Enable/Disable logging inside the engine.
 *
 * Allowed values:
 *  0: Disable internal logging.
 *  1: Enable internal logging.
 *
 * Default value: 0
 */
#ifndef JERRY_LOGGING
# define JERRY_LOGGING 0
#endif /* !defined (JERRY_LOGGING) */

/**
 * Enable/Disable gc call before every allocation.
 *
 * Allowed values:
 *  0: Disable gc call before each allocation.
 *  1: Enable and force gc call before each allocation.
 *
 * Default value: 0
 * Warning!: This is an advanced option and will slow down the engine!
 *           Only enable it for debugging purposes.
 */
#ifndef JERRY_MEM_GC_BEFORE_EACH_ALLOC
# define JERRY_MEM_GC_BEFORE_EACH_ALLOC 0
#endif /* !defined (JERRY_MEM_GC_BEFORE_EACH_ALLOC) */

/**
 * Enable/Disable the collection if run-time memory statistics.
 *
 * Allowed values:
 *  0: Disable run-time memory information collection.
 *  1: Enable run-time memory statistics collection.
 *
 * Default value: 0
 */
#ifndef JERRY_MEM_STATS
# define JERRY_MEM_STATS 0
#endif /* !defined (JERRY_MEM_STATS) */

/**
 * Use 32-bit/64-bit float for ecma-numbers
 * This option is for expert use only!
 *
 * Allowed values:
 *  1: use 64-bit floating point number mode
 *  0: use 32-bit floating point number mode
 *
 * Default value: 1
 */
#ifndef JERRY_NUMBER_TYPE_FLOAT64
# define JERRY_NUMBER_TYPE_FLOAT64 1
#endif /* !defined (JERRY_NUMBER_TYPE_FLOAT64 */

/**
 * Enable/Disable the JavaScript parser.
 *
 * Allowed values:
 *  0: Disable the JavaScript parser and all related functionallity.
 *  1: Enable the JavaScript parser.
 *
 * Default value: 1
 */
#ifndef JERRY_PARSER
# define JERRY_PARSER 1
#endif /* !defined (JERRY_PARSER) */

/**
 * Enable/Disable JerryScript byte code dump functions during parsing.
 * To dump the JerryScript byte code the engine must be initialized with opcodes
 * display flag. This option does not influence RegExp byte code dumps.
 *
 * Allowed values:
 *  0: Disable all bytecode dump functions.
 *  1: Enable bytecode dump functions.
 *
 * Default value: 0
 */
#ifndef JERRY_PARSER_DUMP_BYTE_CODE
# define JERRY_PARSER_DUMP_BYTE_CODE 0
#endif /* defined (JERRY_PARSER_DUMP_BYTE_CODE) */

/**
 * Enable/Disable ECMA property hashmap.
 *
 * Allowed values:
 *  0: Disable property hasmap.
 *  1: Enable property hashmap.
 *
 * Default value: 1
 */
#ifndef JERRY_PROPRETY_HASHMAP
# define JERRY_PROPRETY_HASHMAP 1
#endif /* !defined (JERRY_PROPRETY_HASHMAP) */

/**
 * Enable/Disable byte code dump functions for RegExp objects.
 * To dump the RegExp byte code the engine must be initialized with
 * regexp opcodes display flag. This option does not influence the
 * JerryScript byte code dumps.
 *
 * Allowed values:
 *  0: Disable all bytecode dump functions.
 *  1: Enable bytecode dump functions.
 *
 * Default value: 0
 */
#ifndef JERRY_REGEXP_DUMP_BYTE_CODE
# define JERRY_REGEXP_DUMP_BYTE_CODE 0
#endif /* !defined (JERRY_REGEXP_DUMP_BYTE_CODE) */

/**
 * Enables/disables the RegExp strict mode
 *
 * Default value: 0
 */
#ifndef JERRY_REGEXP_STRICT_MODE
# define JERRY_REGEXP_STRICT_MODE 0
#endif /* !defined (JERRY_REGEXP_STRICT_MODE) */

/**
 * Enable/Disable the snapshot execution functions.
 *
 * Allowed values:
 *  0: Disable snapshot execution.
 *  1: Enable snapshot execution.
 *
 * Default value: 0
 */
#ifndef JERRY_SNAPSHOT_EXEC
# define JERRY_SNAPSHOT_EXEC 0
#endif /* !defined (JERRY_SNAPSHOT_EXEC) */

/**
 * Enable/Disable the snapshot save functions.
 *
 * Allowed values:
 *  0: Disable snapshot save functions.
 *  1: Enable snapshot save functions.
 */
#ifndef JERRY_SNAPSHOT_SAVE
# define JERRY_SNAPSHOT_SAVE 0
#endif /* !defined (JERRY_SNAPSHOT_SAVE) */

/**
 * Enable/Disable usage of system allocator.
 *
 * Allowed values:
 *  0: Disable usage of system allocator.
 *  1: Enable usage of system allocator.
 *
 * Default value: 0
 */
#ifndef JERRY_SYSTEM_ALLOCATOR
# define JERRY_SYSTEM_ALLOCATOR 0
#endif /* !defined (JERRY_SYSTEM_ALLOCATOR) */

/**
 * Enables/disables the unicode case conversion in the engine.
 * By default Unicode case conversion is enabled.
 */
#ifndef JERRY_UNICODE_CASE_CONVERSION
# define JERRY_UNICODE_CASE_CONVERSION 1
#endif /* !defined (JERRY_UNICODE_CASE_CONVERSION) */

/**
 * Configures if the internal memory allocations are exposed to Valgrind or not.
 *
 * Allowed values:
 *  0: Disable the Valgrind specific memory allocation notifications.
 *  1: Enable the Valgrind specific allocation notifications.
 */
#ifndef JERRY_VALGRIND
# define JERRY_VALGRIND 0
#endif /* !defined (JERRY_VALGRIND) */

/**
 * Enable/Disable the vm execution stop callback function.
 *
 * Allowed values:
 *  0: Disable vm exec stop callbacks.
 *  1: Enable vm exec stop callback functionality.
 */
#ifndef JERRY_VM_EXEC_STOP
# define JERRY_VM_EXEC_STOP 0
#endif /* !defined (JERRY_VM_EXEC_STOP) */

/**
 * Advanced section configurations.
 */

/**
 * Allow configuring attributes on a few constant data inside the engine.
 *
 * One of the main usages:
 * Normally compilers store const(ant)s in ROM. Thus saving RAM.
 * But if your compiler does not support it then the directive below can force it.
 *
 * For the moment it is mainly meant for the following targets:
 *      - ESP8266
 *
 * Example configuration for moving (some) constatns into a given section:
 *  # define JERRY_ATTR_CONST_DATA __attribute__((section(".rodata.const")))
 */
#ifndef JERRY_ATTR_CONST_DATA
# define JERRY_ATTR_CONST_DATA
#endif /* !defined (JERRY_ATTR_CONST_DATA) */

/**
 * The JERRY_ATTR_GLOBAL_HEAP allows adding extra attributes for the Jerry global heap.
 *
 * Example on how to move the global heap into it's own section:
 *   #define JERRY_ATTR_GLOBAL_HEAP __attribute__((section(".text.globalheap")))
 */
#ifndef JERRY_ATTR_GLOBAL_HEAP
# define JERRY_ATTR_GLOBAL_HEAP
#endif /* !defined (JERRY_ATTR_GLOBAL_HEAP) */

/**
 * Sanity check for macros to see if the values are 0 or 1
 *
 * If a new feature is added this should be updated.
 */
/**
 * Check base builtins.
 */
#if !defined (JERRY_BUILTIN_ANNEXB) \
|| ((JERRY_BUILTIN_ANNEXB != 0) && (JERRY_BUILTIN_ANNEXB != 1))
# error "Invalid value for JERRY_BUILTIN_ANNEXB macro."
#endif
#if !defined (JERRY_BUILTIN_ARRAY) \
|| ((JERRY_BUILTIN_ARRAY != 0) && (JERRY_BUILTIN_ARRAY != 1))
# error "Invalid value for JERRY_BUILTIN_ARRAY macro."
#endif
#if !defined (JERRY_BUILTIN_BOOLEAN) \
|| ((JERRY_BUILTIN_BOOLEAN != 0) && (JERRY_BUILTIN_BOOLEAN != 1))
# error "Invalid value for JERRY_BUILTIN_BOOLEAN macro."
#endif
#if !defined (JERRY_BUILTIN_DATE) \
|| ((JERRY_BUILTIN_DATE != 0) && (JERRY_BUILTIN_DATE != 1))
# error "Invalid value for JERRY_BUILTIN_DATE macro."
#endif
#if !defined (JERRY_BUILTIN_ERRORS) \
|| ((JERRY_BUILTIN_ERRORS != 0) && (JERRY_BUILTIN_ERRORS != 1))
# error "Invalid value for JERRY_BUILTIN_ERRORS macro."
#endif
#if !defined (JERRY_BUILTIN_JSON) \
|| ((JERRY_BUILTIN_JSON != 0) && (JERRY_BUILTIN_JSON != 1))
# error "Invalid value for JERRY_BUILTIN_JSON macro."
#endif
#if !defined (JERRY_BUILTIN_MATH) \
|| ((JERRY_BUILTIN_MATH != 0) && (JERRY_BUILTIN_MATH != 1))
# error "Invalid value for JERRY_BUILTIN_MATH macro."
#endif
#if !defined (JERRY_BUILTIN_NUMBER) \
|| ((JERRY_BUILTIN_NUMBER != 0) && (JERRY_BUILTIN_NUMBER != 1))
# error "Invalid value for JERRY_BUILTIN_NUMBER macro."
#endif
#if !defined (JERRY_BUILTIN_REGEXP) \
|| ((JERRY_BUILTIN_REGEXP != 0) && (JERRY_BUILTIN_REGEXP != 1))
# error "Invalid value for JERRY_BUILTIN_REGEXP macro."
#endif
#if !defined (JERRY_BUILTIN_STRING) \
|| ((JERRY_BUILTIN_STRING != 0) && (JERRY_BUILTIN_STRING != 1))
# error "Invalid value for JERRY_BUILTIN_STRING macro."
#endif
#if !defined (JERRY_BUILTINS) \
|| ((JERRY_BUILTINS != 0) && (JERRY_BUILTINS != 1))
# error "Invalid value for JERRY_BUILTINS macro."
#endif

/**
 * Check ES2015+ features
 */
#if !defined (JERRY_ESNEXT) \
|| ((JERRY_ESNEXT != 0) && (JERRY_ESNEXT != 1))
# error "Invalid value for JERRY_ESNEXT macro."
#endif
#if !defined (JERRY_BUILTIN_REALMS) \
|| ((JERRY_BUILTIN_REALMS != 0) && (JERRY_BUILTIN_REALMS != 1))
# error "Invalid value for JERRY_BUILTIN_REALMS macro."
#endif
#if !defined (JERRY_BUILTIN_DATAVIEW) \
|| ((JERRY_BUILTIN_DATAVIEW != 0) && (JERRY_BUILTIN_DATAVIEW != 1))
# error "Invalid value for JERRY_BUILTIN_DATAVIEW macro."
#endif
#if !defined (JERRY_BUILTIN_MAP) \
|| ((JERRY_BUILTIN_MAP != 0) && (JERRY_BUILTIN_MAP != 1))
# error "Invalid value for JERRY_BUILTIN_MAP macro."
#endif
#if !defined (JERRY_BUILTIN_REFLECT) \
|| ((JERRY_BUILTIN_REFLECT != 0) && (JERRY_BUILTIN_REFLECT != 1))
# error "Invalid value for JERRY_BUILTIN_REFLECT macro."
#endif
#if !defined (JERRY_BUILTIN_SET) \
|| ((JERRY_BUILTIN_SET != 0) && (JERRY_BUILTIN_SET != 1))
# error "Invalid value for JERRY_BUILTIN_SET macro."
#endif
#if !defined (JERRY_BUILTIN_WEAKMAP) \
|| ((JERRY_BUILTIN_WEAKMAP != 0) && (JERRY_BUILTIN_WEAKMAP != 1))
# error "Invalid value for JERRY_BUILTIN_WEAKMAP macro."
#endif
#if !defined (JERRY_BUILTIN_WEAKSET) \
|| ((JERRY_BUILTIN_WEAKSET != 0) && (JERRY_BUILTIN_WEAKSET != 1))
# error "Invalid value for JERRY_BUILTIN_WEAKSET macro."
#endif
#if !defined (JERRY_BUILTIN_PROMISE) \
|| ((JERRY_BUILTIN_PROMISE != 0) && (JERRY_BUILTIN_PROMISE != 1))
# error "Invalid value for JERRY_BUILTIN_PROMISE macro."
#endif
#if !defined (JERRY_BUILTIN_PROXY) \
|| ((JERRY_BUILTIN_PROXY != 0) && (JERRY_BUILTIN_PROXY != 1))
# error "Invalid value for JERRY_BUILTIN_PROXY macro."
#endif
#if !defined (JERRY_BUILTIN_TYPEDARRAY) \
|| ((JERRY_BUILTIN_TYPEDARRAY != 0) && (JERRY_BUILTIN_TYPEDARRAY != 1))
# error "Invalid value for JERRY_BUILTIN_TYPEDARRAY macro."
#endif
#if !defined (JERRY_BUILTIN_BIGINT) \
|| ((JERRY_BUILTIN_BIGINT != 0) && (JERRY_BUILTIN_BIGINT != 1))
# error "Invalid value for JERRY_BUILTIN_BIGINT macro."
#endif
#if !defined (JERRY_MODULE_SYSTEM) \
|| ((JERRY_MODULE_SYSTEM != 0) && (JERRY_MODULE_SYSTEM != 1))
# error "Invalid value for JERRY_MODULE_SYSTEM macro."
#endif
#if (JERRY_ESNEXT == 0) \
&& ((JERRY_BUILTIN_DATAVIEW == 1) \
|| (JERRY_BUILTIN_MAP == 1) \
|| (JERRY_BUILTIN_SET == 1) \
|| (JERRY_BUILTIN_WEAKMAP == 1) \
|| (JERRY_BUILTIN_WEAKSET == 1) \
|| (JERRY_BUILTIN_PROMISE == 1) \
|| (JERRY_BUILTIN_PROXY == 1) \
|| (JERRY_BUILTIN_REFLECT == 1) \
|| (JERRY_BUILTIN_TYPEDARRAY == 1))
# error "JERRY_ESNEXT should be enabled too to enable JERRY_BUILTIN_xxxxx macro."
#endif
#if (JERRY_ESNEXT == 0) && (JERRY_MODULE_SYSTEM == 1)
# error "JERRY_ESNEXT should be enabled too to enable JERRY_MODULE_SYSTEM macro."
#endif

/**
 * Internal options.
 */
#if !defined (JERRY_CPOINTER_32_BIT) \
|| ((JERRY_CPOINTER_32_BIT != 0) && (JERRY_CPOINTER_32_BIT != 1))
# error "Invalid value for 'JERRY_CPOINTER_32_BIT' macro."
#endif
#if !defined (JERRY_DEBUGGER) \
|| ((JERRY_DEBUGGER != 0) && (JERRY_DEBUGGER != 1))
# error "Invalid value for 'JERRY_DEBUGGER' macro."
#endif
#if !defined (JERRY_ERROR_MESSAGES) \
|| ((JERRY_ERROR_MESSAGES != 0) && (JERRY_ERROR_MESSAGES != 1))
# error "Invalid value for 'JERRY_ERROR_MESSAGES' macro."
#endif
#if !defined (JERRY_EXTERNAL_CONTEXT) \
|| ((JERRY_EXTERNAL_CONTEXT != 0) && (JERRY_EXTERNAL_CONTEXT != 1))
# error "Invalid value for 'JERRY_EXTERNAL_CONTEXT' macro."
#endif
#if !defined (JERRY_GLOBAL_HEAP_SIZE) || (JERRY_GLOBAL_HEAP_SIZE <= 0)
# error "Invalid value for 'JERRY_GLOBAL_HEAP_SIZE' macro."
#endif
#if !defined (JERRY_GC_LIMIT) || (JERRY_GC_LIMIT < 0)
# error "Invalid value for 'JERRY_GC_LIMIT' macro."
#endif
#if !defined (JERRY_STACK_LIMIT) || (JERRY_STACK_LIMIT < 0)
# error "Invalid value for 'JERRY_STACK_LIMIT' macro."
#endif
#if !defined (JERRY_GC_MARK_LIMIT) || (JERRY_GC_MARK_LIMIT < 0)
# error "Invalid value for 'JERRY_GC_MARK_LIMIT' macro."
#endif
#if !defined (JERRY_LCACHE) \
|| ((JERRY_LCACHE != 0) && (JERRY_LCACHE != 1))
# error "Invalid value for 'JERRY_LCACHE' macro."
#endif
#if !defined (JERRY_LINE_INFO) \
|| ((JERRY_LINE_INFO != 0) && (JERRY_LINE_INFO != 1))
# error "Invalid value for 'JERRY_LINE_INFO' macro."
#endif
#if !defined (JERRY_LOGGING) \
|| ((JERRY_LOGGING != 0) && (JERRY_LOGGING != 1))
# error "Invalid value for 'JERRY_LOGGING' macro."
#endif
#if !defined (JERRY_MEM_GC_BEFORE_EACH_ALLOC) \
|| ((JERRY_MEM_GC_BEFORE_EACH_ALLOC != 0) && (JERRY_MEM_GC_BEFORE_EACH_ALLOC != 1))
# error "Invalid value for 'JERRY_MEM_GC_BEFORE_EACH_ALLOC' macro."
#endif
#if !defined (JERRY_MEM_STATS) \
|| ((JERRY_MEM_STATS != 0) && (JERRY_MEM_STATS != 1))
# error "Invalid value for 'JERRY_MEM_STATS' macro."
#endif
#if !defined (JERRY_NUMBER_TYPE_FLOAT64) \
|| ((JERRY_NUMBER_TYPE_FLOAT64 != 0) && (JERRY_NUMBER_TYPE_FLOAT64 != 1))
# error "Invalid value for 'JERRY_NUMBER_TYPE_FLOAT64' macro."
#endif
#if !defined (JERRY_PARSER) \
|| ((JERRY_PARSER != 0) && (JERRY_PARSER != 1))
# error "Invalid value for 'JERRY_PARSER' macro."
#endif
#if !defined (JERRY_PARSER_DUMP_BYTE_CODE) \
|| ((JERRY_PARSER_DUMP_BYTE_CODE != 0) && (JERRY_PARSER_DUMP_BYTE_CODE != 1))
# error "Invalid value for 'JERRY_PARSER_DUMP_BYTE_CODE' macro."
#endif
#if !defined (JERRY_PROPRETY_HASHMAP) \
|| ((JERRY_PROPRETY_HASHMAP != 0) && (JERRY_PROPRETY_HASHMAP != 1))
# error "Invalid value for 'JERRY_PROPRETY_HASHMAP' macro."
#endif
#if !defined (JERRY_REGEXP_DUMP_BYTE_CODE) \
|| ((JERRY_REGEXP_DUMP_BYTE_CODE != 0) && (JERRY_REGEXP_DUMP_BYTE_CODE != 1))
# error "Invalid value for 'JERRY_REGEXP_DUMP_BYTE_CODE' macro."
#endif
#if !defined (JERRY_REGEXP_STRICT_MODE) \
|| ((JERRY_REGEXP_STRICT_MODE != 0) && (JERRY_REGEXP_STRICT_MODE != 1))
# error "Invalid value for 'JERRY_REGEXP_STRICT_MODE' macro."
#endif
#if !defined (JERRY_SNAPSHOT_EXEC) \
|| ((JERRY_SNAPSHOT_EXEC != 0) && (JERRY_SNAPSHOT_EXEC != 1))
# error "Invalid value for 'JERRY_SNAPSHOT_EXEC' macro."
#endif
#if !defined (JERRY_SNAPSHOT_SAVE) \
|| ((JERRY_SNAPSHOT_SAVE != 0) && (JERRY_SNAPSHOT_SAVE != 1))
# error "Invalid value for 'JERRY_SNAPSHOT_SAVE' macro."
#endif
#if !defined (JERRY_SYSTEM_ALLOCATOR) \
|| ((JERRY_SYSTEM_ALLOCATOR != 0) && (JERRY_SYSTEM_ALLOCATOR != 1))
# error "Invalid value for 'JERRY_SYSTEM_ALLOCATOR' macro."
#endif
#if !defined (JERRY_UNICODE_CASE_CONVERSION) \
|| ((JERRY_UNICODE_CASE_CONVERSION != 0) && (JERRY_UNICODE_CASE_CONVERSION != 1))
# error "Invalid value for 'JERRY_UNICODE_CASE_CONVERSION' macro."
#endif
#if !defined (JERRY_VALGRIND) \
|| ((JERRY_VALGRIND != 0) && (JERRY_VALGRIND != 1))
# error "Invalid value for 'JERRY_VALGRIND' macro."
#endif
#if !defined (JERRY_VM_EXEC_STOP) \
|| ((JERRY_VM_EXEC_STOP != 0) && (JERRY_VM_EXEC_STOP != 1))
# error "Invalid value for 'JERRY_VM_EXEC_STOP' macro."
#endif

#define ENABLED(FEATURE) ((FEATURE) == 1)
#define DISABLED(FEATURE) ((FEATURE) != 1)

/**
 * Cross component requirements check.
 */
/**
 * The date module can only use the float 64 number types.
 * Do a check for this.
 */
#if ENABLED (JERRY_BUILTIN_DATE) && !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
#  error "Date does not support float32"
#endif

/**
 * Wrap container types into a single guard
 */
#if ENABLED (JERRY_BUILTIN_MAP) || ENABLED (JERRY_BUILTIN_SET) \
|| ENABLED (JERRY_BUILTIN_WEAKMAP) || ENABLED (JERRY_BUILTIN_WEAKSET)
# define JERRY_BUILTIN_CONTAINER 1
#else
# define JERRY_BUILTIN_CONTAINER 0
#endif

/**
 * Resource name related types into a single guard
 */
#if ENABLED (JERRY_LINE_INFO) || ENABLED (JERRY_ERROR_MESSAGES) || ENABLED (JERRY_MODULE_SYSTEM)
# define JERRY_RESOURCE_NAME 1
#else
# define JERRY_RESOURCE_NAME 0
#endif

#endif /* !JERRYSCRIPT_CONFIG_H */