diff --git a/.vscode/settings.json b/.vscode/settings.json index 58084395..9ad76c27 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,5 +10,8 @@ "stdbool.h": "c", "emscripten.h": "c", "quickjs-atom.h": "c" + }, + "files.exclude": { + ".yarn/releases/*": true } } diff --git a/doc/@jitl/quickjs-ng-wasmfile-debug-asyncify/README.md b/doc/@jitl/quickjs-ng-wasmfile-debug-asyncify/README.md index 7340b641..4623ca4d 100644 --- a/doc/@jitl/quickjs-ng-wasmfile-debug-asyncify/README.md +++ b/doc/@jitl/quickjs-ng-wasmfile-debug-asyncify/README.md @@ -101,7 +101,6 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", - "-s ASYNCIFY_ADVISE=1", "-O3" ] ``` diff --git a/doc/@jitl/quickjs-singlefile-browser-debug-asyncify/README.md b/doc/@jitl/quickjs-singlefile-browser-debug-asyncify/README.md index 7fd86b08..ebee4f29 100644 --- a/doc/@jitl/quickjs-singlefile-browser-debug-asyncify/README.md +++ b/doc/@jitl/quickjs-singlefile-browser-debug-asyncify/README.md @@ -90,7 +90,6 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", "-s SINGLE_FILE=1", - "-s ASYNCIFY_ADVISE=1", "-O3" ] ``` diff --git a/doc/@jitl/quickjs-singlefile-cjs-debug-asyncify/README.md b/doc/@jitl/quickjs-singlefile-cjs-debug-asyncify/README.md index cf788561..0b243d0d 100644 --- a/doc/@jitl/quickjs-singlefile-cjs-debug-asyncify/README.md +++ b/doc/@jitl/quickjs-singlefile-cjs-debug-asyncify/README.md @@ -90,7 +90,6 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", "-s SINGLE_FILE=1", - "-s ASYNCIFY_ADVISE=1", "-O3" ] ``` diff --git a/doc/@jitl/quickjs-singlefile-mjs-debug-asyncify/README.md b/doc/@jitl/quickjs-singlefile-mjs-debug-asyncify/README.md index 6032cbba..52805212 100644 --- a/doc/@jitl/quickjs-singlefile-mjs-debug-asyncify/README.md +++ b/doc/@jitl/quickjs-singlefile-mjs-debug-asyncify/README.md @@ -90,7 +90,6 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", "-s SINGLE_FILE=1", - "-s ASYNCIFY_ADVISE=1", "-O3" ] ``` diff --git a/doc/@jitl/quickjs-wasmfile-debug-asyncify/README.md b/doc/@jitl/quickjs-wasmfile-debug-asyncify/README.md index 5580d361..f6f33a94 100644 --- a/doc/@jitl/quickjs-wasmfile-debug-asyncify/README.md +++ b/doc/@jitl/quickjs-wasmfile-debug-asyncify/README.md @@ -101,7 +101,6 @@ Variant-specific Emscripten build flags: "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "--pre-js $(TEMPLATES)/pre-wasmMemory.js", - "-s ASYNCIFY_ADVISE=1", "-O3" ] ``` diff --git a/doc/quickjs-emscripten-core/classes/QuickJSAsyncContext.md b/doc/quickjs-emscripten-core/classes/QuickJSAsyncContext.md index 2e255e60..381ebb48 100644 --- a/doc/quickjs-emscripten-core/classes/QuickJSAsyncContext.md +++ b/doc/quickjs-emscripten-core/classes/QuickJSAsyncContext.md @@ -256,7 +256,7 @@ Just calls the standard .dispose() method of this class. #### callFunction(func, thisVal, args) -> **callFunction**(`func`, `thisVal`, `args`?): `ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +> **callFunction**(`func`, `thisVal`, `args`?): `QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> [`func.call(thisVal, ...args)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call) or [`func.apply(thisVal, args)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply). @@ -277,7 +277,7 @@ a promise, use [resolvePromise](QuickJSAsyncContext.md#resolvepromise) to conver ##### Returns -`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> A result. If the function threw synchronously, `result.error` be a handle to the exception. Otherwise `result.value` will be a handle to the @@ -302,7 +302,7 @@ console.log(context.dump(resultHandle)) // 42 #### callFunction(func, thisVal, args) -> **callFunction**(`func`, `thisVal`, ...`args`): `ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +> **callFunction**(`func`, `thisVal`, ...`args`): `QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> ##### Parameters @@ -314,7 +314,7 @@ console.log(context.dump(resultHandle)) // 42 ##### Returns -`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> ##### Inherited from @@ -328,7 +328,7 @@ console.log(context.dump(resultHandle)) // 42 ### callMethod() -> **callMethod**(`thisHandle`, `key`, `args`): `ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +> **callMethod**(`thisHandle`, `key`, `args`): `QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> `handle[key](...args)` @@ -344,7 +344,7 @@ Call a method on a JSValue. This is a convenience method that calls [getProp](Qu #### Returns -`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> A result. If the function threw synchronously, `result.error` be a handle to the exception. Otherwise `result.value` will be a handle to the @@ -538,7 +538,7 @@ See [Equality comparisons and sameness](https://developer.mozilla.org/en-US/docs ### evalCode() -> **evalCode**(`code`, `filename`, `options`?): `ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +> **evalCode**(`code`, `filename`, `options`?): `QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> Like [`eval(code)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#Description). @@ -582,7 +582,7 @@ See [EvalFlags](../exports.md#evalflags) for number semantics. #### Returns -`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> The last statement's value. If the code threw synchronously, `result.error` will be a handle to the exception. If execution was @@ -601,7 +601,7 @@ interrupted, the error will have name `InternalError` and message ### evalCodeAsync() -> **evalCodeAsync**(`code`, `filename`, `options`?): `Promise`\<`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> +> **evalCodeAsync**(`code`, `filename`, `options`?): `Promise`\<`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> Asyncified version of [evalCode](QuickJSAsyncContext.md#evalcode). @@ -617,7 +617,7 @@ See [EvalFlags](../exports.md#evalflags) for number semantics #### Returns -`Promise`\<`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> +`Promise`\<`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> #### Source @@ -697,7 +697,7 @@ Converts `handle` to a Javascript bigint. ### getIterator() -> **getIterator**(`iterableHandle`): `ContextResult`\<`QuickJSIterator`\> +> **getIterator**(`iterableHandle`): `QuickJSContextResult`\<`QuickJSIterator`\> `handle[Symbol.iterator]()`. See [QuickJSIterator]([object Object]). Returns a host iterator that wraps and proxies calls to a guest iterator handle. @@ -719,7 +719,7 @@ for (using entriesHandle of context.getIterator(mapHandle).unwrap()) { #### Returns -`ContextResult`\<`QuickJSIterator`\> +`QuickJSContextResult`\<`QuickJSIterator`\> #### Inherited from @@ -794,7 +794,7 @@ Converts `handle` into a Javascript number. ### getOwnPropertyNames() -> **getOwnPropertyNames**(`handle`, `options`): `ContextResult`\<[`DisposableArray`](../exports.md#disposablearrayt)\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> +> **getOwnPropertyNames**(`handle`, `options`): `QuickJSContextResult`\<[`DisposableArray`](../exports.md#disposablearrayt)\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> `Object.getOwnPropertyNames(handle)`. Similar to the [standard semantics](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyNames), @@ -828,7 +828,7 @@ for (using prop of context.getOwnPropertyNames(objectHandle).unwrap()) { #### Returns -`ContextResult`\<[`DisposableArray`](../exports.md#disposablearrayt)\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> +`QuickJSContextResult`\<[`DisposableArray`](../exports.md#disposablearrayt)\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> an an array of handles of the property names. The array itself is disposable for your convenience. @@ -1468,7 +1468,7 @@ No two symbols created with this function will be the same value. ### resolvePromise() -> **resolvePromise**(`promiseLikeHandle`): `Promise`\<`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> +> **resolvePromise**(`promiseLikeHandle`): `Promise`\<`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> `Promise.resolve(value)`. Convert a handle containing a Promise-like value inside the VM into an @@ -1482,7 +1482,7 @@ A handle to a Promise-like value with a `.then(onSuccess, onError)` method. #### Returns -`Promise`\<`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> +`Promise`\<`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> #### Inherited from diff --git a/doc/quickjs-emscripten-core/classes/QuickJSContext.md b/doc/quickjs-emscripten-core/classes/QuickJSContext.md index abe39f70..0e9bf229 100644 --- a/doc/quickjs-emscripten-core/classes/QuickJSContext.md +++ b/doc/quickjs-emscripten-core/classes/QuickJSContext.md @@ -284,7 +284,7 @@ Just calls the standard .dispose() method of this class. #### callFunction(func, thisVal, args) -> **callFunction**(`func`, `thisVal`, `args`?): `ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +> **callFunction**(`func`, `thisVal`, `args`?): `QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> [`func.call(thisVal, ...args)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call) or [`func.apply(thisVal, args)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply). @@ -305,7 +305,7 @@ a promise, use [resolvePromise](QuickJSContext.md#resolvepromise) to convert it ##### Returns -`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> A result. If the function threw synchronously, `result.error` be a handle to the exception. Otherwise `result.value` will be a handle to the @@ -330,7 +330,7 @@ console.log(context.dump(resultHandle)) // 42 #### callFunction(func, thisVal, args) -> **callFunction**(`func`, `thisVal`, ...`args`): `ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +> **callFunction**(`func`, `thisVal`, ...`args`): `QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> ##### Parameters @@ -342,7 +342,7 @@ console.log(context.dump(resultHandle)) // 42 ##### Returns -`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> ##### Implementation of @@ -356,7 +356,7 @@ console.log(context.dump(resultHandle)) // 42 ### callMethod() -> **callMethod**(`thisHandle`, `key`, `args`): `ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +> **callMethod**(`thisHandle`, `key`, `args`): `QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> `handle[key](...args)` @@ -372,7 +372,7 @@ Call a method on a JSValue. This is a convenience method that calls [getProp](Qu #### Returns -`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> A result. If the function threw synchronously, `result.error` be a handle to the exception. Otherwise `result.value` will be a handle to the @@ -550,7 +550,7 @@ See [Equality comparisons and sameness](https://developer.mozilla.org/en-US/docs ### evalCode() -> **evalCode**(`code`, `filename`, `options`?): `ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +> **evalCode**(`code`, `filename`, `options`?): `QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> Like [`eval(code)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#Description). @@ -594,7 +594,7 @@ See [EvalFlags](../exports.md#evalflags) for number semantics. #### Returns -`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> The last statement's value. If the code threw synchronously, `result.error` will be a handle to the exception. If execution was @@ -671,7 +671,7 @@ Converts `handle` to a Javascript bigint. ### getIterator() -> **getIterator**(`iterableHandle`): `ContextResult`\<`QuickJSIterator`\> +> **getIterator**(`iterableHandle`): `QuickJSContextResult`\<`QuickJSIterator`\> `handle[Symbol.iterator]()`. See [QuickJSIterator]([object Object]). Returns a host iterator that wraps and proxies calls to a guest iterator handle. @@ -693,7 +693,7 @@ for (using entriesHandle of context.getIterator(mapHandle).unwrap()) { #### Returns -`ContextResult`\<`QuickJSIterator`\> +`QuickJSContextResult`\<`QuickJSIterator`\> #### Source @@ -760,7 +760,7 @@ Converts `handle` into a Javascript number. ### getOwnPropertyNames() -> **getOwnPropertyNames**(`handle`, `options`): `ContextResult`\<[`DisposableArray`](../exports.md#disposablearrayt)\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> +> **getOwnPropertyNames**(`handle`, `options`): `QuickJSContextResult`\<[`DisposableArray`](../exports.md#disposablearrayt)\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> `Object.getOwnPropertyNames(handle)`. Similar to the [standard semantics](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyNames), @@ -794,7 +794,7 @@ for (using prop of context.getOwnPropertyNames(objectHandle).unwrap()) { #### Returns -`ContextResult`\<[`DisposableArray`](../exports.md#disposablearrayt)\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> +`QuickJSContextResult`\<[`DisposableArray`](../exports.md#disposablearrayt)\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> an an array of handles of the property names. The array itself is disposable for your convenience. @@ -1342,7 +1342,7 @@ No two symbols created with this function will be the same value. ### resolvePromise() -> **resolvePromise**(`promiseLikeHandle`): `Promise`\<`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> +> **resolvePromise**(`promiseLikeHandle`): `Promise`\<`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> `Promise.resolve(value)`. Convert a handle containing a Promise-like value inside the VM into an @@ -1356,7 +1356,7 @@ A handle to a Promise-like value with a `.then(onSuccess, onError)` method. #### Returns -`Promise`\<`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> +`Promise`\<`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> #### Remarks diff --git a/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md b/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md index 37f91d36..4ef767d3 100644 --- a/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md +++ b/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md @@ -256,7 +256,7 @@ Just calls the standard .dispose() method of this class. #### callFunction(func, thisVal, args) -> **callFunction**(`func`, `thisVal`, `args`?): `ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +> **callFunction**(`func`, `thisVal`, `args`?): `QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> [`func.call(thisVal, ...args)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call) or [`func.apply(thisVal, args)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply). @@ -277,7 +277,7 @@ a promise, use [resolvePromise](QuickJSAsyncContext.md#resolvepromise) to conver ##### Returns -`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> A result. If the function threw synchronously, `result.error` be a handle to the exception. Otherwise `result.value` will be a handle to the @@ -302,7 +302,7 @@ console.log(context.dump(resultHandle)) // 42 #### callFunction(func, thisVal, args) -> **callFunction**(`func`, `thisVal`, ...`args`): `ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +> **callFunction**(`func`, `thisVal`, ...`args`): `QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> ##### Parameters @@ -314,7 +314,7 @@ console.log(context.dump(resultHandle)) // 42 ##### Returns -`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> ##### Inherited from @@ -328,7 +328,7 @@ console.log(context.dump(resultHandle)) // 42 ### callMethod() -> **callMethod**(`thisHandle`, `key`, `args`): `ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +> **callMethod**(`thisHandle`, `key`, `args`): `QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> `handle[key](...args)` @@ -344,7 +344,7 @@ Call a method on a JSValue. This is a convenience method that calls [getProp](Qu #### Returns -`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> A result. If the function threw synchronously, `result.error` be a handle to the exception. Otherwise `result.value` will be a handle to the @@ -538,7 +538,7 @@ See [Equality comparisons and sameness](https://developer.mozilla.org/en-US/docs ### evalCode() -> **evalCode**(`code`, `filename`, `options`?): `ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +> **evalCode**(`code`, `filename`, `options`?): `QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> Like [`eval(code)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#Description). @@ -582,7 +582,7 @@ See [EvalFlags](../exports.md#evalflags) for number semantics. #### Returns -`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> The last statement's value. If the code threw synchronously, `result.error` will be a handle to the exception. If execution was @@ -601,7 +601,7 @@ interrupted, the error will have name `InternalError` and message ### evalCodeAsync() -> **evalCodeAsync**(`code`, `filename`, `options`?): `Promise`\<`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> +> **evalCodeAsync**(`code`, `filename`, `options`?): `Promise`\<`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> Asyncified version of [evalCode](QuickJSAsyncContext.md#evalcode). @@ -617,7 +617,7 @@ See [EvalFlags](../exports.md#evalflags) for number semantics #### Returns -`Promise`\<`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> +`Promise`\<`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> #### Source @@ -697,7 +697,7 @@ Converts `handle` to a Javascript bigint. ### getIterator() -> **getIterator**(`iterableHandle`): `ContextResult`\<`QuickJSIterator`\> +> **getIterator**(`iterableHandle`): `QuickJSContextResult`\<`QuickJSIterator`\> `handle[Symbol.iterator]()`. See [QuickJSIterator]([object Object]). Returns a host iterator that wraps and proxies calls to a guest iterator handle. @@ -719,7 +719,7 @@ for (using entriesHandle of context.getIterator(mapHandle).unwrap()) { #### Returns -`ContextResult`\<`QuickJSIterator`\> +`QuickJSContextResult`\<`QuickJSIterator`\> #### Inherited from @@ -794,7 +794,7 @@ Converts `handle` into a Javascript number. ### getOwnPropertyNames() -> **getOwnPropertyNames**(`handle`, `options`): `ContextResult`\<[`DisposableArray`](../exports.md#disposablearrayt)\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> +> **getOwnPropertyNames**(`handle`, `options`): `QuickJSContextResult`\<[`DisposableArray`](../exports.md#disposablearrayt)\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> `Object.getOwnPropertyNames(handle)`. Similar to the [standard semantics](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyNames), @@ -828,7 +828,7 @@ for (using prop of context.getOwnPropertyNames(objectHandle).unwrap()) { #### Returns -`ContextResult`\<[`DisposableArray`](../exports.md#disposablearrayt)\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> +`QuickJSContextResult`\<[`DisposableArray`](../exports.md#disposablearrayt)\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> an an array of handles of the property names. The array itself is disposable for your convenience. @@ -1468,7 +1468,7 @@ No two symbols created with this function will be the same value. ### resolvePromise() -> **resolvePromise**(`promiseLikeHandle`): `Promise`\<`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> +> **resolvePromise**(`promiseLikeHandle`): `Promise`\<`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> `Promise.resolve(value)`. Convert a handle containing a Promise-like value inside the VM into an @@ -1482,7 +1482,7 @@ A handle to a Promise-like value with a `.then(onSuccess, onError)` method. #### Returns -`Promise`\<`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> +`Promise`\<`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> #### Inherited from diff --git a/doc/quickjs-emscripten/classes/QuickJSContext.md b/doc/quickjs-emscripten/classes/QuickJSContext.md index 2d35df5e..be34f1df 100644 --- a/doc/quickjs-emscripten/classes/QuickJSContext.md +++ b/doc/quickjs-emscripten/classes/QuickJSContext.md @@ -284,7 +284,7 @@ Just calls the standard .dispose() method of this class. #### callFunction(func, thisVal, args) -> **callFunction**(`func`, `thisVal`, `args`?): `ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +> **callFunction**(`func`, `thisVal`, `args`?): `QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> [`func.call(thisVal, ...args)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call) or [`func.apply(thisVal, args)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply). @@ -305,7 +305,7 @@ a promise, use [resolvePromise](QuickJSContext.md#resolvepromise) to convert it ##### Returns -`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> A result. If the function threw synchronously, `result.error` be a handle to the exception. Otherwise `result.value` will be a handle to the @@ -330,7 +330,7 @@ console.log(context.dump(resultHandle)) // 42 #### callFunction(func, thisVal, args) -> **callFunction**(`func`, `thisVal`, ...`args`): `ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +> **callFunction**(`func`, `thisVal`, ...`args`): `QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> ##### Parameters @@ -342,7 +342,7 @@ console.log(context.dump(resultHandle)) // 42 ##### Returns -`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> ##### Implementation of @@ -356,7 +356,7 @@ console.log(context.dump(resultHandle)) // 42 ### callMethod() -> **callMethod**(`thisHandle`, `key`, `args`): `ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +> **callMethod**(`thisHandle`, `key`, `args`): `QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> `handle[key](...args)` @@ -372,7 +372,7 @@ Call a method on a JSValue. This is a convenience method that calls [getProp](Qu #### Returns -`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> A result. If the function threw synchronously, `result.error` be a handle to the exception. Otherwise `result.value` will be a handle to the @@ -550,7 +550,7 @@ See [Equality comparisons and sameness](https://developer.mozilla.org/en-US/docs ### evalCode() -> **evalCode**(`code`, `filename`, `options`?): `ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +> **evalCode**(`code`, `filename`, `options`?): `QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> Like [`eval(code)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#Description). @@ -594,7 +594,7 @@ See [EvalFlags](../exports.md#evalflags) for number semantics. #### Returns -`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> +`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\> The last statement's value. If the code threw synchronously, `result.error` will be a handle to the exception. If execution was @@ -671,7 +671,7 @@ Converts `handle` to a Javascript bigint. ### getIterator() -> **getIterator**(`iterableHandle`): `ContextResult`\<`QuickJSIterator`\> +> **getIterator**(`iterableHandle`): `QuickJSContextResult`\<`QuickJSIterator`\> `handle[Symbol.iterator]()`. See [QuickJSIterator]([object Object]). Returns a host iterator that wraps and proxies calls to a guest iterator handle. @@ -693,7 +693,7 @@ for (using entriesHandle of context.getIterator(mapHandle).unwrap()) { #### Returns -`ContextResult`\<`QuickJSIterator`\> +`QuickJSContextResult`\<`QuickJSIterator`\> #### Source @@ -760,7 +760,7 @@ Converts `handle` into a Javascript number. ### getOwnPropertyNames() -> **getOwnPropertyNames**(`handle`, `options`): `ContextResult`\<[`DisposableArray`](../exports.md#disposablearrayt)\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> +> **getOwnPropertyNames**(`handle`, `options`): `QuickJSContextResult`\<[`DisposableArray`](../exports.md#disposablearrayt)\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> `Object.getOwnPropertyNames(handle)`. Similar to the [standard semantics](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyNames), @@ -794,7 +794,7 @@ for (using prop of context.getOwnPropertyNames(objectHandle).unwrap()) { #### Returns -`ContextResult`\<[`DisposableArray`](../exports.md#disposablearrayt)\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> +`QuickJSContextResult`\<[`DisposableArray`](../exports.md#disposablearrayt)\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> an an array of handles of the property names. The array itself is disposable for your convenience. @@ -1342,7 +1342,7 @@ No two symbols created with this function will be the same value. ### resolvePromise() -> **resolvePromise**(`promiseLikeHandle`): `Promise`\<`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> +> **resolvePromise**(`promiseLikeHandle`): `Promise`\<`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> `Promise.resolve(value)`. Convert a handle containing a Promise-like value inside the VM into an @@ -1356,7 +1356,7 @@ A handle to a Promise-like value with a `.then(onSuccess, onError)` method. #### Returns -`Promise`\<`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> +`Promise`\<`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>\> #### Remarks diff --git a/packages/quickjs-emscripten/src/quickjs.test.ts b/packages/quickjs-emscripten/src/quickjs.test.ts index 04866748..f9fc2336 100644 --- a/packages/quickjs-emscripten/src/quickjs.test.ts +++ b/packages/quickjs-emscripten/src/quickjs.test.ts @@ -1307,7 +1307,7 @@ function asyncContextTests(getContext: () => Promise) { // The nesting levels of the test cannot be too high, otherwise the // node.js call stack will overflow when executing `yarn test` const buildName = isBuildDebug(vm) ? "debug" : "release" - const EXPECTED_NESTING_LEVEL = isBuildDebug(vm) ? 19 : 20 + const EXPECTED_NESTING_LEVEL = isBuildDebug(vm) ? 18 : 20 let asyncFunctionCalls = 0 const asyncFn = async () => { diff --git a/packages/variant-quickjs-ng-wasmfile-debug-asyncify/Makefile b/packages/variant-quickjs-ng-wasmfile-debug-asyncify/Makefile index 503b6680..3bc532c0 100644 --- a/packages/variant-quickjs-ng-wasmfile-debug-asyncify/Makefile +++ b/packages/variant-quickjs-ng-wasmfile-debug-asyncify/Makefile @@ -7,8 +7,6 @@ GENERATE_TS=$(GENERATE_TS_ENV) ../../scripts/generate.ts THIS_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) REPO_ROOT := $(abspath $(THIS_DIR)/../..) -DEBUG_MAKE=1 - QUICKJS_LIB=quickjs-ng # Paths @@ -106,6 +104,7 @@ ifdef DEBUG_MAKE MKDIRP=@echo "\n=====[["" target: $@, deps: $<, variant: $(VARIANT) ""]]=====" ; mkdir -p $(dir $@) else MKDIRP=@mkdir -p $(dir $@) + CFLAGS+=-Wunused-command-line-argument=0 endif ############################################################################### @@ -165,11 +164,11 @@ $(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_ WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json $(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) -c -o $@ $< $(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(QUICKJS_DEFINES) -c -o $@ $< $(BUILD_WRAPPER)/symbols.json: $(MKDIRP) diff --git a/packages/variant-quickjs-ng-wasmfile-debug-sync/Makefile b/packages/variant-quickjs-ng-wasmfile-debug-sync/Makefile index c9398f20..83d5811d 100644 --- a/packages/variant-quickjs-ng-wasmfile-debug-sync/Makefile +++ b/packages/variant-quickjs-ng-wasmfile-debug-sync/Makefile @@ -7,8 +7,6 @@ GENERATE_TS=$(GENERATE_TS_ENV) ../../scripts/generate.ts THIS_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) REPO_ROOT := $(abspath $(THIS_DIR)/../..) -DEBUG_MAKE=1 - QUICKJS_LIB=quickjs-ng # Paths @@ -100,6 +98,7 @@ ifdef DEBUG_MAKE MKDIRP=@echo "\n=====[["" target: $@, deps: $<, variant: $(VARIANT) ""]]=====" ; mkdir -p $(dir $@) else MKDIRP=@mkdir -p $(dir $@) + CFLAGS+=-Wunused-command-line-argument=0 endif ############################################################################### @@ -159,11 +158,11 @@ $(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_ WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json $(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) -c -o $@ $< $(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(QUICKJS_DEFINES) -c -o $@ $< $(BUILD_WRAPPER)/symbols.json: $(MKDIRP) diff --git a/packages/variant-quickjs-ng-wasmfile-release-asyncify/Makefile b/packages/variant-quickjs-ng-wasmfile-release-asyncify/Makefile index 6a1fd431..98d6e0ae 100644 --- a/packages/variant-quickjs-ng-wasmfile-release-asyncify/Makefile +++ b/packages/variant-quickjs-ng-wasmfile-release-asyncify/Makefile @@ -7,8 +7,6 @@ GENERATE_TS=$(GENERATE_TS_ENV) ../../scripts/generate.ts THIS_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) REPO_ROOT := $(abspath $(THIS_DIR)/../..) -DEBUG_MAKE=1 - QUICKJS_LIB=quickjs-ng # Paths @@ -101,6 +99,7 @@ ifdef DEBUG_MAKE MKDIRP=@echo "\n=====[["" target: $@, deps: $<, variant: $(VARIANT) ""]]=====" ; mkdir -p $(dir $@) else MKDIRP=@mkdir -p $(dir $@) + CFLAGS+=-Wunused-command-line-argument=0 endif ############################################################################### @@ -160,11 +159,11 @@ $(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_ WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json $(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) -c -o $@ $< $(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(QUICKJS_DEFINES) -c -o $@ $< $(BUILD_WRAPPER)/symbols.json: $(MKDIRP) diff --git a/packages/variant-quickjs-ng-wasmfile-release-sync/Makefile b/packages/variant-quickjs-ng-wasmfile-release-sync/Makefile index 29d60b2d..10308dc0 100644 --- a/packages/variant-quickjs-ng-wasmfile-release-sync/Makefile +++ b/packages/variant-quickjs-ng-wasmfile-release-sync/Makefile @@ -7,8 +7,6 @@ GENERATE_TS=$(GENERATE_TS_ENV) ../../scripts/generate.ts THIS_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) REPO_ROOT := $(abspath $(THIS_DIR)/../..) -DEBUG_MAKE=1 - QUICKJS_LIB=quickjs-ng # Paths @@ -94,6 +92,7 @@ ifdef DEBUG_MAKE MKDIRP=@echo "\n=====[["" target: $@, deps: $<, variant: $(VARIANT) ""]]=====" ; mkdir -p $(dir $@) else MKDIRP=@mkdir -p $(dir $@) + CFLAGS+=-Wunused-command-line-argument=0 endif ############################################################################### @@ -153,11 +152,11 @@ $(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_ WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json $(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) -c -o $@ $< $(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(QUICKJS_DEFINES) -c -o $@ $< $(BUILD_WRAPPER)/symbols.json: $(MKDIRP) diff --git a/packages/variant-quickjs-singlefile-browser-debug-asyncify/Makefile b/packages/variant-quickjs-singlefile-browser-debug-asyncify/Makefile index 4aace500..8f80d526 100644 --- a/packages/variant-quickjs-singlefile-browser-debug-asyncify/Makefile +++ b/packages/variant-quickjs-singlefile-browser-debug-asyncify/Makefile @@ -7,8 +7,6 @@ GENERATE_TS=$(GENERATE_TS_ENV) ../../scripts/generate.ts THIS_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) REPO_ROOT := $(abspath $(THIS_DIR)/../..) -DEBUG_MAKE=1 - QUICKJS_LIB=quickjs # Paths @@ -107,6 +105,7 @@ ifdef DEBUG_MAKE MKDIRP=@echo "\n=====[["" target: $@, deps: $<, variant: $(VARIANT) ""]]=====" ; mkdir -p $(dir $@) else MKDIRP=@mkdir -p $(dir $@) + CFLAGS+=-Wunused-command-line-argument=0 endif ############################################################################### @@ -166,11 +165,11 @@ $(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_ WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json $(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) -c -o $@ $< $(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(QUICKJS_DEFINES) -c -o $@ $< $(BUILD_WRAPPER)/symbols.json: $(MKDIRP) diff --git a/packages/variant-quickjs-singlefile-browser-debug-sync/Makefile b/packages/variant-quickjs-singlefile-browser-debug-sync/Makefile index fe329b08..d28a634b 100644 --- a/packages/variant-quickjs-singlefile-browser-debug-sync/Makefile +++ b/packages/variant-quickjs-singlefile-browser-debug-sync/Makefile @@ -7,8 +7,6 @@ GENERATE_TS=$(GENERATE_TS_ENV) ../../scripts/generate.ts THIS_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) REPO_ROOT := $(abspath $(THIS_DIR)/../..) -DEBUG_MAKE=1 - QUICKJS_LIB=quickjs # Paths @@ -101,6 +99,7 @@ ifdef DEBUG_MAKE MKDIRP=@echo "\n=====[["" target: $@, deps: $<, variant: $(VARIANT) ""]]=====" ; mkdir -p $(dir $@) else MKDIRP=@mkdir -p $(dir $@) + CFLAGS+=-Wunused-command-line-argument=0 endif ############################################################################### @@ -160,11 +159,11 @@ $(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_ WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json $(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) -c -o $@ $< $(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(QUICKJS_DEFINES) -c -o $@ $< $(BUILD_WRAPPER)/symbols.json: $(MKDIRP) diff --git a/packages/variant-quickjs-singlefile-browser-release-asyncify/Makefile b/packages/variant-quickjs-singlefile-browser-release-asyncify/Makefile index ba2108e3..a72cb500 100644 --- a/packages/variant-quickjs-singlefile-browser-release-asyncify/Makefile +++ b/packages/variant-quickjs-singlefile-browser-release-asyncify/Makefile @@ -7,8 +7,6 @@ GENERATE_TS=$(GENERATE_TS_ENV) ../../scripts/generate.ts THIS_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) REPO_ROOT := $(abspath $(THIS_DIR)/../..) -DEBUG_MAKE=1 - QUICKJS_LIB=quickjs # Paths @@ -102,6 +100,7 @@ ifdef DEBUG_MAKE MKDIRP=@echo "\n=====[["" target: $@, deps: $<, variant: $(VARIANT) ""]]=====" ; mkdir -p $(dir $@) else MKDIRP=@mkdir -p $(dir $@) + CFLAGS+=-Wunused-command-line-argument=0 endif ############################################################################### @@ -161,11 +160,11 @@ $(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_ WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json $(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) -c -o $@ $< $(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(QUICKJS_DEFINES) -c -o $@ $< $(BUILD_WRAPPER)/symbols.json: $(MKDIRP) diff --git a/packages/variant-quickjs-singlefile-browser-release-sync/Makefile b/packages/variant-quickjs-singlefile-browser-release-sync/Makefile index de2f1c5a..9cffc527 100644 --- a/packages/variant-quickjs-singlefile-browser-release-sync/Makefile +++ b/packages/variant-quickjs-singlefile-browser-release-sync/Makefile @@ -7,8 +7,6 @@ GENERATE_TS=$(GENERATE_TS_ENV) ../../scripts/generate.ts THIS_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) REPO_ROOT := $(abspath $(THIS_DIR)/../..) -DEBUG_MAKE=1 - QUICKJS_LIB=quickjs # Paths @@ -95,6 +93,7 @@ ifdef DEBUG_MAKE MKDIRP=@echo "\n=====[["" target: $@, deps: $<, variant: $(VARIANT) ""]]=====" ; mkdir -p $(dir $@) else MKDIRP=@mkdir -p $(dir $@) + CFLAGS+=-Wunused-command-line-argument=0 endif ############################################################################### @@ -154,11 +153,11 @@ $(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_ WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json $(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) -c -o $@ $< $(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(QUICKJS_DEFINES) -c -o $@ $< $(BUILD_WRAPPER)/symbols.json: $(MKDIRP) diff --git a/packages/variant-quickjs-singlefile-cjs-debug-asyncify/Makefile b/packages/variant-quickjs-singlefile-cjs-debug-asyncify/Makefile index e5f1938e..2e9e6cde 100644 --- a/packages/variant-quickjs-singlefile-cjs-debug-asyncify/Makefile +++ b/packages/variant-quickjs-singlefile-cjs-debug-asyncify/Makefile @@ -7,8 +7,6 @@ GENERATE_TS=$(GENERATE_TS_ENV) ../../scripts/generate.ts THIS_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) REPO_ROOT := $(abspath $(THIS_DIR)/../..) -DEBUG_MAKE=1 - QUICKJS_LIB=quickjs # Paths @@ -107,6 +105,7 @@ ifdef DEBUG_MAKE MKDIRP=@echo "\n=====[["" target: $@, deps: $<, variant: $(VARIANT) ""]]=====" ; mkdir -p $(dir $@) else MKDIRP=@mkdir -p $(dir $@) + CFLAGS+=-Wunused-command-line-argument=0 endif ############################################################################### @@ -166,11 +165,11 @@ $(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_ WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json $(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) -c -o $@ $< $(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(QUICKJS_DEFINES) -c -o $@ $< $(BUILD_WRAPPER)/symbols.json: $(MKDIRP) diff --git a/packages/variant-quickjs-singlefile-cjs-debug-sync/Makefile b/packages/variant-quickjs-singlefile-cjs-debug-sync/Makefile index 5311976c..27f4f5c1 100644 --- a/packages/variant-quickjs-singlefile-cjs-debug-sync/Makefile +++ b/packages/variant-quickjs-singlefile-cjs-debug-sync/Makefile @@ -7,8 +7,6 @@ GENERATE_TS=$(GENERATE_TS_ENV) ../../scripts/generate.ts THIS_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) REPO_ROOT := $(abspath $(THIS_DIR)/../..) -DEBUG_MAKE=1 - QUICKJS_LIB=quickjs # Paths @@ -101,6 +99,7 @@ ifdef DEBUG_MAKE MKDIRP=@echo "\n=====[["" target: $@, deps: $<, variant: $(VARIANT) ""]]=====" ; mkdir -p $(dir $@) else MKDIRP=@mkdir -p $(dir $@) + CFLAGS+=-Wunused-command-line-argument=0 endif ############################################################################### @@ -160,11 +159,11 @@ $(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_ WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json $(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) -c -o $@ $< $(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(QUICKJS_DEFINES) -c -o $@ $< $(BUILD_WRAPPER)/symbols.json: $(MKDIRP) diff --git a/packages/variant-quickjs-singlefile-cjs-release-asyncify/Makefile b/packages/variant-quickjs-singlefile-cjs-release-asyncify/Makefile index f6830e25..d30fd3ae 100644 --- a/packages/variant-quickjs-singlefile-cjs-release-asyncify/Makefile +++ b/packages/variant-quickjs-singlefile-cjs-release-asyncify/Makefile @@ -7,8 +7,6 @@ GENERATE_TS=$(GENERATE_TS_ENV) ../../scripts/generate.ts THIS_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) REPO_ROOT := $(abspath $(THIS_DIR)/../..) -DEBUG_MAKE=1 - QUICKJS_LIB=quickjs # Paths @@ -102,6 +100,7 @@ ifdef DEBUG_MAKE MKDIRP=@echo "\n=====[["" target: $@, deps: $<, variant: $(VARIANT) ""]]=====" ; mkdir -p $(dir $@) else MKDIRP=@mkdir -p $(dir $@) + CFLAGS+=-Wunused-command-line-argument=0 endif ############################################################################### @@ -161,11 +160,11 @@ $(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_ WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json $(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) -c -o $@ $< $(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(QUICKJS_DEFINES) -c -o $@ $< $(BUILD_WRAPPER)/symbols.json: $(MKDIRP) diff --git a/packages/variant-quickjs-singlefile-cjs-release-sync/Makefile b/packages/variant-quickjs-singlefile-cjs-release-sync/Makefile index fed5b654..29680ee7 100644 --- a/packages/variant-quickjs-singlefile-cjs-release-sync/Makefile +++ b/packages/variant-quickjs-singlefile-cjs-release-sync/Makefile @@ -7,8 +7,6 @@ GENERATE_TS=$(GENERATE_TS_ENV) ../../scripts/generate.ts THIS_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) REPO_ROOT := $(abspath $(THIS_DIR)/../..) -DEBUG_MAKE=1 - QUICKJS_LIB=quickjs # Paths @@ -95,6 +93,7 @@ ifdef DEBUG_MAKE MKDIRP=@echo "\n=====[["" target: $@, deps: $<, variant: $(VARIANT) ""]]=====" ; mkdir -p $(dir $@) else MKDIRP=@mkdir -p $(dir $@) + CFLAGS+=-Wunused-command-line-argument=0 endif ############################################################################### @@ -154,11 +153,11 @@ $(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_ WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json $(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) -c -o $@ $< $(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(QUICKJS_DEFINES) -c -o $@ $< $(BUILD_WRAPPER)/symbols.json: $(MKDIRP) diff --git a/packages/variant-quickjs-singlefile-mjs-debug-asyncify/Makefile b/packages/variant-quickjs-singlefile-mjs-debug-asyncify/Makefile index b2146452..faeaecc4 100644 --- a/packages/variant-quickjs-singlefile-mjs-debug-asyncify/Makefile +++ b/packages/variant-quickjs-singlefile-mjs-debug-asyncify/Makefile @@ -7,8 +7,6 @@ GENERATE_TS=$(GENERATE_TS_ENV) ../../scripts/generate.ts THIS_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) REPO_ROOT := $(abspath $(THIS_DIR)/../..) -DEBUG_MAKE=1 - QUICKJS_LIB=quickjs # Paths @@ -107,6 +105,7 @@ ifdef DEBUG_MAKE MKDIRP=@echo "\n=====[["" target: $@, deps: $<, variant: $(VARIANT) ""]]=====" ; mkdir -p $(dir $@) else MKDIRP=@mkdir -p $(dir $@) + CFLAGS+=-Wunused-command-line-argument=0 endif ############################################################################### @@ -166,11 +165,11 @@ $(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_ WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json $(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) -c -o $@ $< $(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(QUICKJS_DEFINES) -c -o $@ $< $(BUILD_WRAPPER)/symbols.json: $(MKDIRP) diff --git a/packages/variant-quickjs-singlefile-mjs-debug-sync/Makefile b/packages/variant-quickjs-singlefile-mjs-debug-sync/Makefile index 0a0065d1..1341f156 100644 --- a/packages/variant-quickjs-singlefile-mjs-debug-sync/Makefile +++ b/packages/variant-quickjs-singlefile-mjs-debug-sync/Makefile @@ -7,8 +7,6 @@ GENERATE_TS=$(GENERATE_TS_ENV) ../../scripts/generate.ts THIS_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) REPO_ROOT := $(abspath $(THIS_DIR)/../..) -DEBUG_MAKE=1 - QUICKJS_LIB=quickjs # Paths @@ -101,6 +99,7 @@ ifdef DEBUG_MAKE MKDIRP=@echo "\n=====[["" target: $@, deps: $<, variant: $(VARIANT) ""]]=====" ; mkdir -p $(dir $@) else MKDIRP=@mkdir -p $(dir $@) + CFLAGS+=-Wunused-command-line-argument=0 endif ############################################################################### @@ -160,11 +159,11 @@ $(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_ WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json $(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) -c -o $@ $< $(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(QUICKJS_DEFINES) -c -o $@ $< $(BUILD_WRAPPER)/symbols.json: $(MKDIRP) diff --git a/packages/variant-quickjs-singlefile-mjs-release-asyncify/Makefile b/packages/variant-quickjs-singlefile-mjs-release-asyncify/Makefile index 4381ed25..b92a31fc 100644 --- a/packages/variant-quickjs-singlefile-mjs-release-asyncify/Makefile +++ b/packages/variant-quickjs-singlefile-mjs-release-asyncify/Makefile @@ -7,8 +7,6 @@ GENERATE_TS=$(GENERATE_TS_ENV) ../../scripts/generate.ts THIS_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) REPO_ROOT := $(abspath $(THIS_DIR)/../..) -DEBUG_MAKE=1 - QUICKJS_LIB=quickjs # Paths @@ -102,6 +100,7 @@ ifdef DEBUG_MAKE MKDIRP=@echo "\n=====[["" target: $@, deps: $<, variant: $(VARIANT) ""]]=====" ; mkdir -p $(dir $@) else MKDIRP=@mkdir -p $(dir $@) + CFLAGS+=-Wunused-command-line-argument=0 endif ############################################################################### @@ -161,11 +160,11 @@ $(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_ WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json $(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) -c -o $@ $< $(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(QUICKJS_DEFINES) -c -o $@ $< $(BUILD_WRAPPER)/symbols.json: $(MKDIRP) diff --git a/packages/variant-quickjs-singlefile-mjs-release-sync/Makefile b/packages/variant-quickjs-singlefile-mjs-release-sync/Makefile index c28f31d3..c87c13ea 100644 --- a/packages/variant-quickjs-singlefile-mjs-release-sync/Makefile +++ b/packages/variant-quickjs-singlefile-mjs-release-sync/Makefile @@ -7,8 +7,6 @@ GENERATE_TS=$(GENERATE_TS_ENV) ../../scripts/generate.ts THIS_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) REPO_ROOT := $(abspath $(THIS_DIR)/../..) -DEBUG_MAKE=1 - QUICKJS_LIB=quickjs # Paths @@ -95,6 +93,7 @@ ifdef DEBUG_MAKE MKDIRP=@echo "\n=====[["" target: $@, deps: $<, variant: $(VARIANT) ""]]=====" ; mkdir -p $(dir $@) else MKDIRP=@mkdir -p $(dir $@) + CFLAGS+=-Wunused-command-line-argument=0 endif ############################################################################### @@ -154,11 +153,11 @@ $(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_ WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json $(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) -c -o $@ $< $(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(QUICKJS_DEFINES) -c -o $@ $< $(BUILD_WRAPPER)/symbols.json: $(MKDIRP) diff --git a/packages/variant-quickjs-wasmfile-debug-asyncify/Makefile b/packages/variant-quickjs-wasmfile-debug-asyncify/Makefile index afbbc1b7..38276b41 100644 --- a/packages/variant-quickjs-wasmfile-debug-asyncify/Makefile +++ b/packages/variant-quickjs-wasmfile-debug-asyncify/Makefile @@ -7,8 +7,6 @@ GENERATE_TS=$(GENERATE_TS_ENV) ../../scripts/generate.ts THIS_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) REPO_ROOT := $(abspath $(THIS_DIR)/../..) -DEBUG_MAKE=1 - QUICKJS_LIB=quickjs # Paths @@ -106,6 +104,7 @@ ifdef DEBUG_MAKE MKDIRP=@echo "\n=====[["" target: $@, deps: $<, variant: $(VARIANT) ""]]=====" ; mkdir -p $(dir $@) else MKDIRP=@mkdir -p $(dir $@) + CFLAGS+=-Wunused-command-line-argument=0 endif ############################################################################### @@ -165,11 +164,11 @@ $(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_ WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json $(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) -c -o $@ $< $(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(QUICKJS_DEFINES) -c -o $@ $< $(BUILD_WRAPPER)/symbols.json: $(MKDIRP) diff --git a/packages/variant-quickjs-wasmfile-debug-sync/Makefile b/packages/variant-quickjs-wasmfile-debug-sync/Makefile index 64e740a8..11f43c90 100644 --- a/packages/variant-quickjs-wasmfile-debug-sync/Makefile +++ b/packages/variant-quickjs-wasmfile-debug-sync/Makefile @@ -7,8 +7,6 @@ GENERATE_TS=$(GENERATE_TS_ENV) ../../scripts/generate.ts THIS_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) REPO_ROOT := $(abspath $(THIS_DIR)/../..) -DEBUG_MAKE=1 - QUICKJS_LIB=quickjs # Paths @@ -100,6 +98,7 @@ ifdef DEBUG_MAKE MKDIRP=@echo "\n=====[["" target: $@, deps: $<, variant: $(VARIANT) ""]]=====" ; mkdir -p $(dir $@) else MKDIRP=@mkdir -p $(dir $@) + CFLAGS+=-Wunused-command-line-argument=0 endif ############################################################################### @@ -159,11 +158,11 @@ $(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_ WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json $(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) -c -o $@ $< $(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(QUICKJS_DEFINES) -c -o $@ $< $(BUILD_WRAPPER)/symbols.json: $(MKDIRP) diff --git a/packages/variant-quickjs-wasmfile-release-asyncify/Makefile b/packages/variant-quickjs-wasmfile-release-asyncify/Makefile index b9ef42a7..9bf233f7 100644 --- a/packages/variant-quickjs-wasmfile-release-asyncify/Makefile +++ b/packages/variant-quickjs-wasmfile-release-asyncify/Makefile @@ -7,8 +7,6 @@ GENERATE_TS=$(GENERATE_TS_ENV) ../../scripts/generate.ts THIS_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) REPO_ROOT := $(abspath $(THIS_DIR)/../..) -DEBUG_MAKE=1 - QUICKJS_LIB=quickjs # Paths @@ -101,6 +99,7 @@ ifdef DEBUG_MAKE MKDIRP=@echo "\n=====[["" target: $@, deps: $<, variant: $(VARIANT) ""]]=====" ; mkdir -p $(dir $@) else MKDIRP=@mkdir -p $(dir $@) + CFLAGS+=-Wunused-command-line-argument=0 endif ############################################################################### @@ -160,11 +159,11 @@ $(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_ WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json $(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) -c -o $@ $< $(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(QUICKJS_DEFINES) -c -o $@ $< $(BUILD_WRAPPER)/symbols.json: $(MKDIRP) diff --git a/packages/variant-quickjs-wasmfile-release-sync/Makefile b/packages/variant-quickjs-wasmfile-release-sync/Makefile index c88f8e2d..4445f6e5 100644 --- a/packages/variant-quickjs-wasmfile-release-sync/Makefile +++ b/packages/variant-quickjs-wasmfile-release-sync/Makefile @@ -7,8 +7,6 @@ GENERATE_TS=$(GENERATE_TS_ENV) ../../scripts/generate.ts THIS_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) REPO_ROOT := $(abspath $(THIS_DIR)/../..) -DEBUG_MAKE=1 - QUICKJS_LIB=quickjs # Paths @@ -94,6 +92,7 @@ ifdef DEBUG_MAKE MKDIRP=@echo "\n=====[["" target: $@, deps: $<, variant: $(VARIANT) ""]]=====" ; mkdir -p $(dir $@) else MKDIRP=@mkdir -p $(dir $@) + CFLAGS+=-Wunused-command-line-argument=0 endif ############################################################################### @@ -153,11 +152,11 @@ $(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_ WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json $(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) -c -o $@ $< $(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(QUICKJS_DEFINES) -c -o $@ $< $(BUILD_WRAPPER)/symbols.json: $(MKDIRP) diff --git a/templates/Variant.mk b/templates/Variant.mk index a4a57b8b..e3e1584d 100644 --- a/templates/Variant.mk +++ b/templates/Variant.mk @@ -7,8 +7,6 @@ GENERATE_TS=$(GENERATE_TS_ENV) ../../scripts/generate.ts THIS_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) REPO_ROOT := $(abspath $(THIS_DIR)/../..) -DEBUG_MAKE=1 - QUICKJS_LIB=REPLACE_THIS # Paths @@ -89,6 +87,7 @@ ifdef DEBUG_MAKE MKDIRP=@echo "\n=====[["" target: $@, deps: $<, variant: $(VARIANT) ""]]=====" ; mkdir -p $(dir $@) else MKDIRP=@mkdir -p $(dir $@) + CFLAGS+=-Wunused-command-line-argument=0 endif ############################################################################### @@ -148,11 +147,11 @@ $(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_ WASM_SYMBOLS=$(BUILD_WRAPPER)/symbols.json $(BUILD_WRAPPER)/asyncify-remove.json $(BUILD_WRAPPER)/asyncify-imports.json $(BUILD_WRAPPER)/%.o: $(WRAPPER_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(CFLAGS_SORTED_FUNCS) $(WRAPPER_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) -c -o $@ $< $(BUILD_QUICKJS)/%.o: $(QUICKJS_ROOT)/%.c $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) - $(EMCC) $(CFLAGS_WASM) $(EMCC_EXPORTED_FUNCS) $(QUICKJS_DEFINES) -c -o $@ $< + $(EMCC) $(CFLAGS_WASM) $(QUICKJS_DEFINES) -c -o $@ $< $(BUILD_WRAPPER)/symbols.json: $(MKDIRP)