Skip to content

Commit

Permalink
Update JS API for memory/table min/max and table.get/set (#70)
Browse files Browse the repository at this point in the history
Use `unsigned long long` rather then `unsigned long` which gives us u64
range rather than u32 range.

See https://webidl.spec.whatwg.org/#idl-unsigned-long-long
  • Loading branch information
sbc100 authored Jul 2, 2024
1 parent 4ca510f commit 62da125
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions document/js-api/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -590,15 +590,15 @@ Note: The use of this synchronous API is discouraged, as some implementations so

<pre class="idl">
dictionary MemoryDescriptor {
required [EnforceRange] unsigned long initial;
[EnforceRange] unsigned long maximum;
required [EnforceRange] unsigned long long initial;
[EnforceRange] unsigned long long maximum;
IndexType index;
};

[LegacyNamespace=WebAssembly, Exposed=*]
interface Memory {
constructor(MemoryDescriptor descriptor);
unsigned long grow([EnforceRange] unsigned long delta);
unsigned long grow([EnforceRange] unsigned long long delta);
ArrayBuffer toFixedLengthBuffer();
ArrayBuffer toResizableBuffer();
readonly attribute ArrayBuffer buffer;
Expand Down Expand Up @@ -781,17 +781,17 @@ enum TableKind {

dictionary TableDescriptor {
required TableKind element;
required [EnforceRange] unsigned long initial;
[EnforceRange] unsigned long maximum;
required [EnforceRange] unsigned long long initial;
[EnforceRange] unsigned long long maximum;
IndexType index;
};

[LegacyNamespace=WebAssembly, Exposed=*]
interface Table {
constructor(TableDescriptor descriptor, optional any value);
unsigned long grow([EnforceRange] unsigned long delta, optional any value);
any get([EnforceRange] unsigned long index);
undefined set([EnforceRange] unsigned long index, optional any value);
unsigned long long grow([EnforceRange] unsigned long long delta, optional any value);
any get([EnforceRange] unsigned long long index);
undefined set([EnforceRange] unsigned long long index, optional any value);
readonly attribute unsigned long length;
};
</pre>
Expand Down

0 comments on commit 62da125

Please sign in to comment.