aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm
Commit message (Collapse)AuthorAge
...
* | | | Reimplement JS's sqlite3_bind_text/blob() with hand-written bindings to ↵stephan2022-12-23
| |_|/ |/| | | | | | | | | | | permit more flexible inputs. Add automated JS-to-C function conversion to sqlite3_busy_handler(). sqlite3.wasm.xWrap()'s '*' argument conversion no longer treats JS strings as C-strings: those conversions require explicit opt-in via the 'string' converter (or equivalent). FossilOrigin-Name: 96ba44946b3e88b6aa305c4363cbbfeab0d9120b3d8c4d2587d68b9293ea7cc6
* | | Internal JS cleanups. Correct part of [ac136925a645] to account for the ↵stephan2022-12-23
| |/ |/| | | | | | | eTextRep flag being able to hold flags other than the encoding. FossilOrigin-Name: 1dfc03ab1e0269807beef27bf884ab9ead7553d4a5f6ed213f812d7fa052045f
* | Consolidate/unify how the JS bindings of the create_function/collation ↵stephan2022-12-23
| | | | | | | | | | family of functions react to a non-UTF8 encoding: they now treat a falsy value as SQLITE_UTF8 and fail with SQLITE_FORMAT for an invalid encoding. FossilOrigin-Name: deffe6fb211410fa1a1fbca824a52b4e09b54d4b4f4a4e12d71c9e4b7e8606fb
* | Explicitly omit threading and extension loading from the ext/wasm/c-pp ↵stephan2022-12-23
| | | | | | | | | | binary build to avoid a link error on some systems. FossilOrigin-Name: 5d9a14715c25efcd81cadafabf03aad7213251bd1b3dc181939c2dba8d942fb6
* | Add SQLITE_ENABLE_MATH_FUNCTIONS to the list of feature flags in sqlite3-wasm.c.stephan2022-12-23
| | | | | | FossilOrigin-Name: 58503cd148c9613abfaf7c1386c34806150bd521966864ccbb821ea7dede8e5a
* | Cherry-pick [c4dab53b8ea3401abd] for sqlite3.wasm.xWrap() optimizations.stephan2022-12-23
|/ | | FossilOrigin-Name: 9b97412d3aa791870016ab3c6f565b6a6afa1764f98e969833aec093b9b29919
* Minor sed script tweak in the wasm GNUmakefile for BSD portability, as ↵stephan2022-12-19
| | | | | reported in [forum:4a97813fcbd4f63e|forum post 4a97813fcbd4f63e]. FossilOrigin-Name: 49efcf6d9f894c28a3ffb350a7c5f0ffd12c7cbf61f5c27f76eb7f777b8a24c5
* Update test-opfs-vfs.js to account for recent API changes. Reported in ↵stephan2022-12-19
| | | | | [forum:4a97813fcbd4f63e|forum post 4a97813fcbd4f63e]. FossilOrigin-Name: 2a636746360c109f1d39fc352b9f1c83a739735520252a264c774e848597475d
* JS namespace updates in ext/wasm/api/README.md.stephan2022-12-18
| | | FossilOrigin-Name: ca59e736b1839c30a820dd5795b4534e1565387ef701423451ea4c503a9701ea
* Update wasmfs.make to get WASMFS building again, but changes made to ↵stephan2022-12-17
| | | | | OPFS-over-WASMFS since we last tested it have made it incompatible with how we used it. It can now only be used from worker threads, eliminating the one benefit it had over the sqlite3_vfs OPFS implementation. Remove/amend references to WASMFS in the docs and remove all WASMFS-specific test app links from index.html. FossilOrigin-Name: 32dc98c8001387b1970623192ec6cb89445000fa49bda5f4bd7c525bbe20bb5b
* Expose a JS-friendly subset of sqlite3_config() to JS, with the notable ↵stephan2022-12-16
| | | | | caveats that (1) setting up the JS bindings requires starting the library, making sqlite3_config() illegal to call and (2) calling sqlite3_shutdown() in order to make it legal to call sqlite3_config() may undo certain JS-side library initialization. Move sqlite3_(de)serialize() into the int64-mode-only bindings because of their int64 args. FossilOrigin-Name: 62e0c931ac952219f68e22d64e20836781bf330b4581e4662266172a97c9289b
* Add a test confirming that exceptions are not passed through C-space if a ↵stephan2022-12-16
| | | | | JS-side sqlite3_set_authorizer() callback throws. FossilOrigin-Name: 5a77c2c7aaa556007274e1b85790934665c2c12661ca11d896eb7d09cd49ce72
* Add sqlite3_set_authorizer() support and related tests to JS.stephan2022-12-16
| | | FossilOrigin-Name: 551b848894c249cb3c9d237643d2ed53ffcb3b003d0cf3f797a535df1731ce39
* Added a couple missing 'not part of the public API' tags on functions in ↵stephan2022-12-15
| | | | | sqlite3-wasm.c. No code changes. FossilOrigin-Name: eb27feecea508f3491a09699f2339951facd2345d479cfd3020183dc2af703b2
* Internal refactoring of how sqlite3.wasm.xWrap() handles JS-to-C function ↵stephan2022-12-15
| | | | | pointer conversions, to enable similar conversions to be added more easily. FossilOrigin-Name: 10cfe3fae6f680d3ecc3b0afbbf628ce91e34e3757b19dd27c231f0daf44232a
* Remove an unnecessary/obsolete Emscripten-specific export.stephan2022-12-15
| | | FossilOrigin-Name: fa278022afd6dd6e499d26f74a8359f3e9973e1680772059ce331b64e77ec582
* Rename the new peek/pokeF32() and peek/pokeF64() to peek/poke32f() and ↵stephan2022-12-14
| | | | | peek/poke64f() for consistency with related APIs and because they're easier on both the eyes and the fingers. FossilOrigin-Name: cc86f03ed698a071cd02ef3dfaba69092226bff20c917d662f808061627ad285
* Slight reformulation of some test code to test multi-arg wasm.peek() call form.stephan2022-12-14
| | | FossilOrigin-Name: 349bb28f614bc210b3283ed1c1144c45fbc7d9e2ffc3dc6193ccb9932d347efb
* Use the new peek/poke() variants throughout tester1.js.stephan2022-12-14
| | | FossilOrigin-Name: ef7b783552f7783a728837fcfc81e493b135a7aac59747397e7e3d28f4309f95
* Add convenience variants of sqlite3.wasm.peek/poke() for each numeric type ↵stephan2022-12-14
| | | | | to help reduce errors related to typos in the final argument (type-name strings). If wasm.xWrap.FuncPtrAdapter is called as a function, instead of a constructor, it now behaves as if it were called as a constructor (previously it threw an exception). FossilOrigin-Name: 14e3fc01b929fa3f9a2fdbd93deb4a8aad58c111d46369c772def0437152fa75
* Add a test to demonstrate/verify which object acts as "this" in a ↵stephan2022-12-14
| | | | | oo1.DB.exec() callback. FossilOrigin-Name: 8fc4b3f10f61e965853a22bf7a64ad2511ef656d66658a7910bac35b0f9805ec
* A micro-optimization in sqlite3.oo1.DB.exec(). Changed the rowMode option of ↵stephan2022-12-14
| | | | | that method to only accept $X instead of $X, @X, and :X, as the extra options are entirely superfluous and may lead to confusion. FossilOrigin-Name: 82a6c7fdf59729c182545b15c084b136e34513f340e87a7b6e5aa199117357b0
* Document the role of the sqlite3.client JS API property.stephan2022-12-13
| | | FossilOrigin-Name: 5f11f1c7d5f8b627acd2ace277521d39fe2ffb0ef1dfe532e65fb56ea3dfb4d8
* Extend the sqlite3.wasm function pointer argument converter to be able to ↵stephan2022-12-13
| | | | | handle the "two-layered context" of sqlite3_create_collation() and friends and make use of FuncPtrAdapter to perform JS-to-WASM function conversion for them. FossilOrigin-Name: 0a60b7215e433f8c50027c70731b11e58d74c90ec5903e66ae42f9c98e40b044
* Revert part of [9386d6f63468] because the new automatic function pointer ↵stephan2022-12-12
| | | | | binding cannot properly track per-context function mappings when the context is more complex than a single context-type pointer. e.g. it is fine for sqlite3_trace_v2() but it breaks down with sqlite3_create_collation() because that one needs to use the collation name as part of the context key and we cannot sensibly do so with the current code. FossilOrigin-Name: 6cd21b79075367227b57bccf829cc7d4ccc7d7fbcfaed226b4c8e942ddae4eb6
* Move JS-to-C binding signatures from sqlite3-api-prologue.js to ↵stephan2022-12-12
| | | | | sqlite3-api-glue.js to allow for use of the new/experimental sqlite3.wasm.xWrap() feature which automatically binds JS functions to WASM/C as needed, which simplifies creation of bindings which take C function pointers. Reimplement sqlite3_exec(), sqlite3_create_collation(), sqlite3_progress_handler() to use this new feature. FossilOrigin-Name: 9386d6f634680b4e0fa5487c34c63acb29f0b7a6ae738b8f6164ad084a229b62
* ext/wasm/module-symbols.html: for C APIs which have extended JS-side ↵stephan2022-12-12
| | | | | semantics, link to the JS-side API docs instead of the C docs. FossilOrigin-Name: d557015208f504c6d5d20ebf1e451b3f07b19590d76371b16a9f4b54e9645282
* ext/wasm/module-symbols.html: add a hyperlink to the API docs for each ↵stephan2022-12-12
| | | | | exported sqlite3_...() function. FossilOrigin-Name: 01d3a9bba3120cfec3f752048281f18ce7ab48fa7584750c097233a9ce095a20
* Rework the internals of how argument/result types are converted to/from wasm ↵stephan2022-12-12
| | | | | in prep for attempting to support automated conversions of function pointer argument types. FossilOrigin-Name: 58052d8285cbc2aa8c4f8a9f5c2d33ac12014f6a70afbc93bc4ce5b9fd1f9ee5
* Add sqlite3.mjs to the new 'quick' wasm build for the sake of the snapshot ↵stephan2022-12-12
| | | | | build. FossilOrigin-Name: 5a3f2224c37c7e28ce627bd98a9907a16635bffeea36e8ead707586aad37ccfe
* Expose sqlite3_txn_state() to wasm.stephan2022-12-12
| | | FossilOrigin-Name: f6f3397a4667b15a96bdf4189c54789d622fd90351405e963d7f56ac93a9344c
* Expose a number of infrequently-used sqlite3_...() functions to wasm whose ↵stephan2022-12-12
| | | | | absences were noticed while documenting. FossilOrigin-Name: 3144e7c0b8633d99daa07d75dabfe6e115ad401110f6f3c85f768e973299f3d9
* Minor build tweaks in ext/wasm to create a faster-running build for the ↵stephan2022-12-11
| | | | | common dev-mode cases. No code changes. FossilOrigin-Name: 6a61b14a6cf8279a5b8b77f934c2b97965f5e3fe4cddb03e78c2c0a840dbe6f6
* Remove -flto from wasm build flags, as it increases build time and doesn't ↵stephan2022-12-10
| | | | | seem to have a measurable benefit. FossilOrigin-Name: 35a88747eb0bb9eebb60550f91d0fe0c7a5ae11ec0a1315ae056fd79e9436a3f
* Correct wasm heap corruption introduced in test code added in ↵stephan2022-12-10
| | | | | [e144fd5c88fa4] which led to unpredictable failures. FossilOrigin-Name: 6c1e07e3857b38e394853891a9028e88319bad4bc7b7b15078e25f430c3b1222
* Remove two incorrect calls to structType.dipose() which prematurely freed ↵stephan2022-12-10
| | | | | objects in use by the virtual table test/demo code. FossilOrigin-Name: 060eb2848975a24ff6683a8a9c4d7546ae36147323b0edae01fb42f52d9bb2d6
* Expose sqlite3_column_value() to WASM and add sqlite3_column_js().stephan2022-12-10
| | | FossilOrigin-Name: 7783aa4af1331190fd1f42a71bb724041e2e82b51745f9740926e4ead83a97ed
* Refactor the internal JS routines for converting UDF results and errors to ↵stephan2022-12-10
| | | | | JS into public APIs. FossilOrigin-Name: 35d1d63c7d60119b64341c561294890812837d5432d1d7bed3ed88d6212fbfa0
* Export sqlite3_result_subtype() and sqlite3_value_dup/free/subtype() to WASM.stephan2022-12-09
| | | FossilOrigin-Name: 4600a7bbdc4cbe14591d48ea19fe5f7de3a0c10a14cdd97fd51e263a13163d10
* Expose sqlite3_value_frombind/nochange/numeric_type() to WASM. Add a flag to ↵stephan2022-12-09
| | | | | sqlite3_value_to_js() to cause it to return undefined, instead of throwing, if no conversion can be found. FossilOrigin-Name: de8fc4bf34f80f320012a0e506ed8e3e24806daf67845d5dabb00b916108f6ef
* Refactor the sqlite3_value-to-JS conversion from an internal detail to ↵stephan2022-12-09
| | | | | sqlite3.capi.sqlite3_value_to_js() for use with routines like sqlite3_module::xFilter(). FossilOrigin-Name: f6dbf280f99809a80c99337e4c22a86dea7a35ae41ae9a69144c4502385a0a1f
* Remove some unused sqlite3_status() codes from the JS API. Add custom JS ↵stephan2022-12-09
| | | | | wrappers for sqlite3_create_collation/_v2() which accept JS functions (plus tests). Expand the argument options for sqlite3_wasm_db_error() to enable it to translate exception objects to C-level errors. FossilOrigin-Name: 073a2f1eb006230ae0995a5ea6c789407bcaa819ec15b5064c66d8973ed4671a
* Rename the oft-used, verbose sqlite3.wasm.get/setMemValue() and ↵stephan2022-12-09
| | | | | get/setPtrValue() to peek/poke() and peek/pokePtr(). The old names are retained as aliases just in case any client code actually uses them, but they are now deprecated. FossilOrigin-Name: ad0a8139b0b025f8e9d2eca0c303557ef10fdfab8c8b65afb08c510a804073d5
* Micro-optimization in the oft-activated JS-to-WASM arguments conversion step.stephan2022-12-09
| | | FossilOrigin-Name: ee47e9b83ca668b37dc1d8e519048a635693cf33d9967a2d81ff0824b7eea4ba
* Correct a test bug which broke the previous checkin's wasm tests in higher ↵stephan2022-12-09
| | | | | optimization levels. Test bug - it should not have worked in -O0 mode. FossilOrigin-Name: f07141b7500c36169c2c96e045acf37ec97a0d75c0a5f4d0ebed4dc1d2094ccf
* Export sqlite3_status() and sqlite3_stmt_status() to wasm. Expand the ↵stephan2022-12-09
| | | | | arg/return semantics of wasm.get/setPtrValue() and get/setMemValue() to simplify handling of multiple pointers. FossilOrigin-Name: e144fd5c88fa4151429a2fef3daf389588402e158267f0afa0dfd142527d76b9
* JS API doc updates.stephan2022-12-09
| | | FossilOrigin-Name: 4f80fd3b8d4c85894664093d8310d6f5299faac4eb879edc608b3ffcd8558e9a
* Expose sqlite3_table_column_metadata() to wasm.stephan2022-12-09
| | | FossilOrigin-Name: c31eb509e5cb1025de058132ee9a45d70c84ee47a6abe18811a65ce339f062a0
* Expose sqlite3_db_status() and sqlite3_db_config() to wasm, noting that the ↵stephan2022-12-09
| | | | | latter requires several internal wrappers to account for the various varidic forms (C varargs cannot be bound to wasm). FossilOrigin-Name: d5753668915c1db204fa80153614653243081ffaddea22f26ad59bb1836948b9
* Reorganization and renaming in the new VFS/vtab JS pieces.stephan2022-12-09
| | | FossilOrigin-Name: 1c2dda177a11fcc5b66e5554507c23ba4b9948a710b3bccfb26963b9851d40a4