Skip to content

Commit

Permalink
stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
justjake committed Aug 31, 2024
1 parent 9652df4 commit 6f71942
Show file tree
Hide file tree
Showing 32 changed files with 127 additions and 150 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@
"stdbool.h": "c",
"emscripten.h": "c",
"quickjs-atom.h": "c"
},
"files.exclude": {
".yarn/releases/*": true
}
}
1 change: 0 additions & 1 deletion doc/@jitl/quickjs-ng-wasmfile-debug-asyncify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
```
Expand Down
1 change: 0 additions & 1 deletion doc/@jitl/quickjs-singlefile-cjs-debug-asyncify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
```
Expand Down
1 change: 0 additions & 1 deletion doc/@jitl/quickjs-singlefile-mjs-debug-asyncify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
```
Expand Down
1 change: 0 additions & 1 deletion doc/@jitl/quickjs-wasmfile-debug-asyncify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
```
Expand Down
32 changes: 16 additions & 16 deletions doc/quickjs-emscripten-core/classes/QuickJSAsyncContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -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
Expand All @@ -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

Expand All @@ -314,7 +314,7 @@ console.log(context.dump(resultHandle)) // 42

##### Returns

`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>
`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>

##### Inherited from

Expand All @@ -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)`

Expand All @@ -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
Expand Down Expand Up @@ -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).

Expand Down Expand Up @@ -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
Expand All @@ -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).

Expand All @@ -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

Expand Down Expand Up @@ -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.
Expand All @@ -719,7 +719,7 @@ for (using entriesHandle of context.getIterator(mapHandle).unwrap()) {

#### Returns

`ContextResult`\<`QuickJSIterator`\>
`QuickJSContextResult`\<`QuickJSIterator`\>

#### Inherited from

Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down
28 changes: 14 additions & 14 deletions doc/quickjs-emscripten-core/classes/QuickJSContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -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
Expand All @@ -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

Expand All @@ -342,7 +342,7 @@ console.log(context.dump(resultHandle)) // 42

##### Returns

`ContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>
`QuickJSContextResult`\<[`QuickJSHandle`](../exports.md#quickjshandle)\>

##### Implementation of

Expand All @@ -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)`

Expand All @@ -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
Expand Down Expand Up @@ -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).

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -693,7 +693,7 @@ for (using entriesHandle of context.getIterator(mapHandle).unwrap()) {

#### Returns

`ContextResult`\<`QuickJSIterator`\>
`QuickJSContextResult`\<`QuickJSIterator`\>

#### Source

Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down
Loading

0 comments on commit 6f71942

Please sign in to comment.