Skip to content

Commit 01ef28e

Browse files
committed
Merge remote-tracking branch 'addr64/main' into wasm-3.0
2 parents 4ce8cfb + 9003cd5 commit 01ef28e

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

document/js-api/index.bs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1803,7 +1803,8 @@ In practice, an implementation may run out of resources for valid modules below
18031803

18041804
<ul>
18051805
<li>The maximum size of a table is 10,000,000.</li>
1806-
<li>The maximum number of pages of a memory is 65,536.</li>
1806+
<li>The maximum size of a 32-bit memory is 65,536 pages (4 GiB).</li>
1807+
<li>The maximum size of a 64-bit memory is 262,144 pages (16 GiB).</li>
18071808
</ul>
18081809

18091810
<h2 id="security-considerations">Security and Privacy Considerations</h2>

proposals/memory64/Overview.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,16 @@ have to support 32-bit memory addresses in their ABI.
8888
* [Memory page limits][valid limits] and [Table entry limits][valid limits] are
8989
classified by their respective address types
9090
- ```
91-
it : k n <= k (m <= k)? (n < m)?
91+
at : k n <= k (m <= k)? (n < m)?
9292
-------------------------------------------
93-
⊦ { min n, max m? } : it
93+
⊦ { min n, max m? } : at
9494
```
9595
9696
* Memory and Table types are validated accordingly:
9797
- ```
98-
⊦ limits : it
98+
⊦ limits : at
9999
--------------
100-
it limits ok
100+
at limits ok
101101
```
102102
103103
* All [memory instructions][valid meminst] are changed to use the address type,
@@ -195,11 +195,11 @@ have to support 32-bit memory addresses in their ABI.
195195
----------------------------------
196196
C ⊦ tables.fill x : [at t at] → []
197197
```
198-
- table.copy x y
198+
- table.copy d s
199199
- ```
200-
C.tables[d] = aN limits t C.tables[s] = aM limits t K = min {aN, AM}
200+
C.tables[d] = aD limits t C.tables[s] = aS limits t aN = min {aD, aS}
201201
-----------------------------------------------------------------------------
202-
C ⊦ table.copy d s : [aN aM aK] → []
202+
C ⊦ table.copy d s : [aD aS aN] → []
203203
```
204204
- table.init x y
205205
- ```

test/core/memory.wast

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
(module (memory 0 0))
66
(module (memory 0 1))
77
(module (memory 1 256))
8+
(module definition (memory 65536))
89
(module (memory 0 65536))
910

1011
(module (memory (data)) (func (export "memsize") (result i32) (memory.size)))

test/core/memory64.wast

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
(module (memory i64 0 1))
66
(module (memory i64 1 256))
77
(module (memory i64 0 65536))
8+
(module definition (memory i64 0x1_0000_0000_0000))
9+
(module (memory i64 0 0x1_0000_0000_0000))
810

911
(module (memory i64 (data)) (func (export "memsize") (result i64) (memory.size)))
1012
(assert_return (invoke "memsize") (i64.const 0))

test/core/table.wast

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
(module (table 0 1 funcref))
77
(module (table 1 256 funcref))
88
(module (table 0 65536 funcref))
9+
(module definition (table 0xffff_ffff funcref))
910
(module (table 0 0xffff_ffff funcref))
1011

1112
(module (table 1 (ref null func)))
@@ -53,6 +54,9 @@
5354
(module (table i64 1 256 funcref))
5455
(module (table i64 0 65536 funcref))
5556
(module (table i64 0 0xffff_ffff funcref))
57+
(module (table i64 0 0x1_0000_0000 funcref))
58+
(module definition (table i64 0xffff_ffff_ffff_ffff funcref))
59+
(module (table i64 0 0xffff_ffff_ffff_ffff funcref))
5660

5761
(module (table i64 0 funcref) (table i64 0 funcref))
5862
(module (table (import "spectest" "table64") i64 0 funcref) (table i64 0 funcref))

0 commit comments

Comments
 (0)