Skip to content

Commit efd97b7

Browse files
authored
Add tuple operations to index.d.ts and README.md (#31)
1 parent c2245c7 commit efd97b7

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ API
445445

446446
* Module#**loop**(label: `string | null`, body: `ExpressionRef`): `ExpressionRef`<br />
447447
Creates a loop.
448-
448+
449449
* Module#**br**(label: `string`, condition?: `ExpressionRef`, value?: `ExpressionRef`): `ExpressionRef`<br />
450450
Creates a branch (br) to a label.
451451

@@ -974,6 +974,8 @@ Note that these are pseudo instructions enabling Binaryen to reason about multip
974974
* Module#anyref.**pop**(): `ExpressionRef`
975975
* Module#nullref.**pop**(): `ExpressionRef`
976976
* Module#exnref.**pop**(): `ExpressionRef`
977+
* Module#tuple.**make**(elements: `ExpressionRef[]`): `ExpressionRef`
978+
* Module#tuple.**extract**(tuple: `ExpressionRef`, index: `number`): `ExpressionRef`
977979

978980
#### [Exception handling operations](https://github.com/WebAssembly/exception-handling/blob/master/proposals/Exceptions.md) 🦄
979981

@@ -1170,7 +1172,7 @@ Note that these are pseudo instructions enabling Binaryen to reason about multip
11701172
* SIMDShuffleInfo#**left**: `ExpressionRef`
11711173
* SIMDShuffleInfo#**right**: `ExpressionRef`
11721174
* SIMDShuffleInfo#**mask**: `Uint8Array`
1173-
>
1175+
>
11741176
* SIMDTernaryInfo#**op**: `Op`
11751177
* SIMDTernaryInfo#**a**: `ExpressionRef`
11761178
* SIMDTernaryInfo#**b**: `ExpressionRef`

index.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ declare module binaryen {
6767
Throw,
6868
Rethrow,
6969
BrOnExn,
70+
TupleMake,
71+
TupleExtract,
7072
Push,
7173
Pop
7274
}
@@ -116,6 +118,8 @@ declare module binaryen {
116118
const ThrowId: ExpressionIds;
117119
const RethrowId: ExpressionIds;
118120
const BrOnExnId: ExpressionIds;
121+
const TupleMakeId: ExpressionIds;
122+
const TupleExtractId: ExpressionIds;
119123
const PushId: ExpressionIds;
120124
const PopId: ExpressionIds;
121125

@@ -1338,6 +1342,10 @@ declare module binaryen {
13381342
notify(ptr: ExpressionRef, notifyCount: ExpressionRef): ExpressionRef;
13391343
fence(): ExpressionRef;
13401344
};
1345+
tuple: {
1346+
make(elements: ExportRef[]): ExpressionRef;
1347+
extract(tuple: ExpressionRef, index: number): ExpressionRef;
1348+
};
13411349
try(body: ExpressionRef, catchBody: ExpressionRef): ExpressionRef;
13421350
throw(event: string, operands: ExpressionRef[]): ExpressionRef;
13431351
rethrow(exnref: ExpressionRef): ExpressionRef;

0 commit comments

Comments
 (0)