aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm
diff options
context:
space:
mode:
Diffstat (limited to 'ext/wasm')
-rw-r--r--ext/wasm/api/sqlite3-wasm.c10
-rw-r--r--ext/wasm/common/whwasmutil.js4
-rw-r--r--ext/wasm/jaccwabyt/jaccwabyt.js18
-rw-r--r--ext/wasm/jaccwabyt/jaccwabyt.md8
4 files changed, 20 insertions, 20 deletions
diff --git a/ext/wasm/api/sqlite3-wasm.c b/ext/wasm/api/sqlite3-wasm.c
index 59001379e..b9454155d 100644
--- a/ext/wasm/api/sqlite3-wasm.c
+++ b/ext/wasm/api/sqlite3-wasm.c
@@ -615,9 +615,9 @@ const char * sqlite3_wasm_enum_json(void){
StructBinder {
M(iVersion,"i");
M(xClose,"i(p)");
- M(xRead,"i(ppiI)");
- M(xWrite,"i(ppiI)");
- M(xTruncate,"i(pI)");
+ M(xRead,"i(ppij)");
+ M(xWrite,"i(ppij)");
+ M(xTruncate,"i(pj)");
M(xSync,"i(pi)");
M(xFileSize,"i(pp)");
M(xLock,"i(pi)");
@@ -630,8 +630,8 @@ const char * sqlite3_wasm_enum_json(void){
M(xShmLock,"i(piii)");
M(xShmBarrier,"v(p)");
M(xShmUnmap,"i(pi)");
- M(xFetch,"i(pIip)");
- M(xUnfetch,"i(pIp)");
+ M(xFetch,"i(pjip)");
+ M(xUnfetch,"i(pjp)");
} _StructBinder;
#undef CurrentStruct
diff --git a/ext/wasm/common/whwasmutil.js b/ext/wasm/common/whwasmutil.js
index b12759566..a0da492b0 100644
--- a/ext/wasm/common/whwasmutil.js
+++ b/ext/wasm/common/whwasmutil.js
@@ -389,7 +389,7 @@ self.WhWasmUtilInstaller = function(target){
- `i` = int32
- `p` = int32 ("pointer")
- - `j` or `I` = int64
+ - `j` = int64
- `f` = float32
- `d` = float64
- `v` = void, only legal for use as the result type
@@ -417,7 +417,7 @@ self.WhWasmUtilInstaller = function(target){
// Map of signature letters to type IR values
sigTypes: Object.assign(Object.create(null),{
i: 'i32', p: 'i32', P: 'i32', s: 'i32',
- j: 'i64', I: 'i64', f: 'f32', d: 'f64'
+ j: 'i64', f: 'f32', d: 'f64'
}),
// Map of type IR values to WASM type code values
typeCodes: Object.assign(Object.create(null),{
diff --git a/ext/wasm/jaccwabyt/jaccwabyt.js b/ext/wasm/jaccwabyt/jaccwabyt.js
index ce0d8dd1f..14c93b3a2 100644
--- a/ext/wasm/jaccwabyt/jaccwabyt.js
+++ b/ext/wasm/jaccwabyt/jaccwabyt.js
@@ -123,7 +123,7 @@ self.Jaccwabyt = function StructBinderFactory(config){
switch(sigLetter(s)){
case 'i': return 'i32';
case 'p': case 'P': case 's': return ptrIR;
- case 'j': case 'I': return 'i64';
+ case 'j': return 'i64';
case 'f': return 'float';
case 'd': return 'double';
}
@@ -135,7 +135,7 @@ self.Jaccwabyt = function StructBinderFactory(config){
switch(sigLetter(s)){
case 'i': return 4;
case 'p': case 'P': case 's': return ptrSizeof;
- case 'j': case 'I': return 8;
+ case 'j': return 8;
case 'f': return 4 /* C-side floats, not JS-side */;
case 'd': return 8;
}
@@ -168,7 +168,7 @@ self.Jaccwabyt = function StructBinderFactory(config){
break;
}
case 'i': return 'getInt32';
- case 'j': case 'I': return affirmBigIntArray() && 'getBigInt64';
+ case 'j': return affirmBigIntArray() && 'getBigInt64';
case 'f': return 'getFloat32';
case 'd': return 'getFloat64';
}
@@ -186,7 +186,7 @@ self.Jaccwabyt = function StructBinderFactory(config){
break;
}
case 'i': return 'setInt32';
- case 'j': case 'I': return affirmBigIntArray() && 'setBigInt64';
+ case 'j': return affirmBigIntArray() && 'setBigInt64';
case 'f': return 'setFloat32';
case 'd': return 'setFloat64';
}
@@ -200,7 +200,7 @@ self.Jaccwabyt = function StructBinderFactory(config){
const sigDVSetWrapper = function(s){
switch(sigLetter(s)) {
case 'i': case 'f': case 'd': return Number;
- case 'j': case 'I': return affirmBigIntArray() && BigInt;
+ case 'j': return affirmBigIntArray() && BigInt;
case 'p': case 'P': case 's':
switch(ptrSizeof){
case 4: return Number;
@@ -361,7 +361,7 @@ self.Jaccwabyt = function StructBinderFactory(config){
framework's native format or in Emscripten format.
*/
const __memberSignature = function f(obj,memberName,emscriptenFormat=false){
- if(!f._) f._ = (x)=>x.replace(/[^viIpPsjrd]/g,'').replace(/[pPs]/g,'i');
+ if(!f._) f._ = (x)=>x.replace(/[^vipPsjrd]/g,'').replace(/[pPs]/g,'i');
const m = __lookupMember(obj.structInfo, memberName, true);
return emscriptenFormat ? f._(m.signature) : m.signature;
};
@@ -571,7 +571,7 @@ self.Jaccwabyt = function StructBinderFactory(config){
direct reuse in each accessor function. */
f._ = {getters: {}, setters: {}, sw:{}};
const a = ['i','p','P','s','f','d','v()'];
- if(bigIntEnabled) a.push('j','I');
+ if(bigIntEnabled) a.push('j');
a.forEach(function(v){
//const ir = sigIR(v);
f._.getters[v] = sigDVGetter(v) /* DataView[MethodName] values for GETTERS */;
@@ -579,8 +579,8 @@ self.Jaccwabyt = function StructBinderFactory(config){
f._.sw[v] = sigDVSetWrapper(v) /* BigInt or Number ctor to wrap around values
for conversion */;
});
- const rxSig1 = /^[iIpPsjfd]$/,
- rxSig2 = /^[viIpPsjfd]\([iIpPsjfd]*\)$/;
+ const rxSig1 = /^[ipPsjfd]$/,
+ rxSig2 = /^[vipPsjfd]\([ipPsjfd]*\)$/;
f.sigCheck = function(obj, name, key,sig){
if(Object.prototype.hasOwnProperty.call(obj, key)){
toss(obj.structName,'already has a property named',key+'.');
diff --git a/ext/wasm/jaccwabyt/jaccwabyt.md b/ext/wasm/jaccwabyt/jaccwabyt.md
index 023d7973b..edcba260a 100644
--- a/ext/wasm/jaccwabyt/jaccwabyt.md
+++ b/ext/wasm/jaccwabyt/jaccwabyt.md
@@ -275,10 +275,10 @@ supported letters are:
- **`v`** = `void` (only used as return type for function pointer members)
- **`i`** = `int32` (4 bytes)
-- **`j`** or **`I`** = `int64` (8 bytes) is only really usable if this
- code is built with BigInt support (e.g. using the Emscripten
- `-sWASM_BIGINT` build flag). Without that, this API may throw when
- encountering this signature entry.
+- **`j`** = `int64` (8 bytes) is only really usable if this code is built
+ with BigInt support (e.g. using the Emscripten `-sWASM_BIGINT` build
+ flag). Without that, this API may throw when encountering the `j`
+ signature entry.
- **`f`** = `float` (4 bytes)
- **`d`** = `double` (8 bytes)
- **`p`** = `int32` (but see below!)