aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/tester1.c-pp.js
Commit message (Collapse)AuthorAge
...
* 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
* 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
* 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
* 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
* 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
* 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
* Ease-of-use/legibility improvements in the virtual table JS helpers.stephan2022-12-08
| | | FossilOrigin-Name: 54c7ad7e08bdb87579398ade366605bfa2e2538a94aabcc6e4cda8e173649760
* More work on the JS vtable tests.stephan2022-12-08
| | | FossilOrigin-Name: 51e3c3b569dce2097063d39dc484f44b2f98cad0a902ef66765ca4cdc3e06f47
* Got JS non-eponymous vtable working thanks to a hint from Dan.stephan2022-12-08
| | | FossilOrigin-Name: 750719b4981df62fa2ff3665e6f559ec760609ad2493495628295ad9ae6024fc
* Remove some dead JS code and tweak some docs.stephan2022-12-08
| | | FossilOrigin-Name: 0ee495452c014680697aa9035c245024df127a52d1820ab0e02580a015d96ecb
* Work on an alternate (slightly simpler) approach to binding JS vtabs. ↵stephan2022-12-07
| | | | | Non-eponymous vtabs are not working, for reasons as yet unknown. FossilOrigin-Name: 6a0fefb93bcccd950df211cf5c2f49660c7b92115dd01b2b508a4ab9e3ab3d23
* Add addOnDispose() method to Jaccwabyt and code-adjacent minor internal ↵stephan2022-12-07
| | | | | cleanups. FossilOrigin-Name: 6a2723fe3f28dd94328d901e64e1e9ee9a1b2e9eeaed6c54038a5b83c914db78
* JS vtables: add infrastructure related to accessing and modifying ↵stephan2022-12-06
| | | | | sqlite3_index_info. FossilOrigin-Name: 0d77c348039926c24e0fb50a7dc7e4b62895cd201c021f8e29832917e4b8b09f
* Rename wasm.cstringToJs() to wasm.cstrToJs() for consistency with other ↵stephan2022-12-06
| | | | | wasm.cstr... APIs. FossilOrigin-Name: cbf483ea0ba3e6dc08ad7ed654380f818544b4c3cedfdb8aa848a83298268ceb
* Add wasm.cArgvToJs() to support sqlite3_module::xConnect().stephan2022-12-06
| | | FossilOrigin-Name: c3ebdccf94d5e63c229bf91056c08052d78732e663334070ef3b0ef6fb4bfb8f
* Minor test tweaks.stephan2022-12-06
| | | FossilOrigin-Name: f902f3b2c79d6c699ead1efeb1426e1e0f4ac709afdff88be1de62f34f3d5ccc
* Add a demonstration sqlite3_vtab/module implemented in JS, based on ↵stephan2022-12-06
| | | | | ext/misc/templatevtab.c. Add oo1.selectArrays() and selectObjects(). FossilOrigin-Name: 60482c97e02bc4cafefef281be0cf0bc8c5c53232162829c137f3f7a80cdc534
* Remove two features of jaccwabyt which were fundamentally flawed, along with ↵stephan2022-12-05
| | | | | approx. 250 lines of unit tests which heavily relied on them. Thankfully, none of the sqlite3.js-level code used those bits. FossilOrigin-Name: a190abc307847174f36421eaa3f47ef349c6f84a2bb35857fa64f64bbe722708
* Export sqlite3_vtab_collation() to wasm. Rename 'flexible-string' JS ↵stephan2022-12-05
| | | | | argument adapter to 'string:flexible' for consistency. FossilOrigin-Name: 15f8042fddaeabab43dd187c463d3ccc56758cbf19bf2ca4837d9087a4850c1a
* Rename 'static-string' argument adapter to 'string:static'. Replace JS unit ↵stephan2022-12-05
| | | | | tests which were lost via editing a generated copy of tester1.js instead of the original tester1.c-pp.js input file. FossilOrigin-Name: 9d81d51d5a255b42f8416da850c992a9e4c8eebc940e0702a9262cfcaa6d7b2f
* Correct a memory leak in tester1.js.stephan2022-12-03
| | | FossilOrigin-Name: e42b052dd754e577b8429e2430821c5f88096170ffa58b4e5e3cb7ee19b6c37d
* sqlite3.wasm.allocFromTypedArray() now optionally accepts an ArrayBuffer as ↵stephan2022-12-03
| | | | | its argument. FossilOrigin-Name: 75a1a796f86d289c7275666fab19013934775dcccaed44a1a61d1749a6cb99c9
* Rename wasm.xWrap.resultAdapter() X:free entries to X:dealloc for ↵stephan2022-12-03
| | | | | consistency with wasm.dealloc(). Add an undocumented feature to replace wasm.alloc/dealloc/realloc() with the C-standard allocators (after an allocator misuse led down a several-hour rabbit hole trying to discover a mis-free() violation). Related test updates. FossilOrigin-Name: d9807656f8a7c2a893d3f68ee5592f44826b8e999ae66f7d9000674b5c1b0207
* JavaScript: add sqlite3.wasm.realloc(), ↵stephan2022-12-03
| | | | | sqlite3.capi.SQLITE_MAX_ALLOCATION_SIZE, and related tests. FossilOrigin-Name: eeb84ba5de1152ef0f42105b8b285fdee9f5ad58281e60a4e0c8b1d6de1dead8
* Expand JS tests for db export/import and document reason it cannot currently ↵stephan2022-12-02
| | | | | work with kvvfs. Fix a minor JS build dependencies bug. Update page title with PASS/FAIL prefix for tester1.js to improve overview when launching multiple test tabs. Add ability of tester1 should-run-test predicates to report why a given test is disabled. FossilOrigin-Name: 75f610d3a4cf3d972220f9abc27cdf5990451e3835ceb9cf66973934004dfc5c
* sqlite3_js_create_file() now accepts an ArrayBuffer data source. Add test ↵stephan2022-12-01
| | | | | for OPFS-based export/re-import. The (sqlite3*) argument converter now optionally accepts sqlite3.oo1.DB instances. FossilOrigin-Name: 14a84b67fb17e16a5691ea4bf7f374123ac73a361a5d3d0efca53788d2001e3a
* Reformulate and simplify some JS tests related to the previous checkin.stephan2022-12-01
| | | FossilOrigin-Name: 9ea2d3dcf798393a7fd231e199c0e2c6302949fe2a7f2573178fb0e50c78a2f4
* Expand "sqlite3_vfs*" JS-to-WASM function argument conversions to accept VFS ↵stephan2022-12-01
| | | | | names (JS strings) and capi.sqlite3_vfs instances. Implement sqlite3_js_vfs_create_file() to facilitate creation of file-upload features which store the file in VFS-specific storage (where possible, e.g. "unix" and "opfs" VFSes). Correct an argument type check in the SQLite3Error and WasmAllocError constructors. FossilOrigin-Name: e1009b16d351b23676ad7bffab0c91b373a92132eb855c9af61991b50cd237ed
* Install sqlite3_malloc/sqlite3_free() as the JS-side WASM allocator (as ↵stephan2022-11-30
| | | | | opposed to replacing C-level's malloc()/free() with them). All tests work and this eliminates the potential for allocator discrepancies when using the (de)serialize APIs. FossilOrigin-Name: 95c78f6b46e0d8efa4313061f47677479f48610b7a7261dc8d0fb1859aca2ad9
* Refactor a significant chunk of the OPFS sqlite3_vfs init code into ↵stephan2022-11-30
| | | | | sqlite3.VfsHelper, and internal-use-only API encapsulating code relevant to creating new VFSes in JS. Intended to assist in pending experimentation with an alternative OPFS VFS. FossilOrigin-Name: e25d7b080a807e35b32cb885ea75b384130e5c6e936dfef783c5b45d9bfe77d8
* Internal restructuring of the OPFS sqlite3_vfs in order to facilitate ↵stephan2022-11-29
| | | | | certain experimentation and improve error reporting/hints if it cannot be activated. Deprecate the name sqlite3.opfs.OpfsDb, preferring sqlite3.oo1.OpfsDb for consistency with JsStorageDb and any future DB subclasses. FossilOrigin-Name: 0c5c51f4fb04a4b90c50ec9704cfea9a3fb7d7d0ee55c1b0d4476129188217a6
* Add sqlite3.oo1.DB.prototype.checkRc() and tests for both that method and ↵stephan2022-11-24
| | | | | its class-level counterpart. FossilOrigin-Name: f7eaa6ba2147bfd6dbdc2444d0f919d846aa7f9b68cccab17ef585ffdacf3d60
* Minor cleanups in the ESM-related preprocessor filtering.stephan2022-11-20
| | | FossilOrigin-Name: 205884a273128bb666b496b659b4fa9f031ebdbbc1aa704fdeb4b7e015740098
* Get tester1.js working via an ES6 worker module and add that variant to the ↵stephan2022-11-19
dist zipfile. FossilOrigin-Name: 90480586f1b2ad82118e19536b095431b8457f294c0afaa9b4f883f184cc804c