diff --git a/Makefile b/Makefile index ecbe78db..392c7adb 100644 --- a/Makefile +++ b/Makefile @@ -82,6 +82,7 @@ CONFIGOPTS_NONDEBUG_SIZE=--option-file config/examples/low_memory.yaml CONFIGOPTS_NONDEBUG_AJDUK=--option-file util/makeduk_base.yaml --option-file util/makeduk_ajduk.yaml --fixup-file util/makeduk_ajduk_fixup.h CONFIGOPTS_NONDEBUG_ROM=--rom-support --rom-auto-lightfunc --option-file util/makeduk_base.yaml -DDUK_USE_ROM_STRINGS -DDUK_USE_ROM_OBJECTS -DDUK_USE_ROM_GLOBAL_INHERIT -UDUK_USE_HSTRING_ARRIDX CONFIGOPTS_NONDEBUG_AJDUK_ROM=--rom-support --rom-auto-lightfunc --builtin-file util/example_user_builtins1.yaml --builtin-file util/example_user_builtins2.yaml -DDUK_USE_ROM_STRINGS -DDUK_USE_ROM_OBJECTS -DDUK_USE_ROM_GLOBAL_INHERIT -UDUK_USE_HSTRING_ARRIDX -DDUK_USE_ASSERTIONS -UDUK_USE_DEBUG +CONFIGOPTS_NONDEBUG_AJDUK_NOREFC=--option-file util/makeduk_base.yaml --option-file util/makeduk_ajduk.yaml --fixup-file util/makeduk_ajduk_fixup.h -UDUK_USE_REFERENCE_COUNTING -UDUK_USE_DOUBLE_LINKED_HEAP CONFIGOPTS_DEBUG=--option-file util/makeduk_base.yaml --option-file util/makeduk_debug.yaml CONFIGOPTS_DEBUG_SCANBUILD=--option-file util/makeduk_base.yaml --option-file util/makeduk_debug.yaml --option-file util/makeduk_scanbuild.yaml CONFIGOPTS_DEBUG_ROM=--rom-support --rom-auto-lightfunc --option-file util/makeduk_base.yaml --option-file util/makeduk_debug.yaml -DDUK_USE_ROM_STRINGS -DDUK_USE_ROM_OBJECTS -DDUK_USE_ROM_GLOBAL_INHERIT -UDUK_USE_HSTRING_ARRIDX @@ -304,6 +305,9 @@ prep/ajduk-nondebug: prep prep/ajduk-nondebug-rom: prep @rm -rf ./prep/ajduk-nondebug-rom $(PYTHON) tools/configure.py --output-directory ./prep/ajduk-nondebug-rom --source-directory src-input --config-metadata config $(CONFIGOPTS_NONDEBUG_AJDUK_ROM) --line-directives +prep/ajduk-nondebug-norefc: prep + @rm -rf ./prep/ajduk-nondebug-norefc + $(PYTHON) tools/configure.py --output-directory ./prep/ajduk-nondebug-norefc --source-directory src-input --config-metadata config $(CONFIGOPTS_NONDEBUG_AJDUK_NOREFC) --line-directives # Library targets. libduktape.so.1.0.0: prep/nondebug @@ -420,6 +424,17 @@ ajduk-rom: alljoyn-js ajtcl linenoise prep/ajduk-nondebug-rom @echo "*** SUCCESS:" @ls -l $@ -@size $@ +ajduk-norefc: alljoyn-js ajtcl linenoise prep/ajduk-nondebug-norefc + $(CC) -o $@ \ + -Ialljoyn-js/src -Iajtcl/inc/ -Iajtcl/src/target/linux/ -Iprep/ajduk-nondebug-norefc \ + $(CCOPTS_NONDEBUG) $(CCOPTS_AJDUK) \ + prep/ajduk-nondebug-norefc/duktape.c $(DUKTAPE_CMDLINE_SOURCES) \ + examples/cmdline/duk_cmdline_ajduk.c \ + alljoyn-js/src/ajs_heap.c ajtcl/src/aj_debug.c ajtcl/src/target/linux/aj_target_util.c \ + -lm -lpthread + @echo "*** SUCCESS:" + @ls -l $@ + -@size $@ # util/fix_emscripten.py is used so that emduk.js can also be executed using # Duktape itself (though you can't currently pass arguments/files to it). # No Emscripten fixes are needed in practice since Duktape 1.5.0. diff --git a/RELEASES.rst b/RELEASES.rst index 144ce056..ac42c79b 100644 --- a/RELEASES.rst +++ b/RELEASES.rst @@ -2242,6 +2242,9 @@ Planned given has no prototype (e.g. argument is Object.prototype) (GH-1162, GH-1163) +* Fix compile error when using 16-bit fields and disabling refcounting at + the same time (GH-1207) + * Miscellaneous portability improvements: remove dependency on fmin() and fmax() (GH-1072); remove signed shifts in lightfunc handling (GH-1172) diff --git a/src-input/duk_heaphdr.h b/src-input/duk_heaphdr.h index cede739c..e80fa98f 100644 --- a/src-input/duk_heaphdr.h +++ b/src-input/duk_heaphdr.h @@ -80,6 +80,8 @@ struct duk_heaphdr_string { #else duk_size_t h_refcount; #endif +#else + duk_uint16_t h_strextra16; #endif }; @@ -710,6 +712,9 @@ struct duk_heaphdr_string { #else /* DUK_USE_REFERENCE_COUNTING */ +#define DUK_TVAL_NEEDS_REFCOUNT_UPDATE(tv) 0 +#define DUK_HEAPHDR_NEEDS_REFCOUNT_UPDATE(h) 0 + #define DUK_TVAL_INCREF_FAST(thr,v) do {} while (0) /* nop */ #define DUK_TVAL_DECREF_FAST(thr,v) do {} while (0) /* nop */ #define DUK_TVAL_DECREF_NORZ_FAST(thr,v) do {} while (0) /* nop */ diff --git a/testrunner/client-simple-node/run_commit_test.py b/testrunner/client-simple-node/run_commit_test.py index b30c8af1..1e0e709f 100644 --- a/testrunner/client-simple-node/run_commit_test.py +++ b/testrunner/client-simple-node/run_commit_test.py @@ -427,6 +427,15 @@ def context_linux_x86_ajduk(): ]) return 'hello world!\n' in res['stdout'] +def context_linux_x86_ajduk_norefc(): + cwd = os.getcwd() + execute([ 'make', 'ajduk-norefc' ]) + res = execute([ + os.path.join(cwd, 'ajduk-norefc'), + '-e', 'print("hello world!");' + ]) + return 'hello world!\n' in res['stdout'] + def context_linux_x86_ajduk_rombuild(): cwd = os.getcwd() @@ -920,6 +929,7 @@ context_handlers = { 'linux-x64-cpp-exceptions': context_linux_x64_cpp_exceptions, 'linux-x86-ajduk': context_linux_x86_ajduk, + 'linux-x86-ajduk-norefc': context_linux_x86_ajduk_norefc, 'linux-x86-ajduk-rombuild': context_linux_x86_ajduk_rombuild, 'linux-x64-v8-bench-pass': context_linux_x64_v8_bench_pass, diff --git a/util/makeduk_ajduk.yaml b/util/makeduk_ajduk.yaml index de27ecbd..f05e83de 100644 --- a/util/makeduk_ajduk.yaml +++ b/util/makeduk_ajduk.yaml @@ -1,5 +1,8 @@ # Base options for 'ajduk'. +#DUK_USE_REFERENCE_COUNTING: false +#DUK_USE_DOUBLE_LINKED_HEAP: false + DUK_USE_ALIGN_BY: 4 DUK_USE_ASSERTIONS: true DUK_USE_LIGHTFUNC_BUILTINS: true