@ls -la $@ $(speedtest1.wasm)
speedtest1: $(out.speedtest1-vanilla.js)
-#xxx#all: speedtest1
# end speedtest1.js
########################################################################
# tester1.js: cases 1 and 2
# tester1.mjs: cases 3 and 4
#
+# Then we need those again in 64-bit builds, which require a 64-bit
+# pair of js/wasm files.
+#
# To create those, we filter tester1.c-pp.js with $(bin.c-pp)...
-$(eval $(call b.eval.c-pp,filter,tester1.c-pp.js,tester1.js,$(c-pp.D.vanilla)))
-$(eval $(call b.eval.c-pp,filter,tester1.c-pp.js,tester1.mjs,$(c-pp.D.esm)))
-$(eval $(call b.eval.c-pp,filter,tester1.c-pp.html,tester1.html,$(c-pp.D.vanilla)))
-$(eval $(call b.eval.c-pp,filter,tester1.c-pp.html,tester1-esm.html,$(c-pp.D.esm)))
+c-pp.D.64bit = -D64bit
+$(eval $(call b.eval.c-pp,test,tester1.c-pp.js,tester1.js,$(c-pp.D.vanilla)))
+$(eval $(call b.eval.c-pp,test,tester1.c-pp.js,tester1-64bit.js,$(c-pp.D.vanilla64) $(c-pp.D.64bit)))
+$(eval $(call b.eval.c-pp,test,tester1.c-pp.js,tester1.mjs,$(c-pp.D.esm)))
+$(eval $(call b.eval.c-pp,test,tester1.c-pp.js,tester1-64bit.mjs,$(c-pp.D.esm64) $(c-pp.D.64bit)))
+$(eval $(call b.eval.c-pp,test,tester1.c-pp.html,tester1.html,$(c-pp.D.vanilla)))
+$(eval $(call b.eval.c-pp,test,tester1.c-pp.html,tester1-64bit.html,$(c-pp.D.vanilla64) $(c-pp.D.64bit)))
+$(eval $(call b.eval.c-pp,test,tester1.c-pp.html,tester1-esm.html,$(c-pp.D.esm)))
+$(eval $(call b.eval.c-pp,test,tester1.c-pp.html,tester1-esm-64bit.html,$(c-pp.D.esm64) $(c-pp.D.64bit)))
+tester1.js: $(out.vanilla.wasm)
+tester1.mjs: $(out.esm.wasm)
+tester1-64bit.js: $(out.vanilla64.wasm)
+tester1-64bit.mjs: $(out.esm64.wasm)
tester1: tester1.js tester1.mjs tester1.html tester1-esm.html
+tester1: tester1-64bit.js tester1-64bit.mjs tester1-64bit.html tester1-esm-64bit.html
# We do not include $(dir.dout)/sqlite3-bundler-friendly.mjs in this
# because bundlers are client-specific. We don't use any of them.
all quick: tester1
vfprintf(stderr, zFmt, va);
}
fputc('\n', stderr);
+ fflush(stdout);
+ fflush(stderr);
exit(1);
}
void cmpp_process_file(const char * zName){
FileWrapper fw = FileWrapper_empty;
CmppTokenizer ct = CmppTokenizer_empty;
-
FileWrapper_open(&fw, zName, "r");
FileWrapper_slurp(&fw);
g_debug(1,("Read %u byte(s) from [%s]\n", fw.nContent, fw.zName));
- ct.zName = zName;
- ct.zBegin = fw.zContent;
- ct.zEnd = fw.zContent + fw.nContent;
- while(cmpp_next_keyword_line(&ct)){
- cmpp_process_keyword(&ct);
+ if( fw.zContent ){
+ ct.zName = zName;
+ ct.zBegin = fw.zContent;
+ ct.zEnd = fw.zContent + fw.nContent;
+ while(cmpp_next_keyword_line(&ct)){
+ cmpp_process_keyword(&ct);
+ }
}
FileWrapper_close(&fw);
if(0!=ct.level.ndx){
static void usage(int isErr){
FILE * const fOut = isErr ? stderr : stdout;
fprintf(fOut,
- "Usage: %s [flags] [infile]\n"
+ "Usage: %s [flags] [infile...]\n"
"Flags:\n",
g.zArgv0);
#define arg(F,D) fprintf(fOut," %s\n %s\n",F, D)
arg("-f|--file FILE","Read input from FILE (default=- (stdin)).\n"
- " Alternately, the first non-flag argument is assumed to "
- "be the input file.");
+ " Alternately, non-flag arguments are assumed to "
+ "be the input files.");
arg("-o|--outfile FILE","Send output to FILE (default=- (stdout))");
arg("-DXYZ","Define XYZ to true");
arg("-UXYZ","Undefine XYZ (equivalent to false)");
int rc = 0;
int i;
int inclCount = 0;
- const char * zInfile = 0;
+ int nFile = 0;
+ char const *zFileList[128] = {0};
#define M(X) (0==strcmp(X,zArg))
#define ISFLAG(X) else if(M(X))
#define ISFLAG2(X,Y) else if(M(X) || M(Y))
#define ARGVAL \
if(i+1>=argc) fatal("Missing value for flag '%s'", zArg); \
zArg = argv[++i]
+
+ memset(zFileList, 0, sizeof(zFileList));
g.zArgv0 = argv[0];
atexit(cmpp_atexit);
cmpp_initdb();
ISFLAG2("f","file"){
ARGVAL;
do_infile:
- if(zInfile) fatal("Cannot use -i more than once.");
- zInfile = zArg;
+ if( nFile>=sizeof(zFileList)/sizeof(zFileList[0]) ){
+ fatal("Too many file arguments");
+ }
+ zFileList[nFile++] = zArg;
}
ISFLAG2("d","delimiter"){
ARGVAL;
}
ISFLAG("debug"){
++g.doDebug;
- }else if(!zInfile && '-'!=argv[i][0]){
+ }else if('-'!=*zArg){
goto do_infile;
}else{
fatal("Unhandled flag: %s", argv[i]);
}
}
- if(!zInfile) zInfile = "-";
+ if(!nFile){
+ zFileList[nFile++] = "-";
+ }
if(!g.out.zName) g.out.zName = "-";
if(!inclCount) db_include_dir_add(".");
FileWrapper_open(&g.out, g.out.zName, "w");
- cmpp_process_file(zInfile);
+ for(i = 0; i < nFile; ++i){
+ cmpp_process_file(zFileList[i]);
+ }
FileWrapper_close(&g.out);
end:
return rc ? EXIT_FAILURE : EXIT_SUCCESS;
<ul id='test-list'>
<li>Core-most tests
<ul>
- <li><a href='tester1.html'>tester1</a>: Core unit and
+ <li>tester1 (<a href='tester1.html'>32-bit</a>
+ <a href='tester1-64bit.html'>64-bit</a>): Core unit and
regression tests for the various APIs and surrounding
utility code.</li>
- <li><a href='tester1-worker.html'>tester1-worker</a>: same thing
- but running in a Worker.</li>
- <li><a href='tester1-esm.html'>tester1-esm</a>: same as
+ <li>tester1-esm (<a href='tester1-esm.html'>32-bit</a>
+ <a href='tester1-esm-64bit.html'>64-bit</a>): same as
<code>tester1</code> but loads sqlite3 in the main thread via
an ES6 module.
</li>
- <li><a href='tester1-worker.html?esm'>tester1-worker?esm</a>:
- same as <code>tester1-esm</code> but loads a Worker Module which
- then loads the sqlite3 API via an ES6 module. Note that
- not all browsers permit loading modules in Worker
- threads.
+ <li>tester1-worker (<a href='tester1-worker.html'>32-bit</a>
+ <!--a href='tester1-worker-64bit.html'>64-bit</a-->): same thing
+ but running in a Worker.</li>
+ <li>tester1-worker ESM (<a href='tester1-worker.html?esm'>32-bit</a>
+ <!--a href='tester1-worker.html?esm'>64-bit</a-->): same as
+ tester1-worker but loads a Worker Module which then
+ loads the sqlite3 API via an ES6 module. Not all
+ browsers permit loading modules in Worker threads.
</li>
</ul>
</li>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon">
- <link rel="stylesheet" href="../common/emscripten.css"/>
- <link rel="stylesheet" href="../common/testing.css"/>
+ <link rel="stylesheet" href="common/emscripten.css"/>
+ <link rel="stylesheet" href="common/testing.css"/>
<title>sqlite3 tester #1: Worker thread</title>
<style></style>
</head>
logTarget.append(ln);
};
const cbReverse = document.querySelector('#cb-log-reverse');
+ const cbReverseKey = 'tester1:cb-log-reverse';
const cbReverseIt = ()=>{
logTarget.classList[cbReverse.checked ? 'add' : 'remove']('reverse');
+ localStorage.setItem(cbReverseKey, cbReverse.checked ? 1 : 0);
};
cbReverse.addEventListener('change',cbReverseIt,true);
+ if(localStorage.getItem(cbReverseKey)){
+ cbReverse.checked = !!(+localStorage.getItem(cbReverseKey));
+ }
cbReverseIt();
const urlParams = new URL(self.location.href).searchParams;
const workerArgs = [];
if(urlParams.has('esm')){
logHtml('warning',"Attempting to run an ES6 Worker Module, "+
- "which is not supported by all browsers! "+
- "e.g. Firefox (as of 2023-05) cannot do this.");
+ "which is not supported by all browsers!.");
workerArgs.push("tester1.mjs",{type:"module"});
document.querySelectorAll('title,#color-target').forEach((e)=>{
e.innerText = "sqlite3 tester #1: ES6 Worker Module";
<link rel="stylesheet" href="common/testing.css"/>
<title>sqlite3 tester #1:
//#if target=es6-module
-ES6 Module in UI thread
+ES6 Module in
+//#endif
+ UI thread
+//#if 64bit
+ (64-bit WASM)
//#else
-UI thread
+ (32-bit WASM)
//#endif
</title>
<style></style>
document.querySelector('title').innerHTML;
})();</script>
//#if target=es6-module
+//#if 64bit
+ <script src="tester1-64bit.mjs" type="module"></script>
+//#else
<script src="tester1.mjs" type="module"></script>
+//#endif
+//#else
+//#if 64bit
+ <script src="jswasm/sqlite3-64bit.js"></script>
+ <script src="tester1-64bit.js"></script>
//#else
<script src="jswasm/sqlite3.js"></script>
<script src="tester1.js"></script>
//#endif
+//#endif target=es6-module
</body>
</html>
./c-pp -f tester1.c-pp.js -o tester1-esm.mjs -Dtarget=es6-module
*/
//#if target=es6-module
-import {default as sqlite3InitModule} from './jswasm/sqlite3.mjs';
+import {default as sqlite3InitModule} from
+//#if 64bit
+'./jswasm/sqlite3-64bit.mjs'
+//#else
+'./jswasm/sqlite3.mjs'
+//#endif
+;
globalThis.sqlite3InitModule = sqlite3InitModule;
//#else
'use strict';
logTarget.append(ln);
};
const cbReverse = document.querySelector('#cb-log-reverse');
- //cbReverse.setAttribute('checked','checked');
const cbReverseKey = 'tester1:cb-log-reverse';
const cbReverseIt = ()=>{
logTarget.classList[cbReverse.checked ? 'add' : 'remove']('reverse');
- //localStorage.setItem(cbReverseKey, cbReverse.checked ? 1 : 0);
+ localStorage.setItem(cbReverseKey, cbReverse.checked ? 1 : 0);
};
cbReverse.addEventListener('change', cbReverseIt, true);
- /*if(localStorage.getItem(cbReverseKey)){
+ if(localStorage.getItem(cbReverseKey)){
cbReverse.checked = !!(+localStorage.getItem(cbReverseKey));
- }*/
+ }
cbReverseIt();
}else{ /* Worker thread */
console.log("Running in a Worker thread.");
are simply lost, and such scripts see the globalThis.location of
_this_ script.
*/
+//#if 64bit
+ let sqlite3Js = 'sqlite3-64bit.js';
+//#else
let sqlite3Js = 'sqlite3.js';
+//#endif
const urlParams = new URL(globalThis.location.href).searchParams;
if(urlParams.has('sqlite3.dir')){
sqlite3Js = urlParams.get('sqlite3.dir') + '/' + sqlite3Js;
# the naming convention has stuck.
#
-loud ?= 0
-ifeq (1,$(loud))
- $(info $(emo.megaphone) Emitting loud build info. Pass loud=0 to disable it.)
- b.cmd@ =
-else
- $(info $(emo.mute) Eliding loud build info. Pass loud=1 to enable it.)
- b.cmd@ = @
-endif
-
#
# Emoji for log messages.
#
emo.mute = ๐
emo.stop =๐
emo.strip =๐ช
+emo.test =๐งช
emo.tool = ๐จ
# ๐ท๐ช๐งฎ๐งซ๐งช๐งฝ๐ฟโฝ๐ง๐ฑ
+loud ?= 0
+ifeq (1,$(loud))
+ $(info $(emo.megaphone) Emitting loud build info. Pass loud=0 to disable it.)
+ b.cmd@ =
+else
+ $(info $(emo.mute) Eliding loud build info. Pass loud=1 to enable it.)
+ b.cmd@ = @
+endif
+
#
# logtag.X value for log context labeling. longtag.OTHERX can be
# assigned to customize it for a given X. This tag is used by the
#
logtag.@ = [$@]
logtag.filter = [๐ง $@]
+logtag.test = [$(emo.test) $@]
#
# $(call b.echo,LOGTAG,msg)
define b.eval.c-pp
$(3): $$(MAKEFILE_LIST) $$(bin.c-pp) $(2)
@$$(call b.call.mkdir@); \
- echo '$$(logtag.$(1)) $$(emo.disk) $$(bin.c-pp) $(4)'; \
- cat $(2) | $$(bin.c-pp) -o $(3) $(4) $$(SQLITE.CALL.C-PP.FILTER.global) \
+ echo '$$(logtag.$(1)) $$(emo.disk) $$(bin.c-pp) $(4) $(2)'; \
+ $$(bin.c-pp) -o $(3) $(4) $(2) $$(SQLITE.CALL.C-PP.FILTER.global) \
|| exit $$$$?\n
CLEAN_FILES += $(3)
endef
-C Add\sdocs\sto\smkwasmbuilds.c\sexplaining\sthe\spurpose\sof\seach\sof\sthe\sbuilds.\sRemove\ssome\sinadvertent\scopy/paste\shard\stabs\sin\ssome\sC-side\smakefile\scode.
-D 2025-09-24T13:59:53.888
+C Generate\s64-bit\svariants\sof\stester1.js/html.\sEnhance\sc-pp\sto\saccept\smultiple\sinput\sfiles.
+D 2025-09-24T17:46:08.817
F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F ext/session/sqlite3session.h 7404723606074fcb2afdc6b72c206072cdb2b7d8ba097ca1559174a80bc26f7a
F ext/session/test_session.c 8766b5973a6323934cb51248f621c3dc87ad2a98f023c3cc280d79e7d78d36fb
F ext/wasm/EXPORTED_FUNCTIONS.fiddle.in 27450c8b8c70875a260aca55435ec927068b34cef801a96205adb81bdcefc65c
-F ext/wasm/GNUmakefile 091aeeec2d815c002b5ed9e6d2d9fcdced4b94095673155cb09fe2f449cc22f3
+F ext/wasm/GNUmakefile 7366ae3d1d48a85db107c8ec213fef407e8ca02a1e5ed4553bff99ba22fb13bd
F ext/wasm/README-dist.txt f01081a850ce38a56706af6b481e3a7878e24e42b314cfcd4b129f0f8427066a
F ext/wasm/README.md 66ace67ae98a45e4116f2ca5425b716887bcee4d64febee804ff6398e1ae9ec7
F ext/wasm/SQLTester/GNUmakefile e0794f676d55819951bbfae45cc5e8d7818dc460492dc317ce7f0d2eca15caff
F ext/wasm/batch-runner-sahpool.js 54a3ac228e6c4703fe72fb65c897e19156263a51fe9b7e21d2834a45e876aabd
F ext/wasm/batch-runner.html 4deeed44fe41496dc6898d9fb17938ea3291f40f4bfb977e29d0cef96fbbe4c8
F ext/wasm/batch-runner.js 05ec254f5dbfe605146d9640b3db17d6ef8c3fbef6aa8396051ca72bb5884e3f
-F ext/wasm/c-pp.c 75e23ad9ca3a3771e70d401ba79c0bacdf7b2169d1c17f9e2639d81067e5ab95
+F ext/wasm/c-pp.c 8d7780f69ced4d29fffd88ff22613eace6c72fa9a1a6a5699a219070a45e7b21
F ext/wasm/common/SqliteTestUtil.js 7adaeffef757d8708418dc9190f72df22367b531831775804b31598b44f6aa51
F ext/wasm/common/emscripten.css 11bd104b6c0d597c67d40cc8ecc0a60dae2b965151e3b6a37fa5708bac3acd15
F ext/wasm/common/testing.css e97549bab24126c24e0daabfe2de9bb478fb0a69fdb2ddd0a73a992c091aad6f
F ext/wasm/fiddle/fiddle.js 84fd75967e0af8b69d3dd849818342227d0f81d13db92e0dcbc63649b31a4893
F ext/wasm/fiddle/index.html a27b8127ef9ecf19612da93b2a6a73bdb3777b5c56b5450bb7200a94bc108ff9
F ext/wasm/index-dist.html 56132399702b15d70c474c3f1952541e25cb0922942868f70daf188f024b3730
-F ext/wasm/index.html bcaa00eca521b372a6a62c7e7b17a870b0fcdf3e418a5921df1fd61e5344080d
+F ext/wasm/index.html 39aa19924d69052ee0f97e550b9780037dd643a900d3074067bd87400fdb762c
F ext/wasm/jaccwabyt/jaccwabyt.js bbac67bc7a79dca34afe6215fd16b27768d84e22273507206f888c117e2ede7d
F ext/wasm/jaccwabyt/jaccwabyt.md 167fc0b624c9bc2c477846e336de9403842d81b1a24fc4d3b24317cb9eba734f
F ext/wasm/mkwasmbuilds.c 8737ff705bd060a088609edd4cbc908e0bc89dcfc1fa48605bd339aa51dcc709
F ext/wasm/sql/001-sudoku.sql 35b7cb7239ba5d5f193bc05ec379bcf66891bce6f2a5b3879f2f78d0917299b5
F ext/wasm/test-opfs-vfs.html 1f2d672f3f3fce810dfd48a8d56914aba22e45c6834e262555e685bce3da8c3f
F ext/wasm/test-opfs-vfs.js 1618670e466f424aa289859fe0ec8ded223e42e9e69b5c851f809baaaca1a00c
-F ext/wasm/tester1-worker.html ebc4b820a128963afce328ecf63ab200bd923309eb939f4110510ab449e9814c
-F ext/wasm/tester1.c-pp.html 1c1bc78b858af2019e663b1a31e76657b73dc24bede28ca92fbe917c3a972af2
-F ext/wasm/tester1.c-pp.js a2bc1a96dbe55e3b14ace35e8561893e84221d63794a9bc2ab5a5f1b1d6bc5a1
+F ext/wasm/tester1-worker.html c80d7f1da2d093f7b30c0a30ddd659dcaf48e675d371182cfae4142c7196fbc9
+F ext/wasm/tester1.c-pp.html 93fbedb6b15eaad9b03df0524c702a81896e358785655ae2c751e30ef8202e54
+F ext/wasm/tester1.c-pp.js 240ae898c1d5d74a3026f2e1a64bcdce2a0609283f30c743625928c1d8354cd6
F ext/wasm/tests/opfs/concurrency/index.html 657578a6e9ce1e9b8be951549ed93a6a471f4520a99e5b545928668f4285fb5e
F ext/wasm/tests/opfs/concurrency/test.js d08889a5bb6e61937d0b8cbb78c9efbefbf65ad09f510589c779b7cc6a803a88
F ext/wasm/tests/opfs/concurrency/worker.js 0a8c1a3e6ebb38aabbee24f122693f1fb29d599948915c76906681bb7da1d3d2
F ext/wasm/tests/opfs/sahpool/index.html be736567fd92d3ecb9754c145755037cbbd2bca01385e2732294b53f4c842328
F ext/wasm/tests/opfs/sahpool/sahpool-pausing.js f264925cfc82155de38cecb3d204c36e0f6991460fff0cb7c15079454679a4e2
F ext/wasm/tests/opfs/sahpool/sahpool-worker.js bd25a43fc2ab2d1bafd8f2854ad3943ef673f7c3be03e95ecf1612ff6e8e2a61
-F ext/wasm/util.make 02f29bd0821d8fbf6fa7a02e1ecc32d9866bf9c2ebab6f06d0de4ba1cf84fd79
+F ext/wasm/util.make eecfa29dc31a7e079d2a7f9eb9db15a8a8bddeea8122fd18ff6e1f60b39180ef
F ext/wasm/wasmfs.make 5de02751b3e9e79b81a52ab4fe0ed6aa6a23311a90db58fea98c1c4e2845e562
F magic.txt 5ade0bc977aa135e79e3faaea894d5671b26107cc91e70783aa7dc83f22f3ba0
F main.mk 20fe7a151708fc6b1f8cd0fdcc73622701cff5959131cfb73e1f75d33e687bf8
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 1ad0169b022b280bcaaf94a7fa231591be96b514230ab5c98fbf15cd7df842dd
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 431725330d6c63575dbf3404664a7af33d4d87c569560e99c18de93eb4d73935
-R e3af3db66eb0d4f51c1b04cbc2314c0b
+P a2bd965e103026ff5c722357ed9e3432172bbc19d267e718ebd4a876eca41742
+R a6a0613c3e728d1dc0726cd5ad0591a1
U stephan
-Z 77ec6416fddbe3c006d4bdaeedea1332
+Z fe169e404eafaeea5b6a8d98baecd900
# Remove this line to create a well-formed Fossil manifest.
-a2bd965e103026ff5c722357ed9e3432172bbc19d267e718ebd4a876eca41742
+ef6c55e4499957fb46b213540786e5d3928ec096eae1fe759066ed011518e7a2