From 9d2c37a4afb1be790ee5435f91a83a80e4e3ad28 Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Fri, 16 Sep 2016 02:24:04 +0300 Subject: [PATCH 1/2] Use compact refcounts for lowmem build --- config/examples/low_memory.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/examples/low_memory.yaml b/config/examples/low_memory.yaml index a4bd9325..ab1f4cf6 100644 --- a/config/examples/low_memory.yaml +++ b/config/examples/low_memory.yaml @@ -13,6 +13,7 @@ DUK_USE_PREFER_SIZE: true DUK_USE_EXEC_PREFER_SIZE: true +DUK_USE_FAST_REFCOUNT_DEFAULT: false DUK_USE_AUGMENT_ERROR_CREATE: false DUK_USE_AUGMENT_ERROR_THROW: false DUK_USE_TRACEBACKS: false From 2bb6df220e80d7cff3d1e175b09a50652eeef484 Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Fri, 16 Sep 2016 02:34:29 +0300 Subject: [PATCH 2/2] Add duk-size test target --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile b/Makefile index 12d0829e..21a5eaae 100644 --- a/Makefile +++ b/Makefile @@ -71,6 +71,7 @@ LINENOISE_SOURCES = \ CONFIGOPTS_NONDEBUG=--option-file util/makeduk_base.yaml CONFIGOPTS_NONDEBUG_SCANBUILD=--option-file util/makeduk_base.yaml --option-file util/makeduk_scanbuild.yaml CONFIGOPTS_NONDEBUG_PERF=--option-file config/examples/performance_sensitive.yaml +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 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 -DDUK_USE_ASSERTIONS -UDUK_USE_DEBUG @@ -261,6 +262,9 @@ prep/nondebug-scanbuild: prep prep/nondebug-perf: prep @rm -rf ./prep/nondebug-perf $(PYTHON) tools/configure.py --output-directory ./prep/nondebug-perf --source-directory src-input --config-metadata config $(CONFIGOPTS_NONDEBUG_PERF) --line-directives +prep/nondebug-size: prep + @rm -rf ./prep/nondebug-size + $(PYTHON) tools/configure.py --output-directory ./prep/nondebug-size --source-directory src-input --config-metadata config $(CONFIGOPTS_NONDEBUG_SIZE) --line-directives prep/nondebug-rom: prep @rm -rf ./prep/nondebug-rom $(PYTHON) tools/configure.py --output-directory ./prep/nondebug-rom --source-directory src-input --config-metadata config $(CONFIGOPTS_NONDEBUG_ROM) --line-directives @@ -307,6 +311,10 @@ duk-perf: linenoise prep/nondebug-perf $(CC) -o $@ -Iprep/nondebug-perf $(CCOPTS_NONDEBUG) prep/nondebug-perf/duktape.c $(DUKTAPE_CMDLINE_SOURCES) $(LINENOISE_SOURCES) $(CCLIBS) @ls -l $@ -@size $@ +duk-size: linenoise prep/nondebug-size + $(CC) -o $@ -Iprep/nondebug-size $(CCOPTS_NONDEBUG) prep/nondebug-size/duktape.c $(DUKTAPE_CMDLINE_SOURCES) $(LINENOISE_SOURCES) $(CCLIBS) + @ls -l $@ + -@size $@ duk-rom: linenoise prep/nondebug-rom $(CC) -o $@ -Iprep/nondebug-rom $(CCOPTS_NONDEBUG) prep/nondebug-rom/duktape.c $(DUKTAPE_CMDLINE_SOURCES) $(LINENOISE_SOURCES) $(CCLIBS) @ls -l $@