diff --git a/config/examples/disable_es6.yaml b/config/examples/disable_es6.yaml new file mode 100644 index 00000000..353a3813 --- /dev/null +++ b/config/examples/disable_es6.yaml @@ -0,0 +1,5 @@ +# Disable ES6 features. + +DUK_USE_ES6_OBJECT_PROTO_PROPERTY: false +DUK_USE_ES6_OBJECT_SETPROTOTYPEOFS: false +DUK_USE_ES6_PROXY: false diff --git a/config/examples/enable_debug_print1.yaml b/config/examples/enable_debug_print1.yaml new file mode 100644 index 00000000..ba47d637 --- /dev/null +++ b/config/examples/enable_debug_print1.yaml @@ -0,0 +1,3 @@ +# Enable debug level 1. +DUK_USE_DEBUG: true +DUK_USE_DPRINT: true diff --git a/config/examples/enable_debug_print2.yaml b/config/examples/enable_debug_print2.yaml new file mode 100644 index 00000000..44fe8d17 --- /dev/null +++ b/config/examples/enable_debug_print2.yaml @@ -0,0 +1,4 @@ +# Enable debug level 2. +DUK_USE_DEBUG: true +DUK_USE_DPRINT: true +DUK_USE_DDPRINT: true diff --git a/config/examples/enable_debug_print3.yaml b/config/examples/enable_debug_print3.yaml new file mode 100644 index 00000000..1733ff10 --- /dev/null +++ b/config/examples/enable_debug_print3.yaml @@ -0,0 +1,5 @@ +# Enable debug level 3. +DUK_USE_DEBUG: true +DUK_USE_DPRINT: true +DUK_USE_DDPRINT: true +DUK_USE_DDDPRINT: true diff --git a/config/examples/enable_fastint.yaml b/config/examples/enable_fastint.yaml new file mode 100644 index 00000000..16ff5c9b --- /dev/null +++ b/config/examples/enable_fastint.yaml @@ -0,0 +1,3 @@ +# Enable fastint support. + +DUK_USE_FASTINT: true diff --git a/config/examples/low_memory.yaml b/config/examples/low_memory.yaml new file mode 100644 index 00000000..b8ea6d2a --- /dev/null +++ b/config/examples/low_memory.yaml @@ -0,0 +1,32 @@ +# Base configuration for low memory environments, see +# doc/low-memory.rst: +# +# - Strips verbose errors etc +# - Strips some Duktape custom feature like JX/JC; keeps e.g. RegExp +# and other standard parts +# - Strips some commonly unnecessary API calls like bytecode dump/load +# - Does not enable pointer compression or external strings: these +# need target specific support code +# + +DUK_USE_AUGMENT_ERROR_CREATE: false +DUK_USE_AUGMENT_ERROR_THROW: false +DUK_USE_TRACEBACKS: false +DUK_USE_ERRCREATE: false +DUK_USE_ERRTHROW: false +DUK_USE_VERBOSE_ERRORS: false +DUK_USE_DEBUGGER_SUPPORT: false # must be disabled if DUK_USE_PC2LINE is disabled +DUK_USE_PC2LINE: false +DUK_USE_LEXER_SLIDING_WINDOW: false +DUK_USE_JSON_STRINGIFY_FASTPATH: false +DUK_USE_JSON_QUOTESTRING_FASTPATH: false +DUK_USE_JSON_DECSTRING_FASTPATH: false +DUK_USE_BYTECODE_DUMP_SUPPORT: false +DUK_USE_JX: false +DUK_USE_JC: false +#DUK_USE_REGEXP_SUPPORT: false +DUK_USE_DEBUG_BUFSIZE: 2048 +DUK_USE_LIGHTFUNC_BUILTINS: true +DUK_USE_STRTAB_CHAIN: true +DUK_USE_STRTAB_PROBE: false +DUK_USE_STRTAB_CHAIN_SIZE: 128 diff --git a/config/examples/performance_sensitive.yaml b/config/examples/performance_sensitive.yaml new file mode 100644 index 00000000..4f73f21b --- /dev/null +++ b/config/examples/performance_sensitive.yaml @@ -0,0 +1,15 @@ +# Base configuration for performance sensitive environments, see +# doc/performance-sensitive.rst. + +# You should choose the fastest setjmp/longjmp for your platform. + +DUK_USE_FASTINT: true +DUK_USE_VALSTACK_UNSAFE: true +DUK_USE_FAST_REFCOUNT_DEFAULT: true +DUK_USE_JSON_STRINGIFY_FASTPATH: true # not fully portable right now +DUK_USE_JSON_QUOTESTRING_FASTPATH: true +DUK_USE_JSON_DECSTRING_FASTPATH: true +DUK_USE_JSON_DECNUMBER_FASTPATH: true +DUK_USE_JSON_EATWHITE_FASTPATH: true +DUK_USE_INTERRUPT_COUNTER: false +DUK_USE_DEBUGGER_SUPPORT: false diff --git a/config/examples/timing_sensitive.yaml b/config/examples/timing_sensitive.yaml new file mode 100644 index 00000000..dd11081b --- /dev/null +++ b/config/examples/timing_sensitive.yaml @@ -0,0 +1,6 @@ +# Base configuration for timing sensitive environments, see +# doc/timing-sensitive.rst: + +DUK_USE_MARK_AND_SWEEP: true +DUK_USE_REFERENCE_COUNTING: true +DUK_USE_VOLUNTARY_GC: false diff --git a/util/make_dist.sh b/util/make_dist.sh index 4aa4e3a5..2933705a 100644 --- a/util/make_dist.sh +++ b/util/make_dist.sh @@ -213,7 +213,8 @@ tar cfz $DIST/config/genconfig_metadata.tar.gz \ feature-options \ config-options \ header-snippets \ - other-defines + other-defines \ + examples cd $ENTRYPWD for i in \ README.rst \