Browse Source

Config option for allowing undefined behavior

pull/1795/head
Sami Vaarala 7 years ago
parent
commit
9afe60f045
  1. 10
      config/config-options/DUK_USE_ALLOW_UNDEFINED_BEHAVIOR.yaml
  2. 6
      config/examples/low_memory.yaml

10
config/config-options/DUK_USE_ALLOW_UNDEFINED_BEHAVIOR.yaml

@ -0,0 +1,10 @@
define: DUK_USE_ALLOW_UNDEFINED_BEHAVIOR
introduced: 2.3.0
default: false
tags:
- portability
description: >
Allow technically undefined behavior such as out-of-range double-to-integer
casts, floating point division by zero, etc. which are likely to work on the
majority of platforms. Default is to avoid such behaviors, at the cost of
some footprint and performance.

6
config/examples/low_memory.yaml

@ -15,6 +15,12 @@
# memory layout if the architecture supports it.
#DUK_USE_ALIGN_BY: 1
# With the vast majority of compilers some of the 'undefined behavior'
# assumptions are fine, and produce smaller and faster code, so enable
# by default for lowmem targets. You may need to disable this for some
# compilers.
DUK_USE_ALLOW_UNDEFINED_BEHAVIOR: true
DUK_USE_PREFER_SIZE: true
DUK_USE_EXEC_PREFER_SIZE: true
DUK_USE_FAST_REFCOUNT_DEFAULT: false

Loading…
Cancel
Save