Browse Source

Add an examples directory to config

Also add examples for:

- Low memory
- Performance sensitive
- Timing sensitive
- Enable fastint
- Disable ES6
- Debug print levels
pull/264/head
Sami Vaarala 9 years ago
parent
commit
2481c34e2f
  1. 5
      config/examples/disable_es6.yaml
  2. 3
      config/examples/enable_debug_print1.yaml
  3. 4
      config/examples/enable_debug_print2.yaml
  4. 5
      config/examples/enable_debug_print3.yaml
  5. 3
      config/examples/enable_fastint.yaml
  6. 32
      config/examples/low_memory.yaml
  7. 15
      config/examples/performance_sensitive.yaml
  8. 6
      config/examples/timing_sensitive.yaml
  9. 3
      util/make_dist.sh

5
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

3
config/examples/enable_debug_print1.yaml

@ -0,0 +1,3 @@
# Enable debug level 1.
DUK_USE_DEBUG: true
DUK_USE_DPRINT: true

4
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

5
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

3
config/examples/enable_fastint.yaml

@ -0,0 +1,3 @@
# Enable fastint support.
DUK_USE_FASTINT: true

32
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

15
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

6
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

3
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 \

Loading…
Cancel
Save