File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,11 @@ Possible compile time enabled feature types:
53
53
- JERRY_FEATURE_SNAPSHOT_EXEC - executing snapshot files
54
54
- JERRY_FEATURE_DEBUGGER - debugging
55
55
- JERRY_FEATURE_VM_EXEC_STOP - stopping ECMAScript execution
56
+ - JERRY_FEATURE_JSON - JSON support
57
+ - JERRY_FEATURE_PROMISE - promise support
58
+ - JERRY_FEATURE_TYPEDARRAY - Typedarray support
59
+ - JERRY_FEATURE_DATE - Date support
60
+ - JERRY_FEATURE_REGEXP - RegExp support
56
61
57
62
## jerry_char_t
58
63
Original file line number Diff line number Diff line change @@ -864,6 +864,21 @@ bool jerry_is_feature_enabled (const jerry_feature_t feature)
864
864
#ifdef JERRY_VM_EXEC_STOP
865
865
|| feature == JERRY_FEATURE_VM_EXEC_STOP
866
866
#endif /* JERRY_VM_EXEC_STOP */
867
+ #ifndef CONFIG_DISABLE_JSON_BUILTIN
868
+ || feature == JERRY_FEATURE_JSON
869
+ #endif /* !CONFIG_DISABLE_JSON_BUILTIN */
870
+ #ifndef CONFIG_DISABLE_ES2015_PROMISE_BUILTIN
871
+ || feature == JERRY_FEATURE_PROMISE
872
+ #endif /* !CONFIG_DISABLE_ES2015_PROMISE_BUILTIN */
873
+ #ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
874
+ || feature == JERRY_FEATURE_TYPEDARRAY
875
+ #endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
876
+ #ifndef CONFIG_DISABLE_DATE_BUILTIN
877
+ || feature == JERRY_FEATURE_DATE
878
+ #endif /* !CONFIG_DISABLE_DATE_BUILTIN */
879
+ #ifndef CONFIG_DISABLE_REGEXP_BUILTIN
880
+ || feature == JERRY_FEATURE_REGEXP
881
+ #endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
867
882
);
868
883
} /* jerry_is_feature_enabled */
869
884
Original file line number Diff line number Diff line change @@ -90,6 +90,11 @@ typedef enum
90
90
JERRY_FEATURE_SNAPSHOT_EXEC , /**< executing snapshot files */
91
91
JERRY_FEATURE_DEBUGGER , /**< debugging */
92
92
JERRY_FEATURE_VM_EXEC_STOP , /**< stopping ECMAScript execution */
93
+ JERRY_FEATURE_JSON , /**< JSON support */
94
+ JERRY_FEATURE_PROMISE , /**< promise support */
95
+ JERRY_FEATURE_TYPEDARRAY , /**< Typedarray support */
96
+ JERRY_FEATURE_DATE , /**< Date support */
97
+ JERRY_FEATURE_REGEXP , /**< Regexp support */
93
98
JERRY_FEATURE__COUNT /**< number of features. NOTE: must be at the end of the list */
94
99
} jerry_feature_t ;
95
100
You can’t perform that action at this time.
0 commit comments