aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api
Commit message (Collapse)AuthorAge
...
| * Add an experimental OPFS VFS-specific URI flag, opfs-unlock-asap, which ↵stephan2022-11-23
| | | | | | | | | | tells the VFS to release implicit locks ASAP. This permits higher concurrency but hurts performance considerably. This may or may not be obsoleted by other concurrency-related experimentation. FossilOrigin-Name: d23c917013485ec2793125221f3936b05c39d6eca941629fb819b6b4aa714520
| * Initial infrastructure for adding a mode to the OPFS VFS which causes ↵stephan2022-11-23
| | | | | | | | | | implicit locks to be released ASAP, which increases concurrency at the cost of performance. FossilOrigin-Name: c5b7a9715a13b696ab3ee965aa0a310f59b65f07cecd72faa2e3504bfd8eb632
* | JS documentation cleanups. No code changes.stephan2022-11-24
| | | | | | FossilOrigin-Name: 18e89a436daa18a8c972caf06b298da43c97a6ea3e2e5229dccb6920c27bfdb9
* | Add sqlite3.oo1.DB.prototype.checkRc() and tests for both that method and ↵stephan2022-11-24
| | | | | | | | | | its class-level counterpart. FossilOrigin-Name: f7eaa6ba2147bfd6dbdc2444d0f919d846aa7f9b68cccab17ef585ffdacf3d60
* | Minor JS doc updates.stephan2022-11-23
| | | | | | FossilOrigin-Name: 27efd63ad7fb3bf8d0d07f2c9f48652c8cacc4e697c229c8085120a8e6b50a39
* | Add optional zSchema argument to sqlite3_js_db_export().stephan2022-11-23
|/ | | FossilOrigin-Name: 9c23644b1e5bf44bfb431a35fd1674c11ccb99e9eb0989f10175b0cb2a858eaa
* Remove a bit of over-cleverness which breaks loading of sqlite3.js in some ↵stephan2022-11-23
| | | | | main-thread cases. FossilOrigin-Name: 220cc4c6399b772b4ece03305a41b437ef0654d586a8a1c3dc5e7606fd36d655
* More tweaking of OPFS concurrency measures and the related test app.stephan2022-11-21
| | | FossilOrigin-Name: a8d4da1501d411085ec2fd48c4a056c8b1d97ef3c3203c5b403a854ac2864870
* Resolve missing SQLITE_LOCKED result code which triggered a new (since last ↵stephan2022-11-21
| | | | | checkin) exception in the OPFS VFS. Improve output of the OPFS contention tester app. FossilOrigin-Name: 2debbbca33bd4170a1dc4dbb5eb3e68523e51d289b06c551e5560ac4e32e433b
* Add test app for experimenting with multi-worker OPFS concurrency. Tweak ↵stephan2022-11-21
| | | | | OPFS VFS to significantly improve the otherwise "unfortunate" concurrency situation. FossilOrigin-Name: 96f76e7616f8157a342b9e1c42f7b1feab200d182268871a2b25f67d4ee2564c
* Further minor cleanups in the JS build related to vanilla vs ESM.stephan2022-11-20
| | | FossilOrigin-Name: 100a596800eca61477d9880092465d594c22be3707f2a11aaf6eb9e234fc6f2d
* Minor cleanups in the ESM-related preprocessor filtering.stephan2022-11-20
| | | FossilOrigin-Name: 205884a273128bb666b496b659b4fa9f031ebdbbc1aa704fdeb4b7e015740098
* Add build of sqlite3.mjs (ES6 module), add a test app for it, and include it ↵stephan2022-11-19
| | | | | in the dist build. FossilOrigin-Name: 2e783670e10b59e67c14b0db7f4803b41790cc7730de221d54fa2d4483cfba33
* Integrate a custom preprocessor to the JS build process to facilitate ↵stephan2022-11-19
|\ | | | | | | | | creation of both vanilla JS and ES6 Module builds from the same source files. There is still some build-level reworking pending to make an ESM build a first-class deliverable. FossilOrigin-Name: 10c723d96d61d2e552ec1102563d58f1eb11bc3d30e03606fd8e0279c5a9043a
| * More work towards creation of a ES6 JS module.stephan2022-11-19
| | | | | | FossilOrigin-Name: 6b826e700f6849eebfbba38e5948b96be245994e3e03ea30743114d3f5689c42
| * Replace use of cpp with the fit-to-purpose c-pp to avoid cpp's ↵stephan2022-11-18
| | | | | | | | | | C-centric/JS-unfriendly quirks. FossilOrigin-Name: 49d70f071e918d5d095c807575bb7ce2b287a123261e789e938521b3b409429a
| * Merge trunk into js-cpp branch.stephan2022-11-17
| |\ | |/ |/| FossilOrigin-Name: e047b33d1fb7d6a32e967f03f9952249cd2da4d21dc301fe92bd7baa0da5d6a9
| * Experimentally use clang's C preprocessor to filter #ifdef's out of the ↵stephan2022-11-03
| | | | | | | | | | generated sqlite3-api.js, the goal being to see if we can feasibly use cpp to include ES6 module-specific code in the main code base and conditionally filter it out. FossilOrigin-Name: 718a6d371e61359d73c8f80afdb248e3d9b4d8df4c4e5c122ac884344e31035b
* | Change a self.X JS reference to X to account for a symbol resolution ↵stephan2022-11-16
| | | | | | | | | | discrepancy between vanilla JS and ES6 modules, as explained in [forum:801d8f77e5115141|forum post 801d8f77e5115141]. FossilOrigin-Name: 0590de4da1103d842b9f9f25bcd2e69223b2ea067ae2f320f58dd3763218b39d
* | Remove some outdated code comments. No code changes.stephan2022-11-13
| | | | | | FossilOrigin-Name: 80ff592a9d0157bfa8bd1f9959c3aa26cab0ec16fdccf7b58a7523b8912c1a8c
* | Rework automatically acquired OPFS locks to be released during idle time. ↵stephan2022-11-10
| | | | | | | | | | This eliminates the performance hit reported in [46304ba057707c]. FossilOrigin-Name: a7fe91afca473fe55c983bc81d214df4ef3699863c7423fa4b6b9cde23d6a3b4
* | OPFS: if an op which needs a lock is called when no lock has been obtained, ↵stephan2022-11-10
| | | | | | | | | | automatically lock it at the start of the op and unlock it at the end of that op. This is an attempt to alleviate the cross-tab contention described in [forum post 58a377083cd24a|forum:58a377083cd24a] but it increases speedtest1 run time by approximately 4x. Perhaps auto-lock can be combined with the older idle-time-based auto-unlock to unlock such locks (but not those from xLock()) to improve this? FossilOrigin-Name: 46304ba057707c3b072b6e7bb8c4af774f653aa5814099f0866cd87b2b73abeb
* | Add sqlite3.wasm.alloc.impl() as a "public back door" into the low-level ↵stephan2022-11-07
| | | | | | | | | | non-throwing allocator. Correct sqlite3.WasmAllocError constructor to behave like its usages expect it to and add tests for that. FossilOrigin-Name: cea8bf9a144d842c4755c3130273524926e8c4831d7f21c4e34d4e8c74109c8c
* | Minor wasm doc touchups. No code changes.stephan2022-11-07
| | | | | | FossilOrigin-Name: 2c448368913a844bdb5e69f8fa3bad91a2b6612ba3b7f3f650dd07b81db25a77
* | Correct sqlite3-wasm.c's SQLITE_DEFAULT_CACHE_SIZE (it's measured in kb, not ↵stephan2022-11-04
|/ | | | | bytes). FossilOrigin-Name: 479ad980dfe509403e184e39a5aa441171e47b3297e05039f85516e72e9f15be
* Globally replace '' with "" for empty JS strings to please C preprocessor.stephan2022-11-03
| | | FossilOrigin-Name: e92e1f42bef94a1df29f66b4111ebfde93eba3759bc5d5a9c95f714508851346
* Minor build cleanups and fix a harmless race condition in the OPFS part of ↵stephan2022-11-02
| | | | | tester1.js. FossilOrigin-Name: 70ee6ee014bc4e2c1daa9b4a8909cf76ccecf32de1eb39055f20d3d0b1daa1bd
* Add sqlite3_wasm_vfs_create_file() to replace Emscripten's ↵stephan2022-11-02
| | | | | FS.createDataFile() in a (mostly) VFS-agnostic way. Add a test for worker1's export (to bytearray) support. Re-add worker1 open-from-bytearray using sqlite3_wasm_vfs_create_file() but it's untested (requires a new interactive test app or maybe reconsideration). FossilOrigin-Name: b35e1225c91a3cadc0d25af1e4e790237256d194990faa13190e343ed03e11c5
* Fix a symbol name typo which broke and exception-handling case in OPFS xOpen().stephan2022-11-02
| | | FossilOrigin-Name: 5bc83d569594e104e90b1acef1a5fd23655b2089de393a6776e799fdef2082f5
* Minor internal cleanups in the js pieces.stephan2022-11-01
| | | FossilOrigin-Name: 271391b4e32220ab4c32d69f579ecd2b03eb99da898955a1ef8fffc27216719d
* Significant cleanups and expansion of the sqlite3.opfs utilities. Add ↵stephan2022-11-01
| | | | | oo1.DB.dbVfsName(). Add VFS name to worker1:open's arguments and result. FossilOrigin-Name: 86a341d7e061f946b39e8647ddd4743013b851b33ae9e6e755d8dbc53fba5286
* Worker1: use a list, rather than a single slot, to manage the default db ↵stephan2022-10-31
| | | | | link so that we can keep the least-recently-opened db as the default. Re-introduce worker1.export() but do not yet expose it until an equivalent import() (or open() option) is implemented. FossilOrigin-Name: c7750c101d9b7baa31496731bc34ea0a9b2bad0c11e2b3e92a8c7b327135c1bb
* Internal tweaks to the OPFS VFS result codes.stephan2022-10-31
| | | FossilOrigin-Name: 32e1a2d2eb8738ae1635e413829f6cf7f64c63d2a86b72940a573de89948e529
* Add oo1.DB.exec() 'returnValue' option, which specifies what exec() should ↵stephan2022-10-31
| | | | | return. Defaults to the db object and enables direct return of the result rows array or a list of the individual SQL statements. Other code-adjacent internal cleanups. FossilOrigin-Name: 69d36a6aa5e2cd79d26c0fd3e0d20fe8838fd1be97db07725233bfff1dfe6643
* Add oo1.DB.selectArray() and selectObject().stephan2022-10-30
| | | FossilOrigin-Name: 7660db2a2e9c4f3a6a9343d6929744ad0f4be6820976411f9080165491da59b7
* Adjust automatic OPFS locking retries such that they will wait up to a total ↵stephan2022-10-30
| | | | | of 3 seconds spanning 4 attempts. FossilOrigin-Name: bbce49d81abc491ca666474040a53057e26e99131fea9449de253f88f4415ded
* Minor WASM build cleanups. Enable custom Module.instantiateWasm() when not ↵stephan2022-10-30
| | | | | in WASMFS mode (where it doesn't work). Add sqlite3.debugModule URL param to enable some module-init-time debugging output. FossilOrigin-Name: 50f678846a2b3c3d0818f0bae89f2ee86252a2e6a9c7029ebaae3953ca0fa14c
* Move the sqlite3.capi.wasm namespace to sqlite3.wasm. This causes a tiny bit ↵stephan2022-10-29
| | | | | of naming confusion with the sqlite3.wasm *file*, but seems to make more sense than having it as a sub-namespace of capi. FossilOrigin-Name: 3f16eb18d6186ca972fca952ccac18649e7a905213f589e53c0c9333e695448d
* Remove sqlite3_interrupt() from the WASM build, as it is essentially ↵stephan2022-10-28
| | | | | impossible to employ in JS's threading model. FossilOrigin-Name: e85387590061edbb6cdc04de792ab86f43afaa5c8d1b0792206cb5b481c7d76a
* Add ext/wasm/module-symbols.html. Adjacent minor JS touchups.stephan2022-10-28
| | | FossilOrigin-Name: 24f12e681e06e3b71a6ac9c82255fe0270953a74c711405841f7e385eeafe874
* Minor sqlite3.oo1 API reorg prompted by documenting.stephan2022-10-28
| | | FossilOrigin-Name: 55237924ca363c5a3e0f8c82620eb6626a98311615866197375a86876b9da3a1
* Minor doc typo fixes.stephan2022-10-27
| | | FossilOrigin-Name: ed8d3f25a4d6ac04d9f7918c791d8d2c6f23ce846278ca63f8fbadb7ea27369f
* Expose sqlite3_randomness() to WASM and add a custom binding for it which ↵stephan2022-10-27
| | | | | can populate a JS byte array. Add WhWasmUtil.isPtr(). FossilOrigin-Name: 333e67076b4bc967bb543ef8e265c63f6e3498c38ac121a7d1eff4a1d7a71c63
* Replace the newly-removed oo1.DB.getFilename() with DB.dbFilename() with the ↵stephan2022-10-26
| | | | | hope that the distinction from the dbInstance.filename property is clearer. FossilOrigin-Name: 0b80543d75504c733b73b32f73b96074a4b0cebad64e47032926a3fefee41726
* Remove oo1.DB.hasFilename() and getFilename(), as they are unnecessary.stephan2022-10-26
| | | FossilOrigin-Name: 75c546b982024bf2b527c85271111d54158cb010867f6e29fc89e86cc8457cc5
* Minor cleanups and doc improvements in the OPFS sqlite3_vfs proxy.stephan2022-10-25
| | | FossilOrigin-Name: 48645f7bcacf81c4149f26d20ee1752fbe93a02f96b85bd7e28bfa49322137e5
* Add SQLITE_DQS to the compileoptions_used list, per request in [forum post ↵stephan2022-10-21
| | | | | 8b1060122b|forum:8b1060122b]. Force DQS=0 in sqlite3-wasm.c. FossilOrigin-Name: fcd9e0dbe3226f3f7ccc15b11fc3aa3b8058571bef274c25a33e9753e22f7551
* Add kvvfs tests to tester1.js. Fix a scopedAlloc() misuse in oo1.DB ctor ↵stephan2022-10-21
| | | | | caused by refactoring earlier this morning (and caught by these new tests). FossilOrigin-Name: 8e0f001ab76de6dbc17295b9085f7f61ce274c43f8c432ea4d2ec3153d248ff3
* Add timing info and OPFS sanity tests to tester1.jsstephan2022-10-21
| | | FossilOrigin-Name: 99915b0076422487cdd181a54e55694404fba13e4a540329b5ede9e2c9e12532
* Expose sqlite3_vfs_unregister() to WASM and unregister kvvfs in Worker ↵stephan2022-10-21
| | | | | threads to avoid its unintended use there (in contexts other than local/sessionStorage). Correct registration of window functions, extend oo1.DB.createFunction() to support window functions, and add window function tests to tester1.js. Correct an incorrect 1-arg handling case for DB.exec(). Add per-test assertion counts to tester1.js. FossilOrigin-Name: f07ce15479b7224b0d1ba9f147a433136e70c1461aa667d2737d4a918f778f55