Skip to content

Commit 87d3d48

Browse files
committed
Shunt instructions to managed data (GC) prefix
Also update section number to not overlap with the tag section, and fix reftypes to not overlap with dataref/arrayref shorthands.
1 parent f9c12dd commit 87d3d48

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

proposals/stringref/Overview.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -483,49 +483,49 @@ Return a substring of *`view`*, starting at the current position of
483483

484484
```
485485
reftype ::= ...
486-
| 0x67 ⇒ stringref ; SLEB128(-0x19)
487-
| 0x66 ⇒ stringview_wtf8 ; SLEB128(-0x1a)
488-
| 0x65 ⇒ stringview_wtf16 ; SLEB128(-0x1b)
489-
| 0x64 ⇒ stringview_iter ; SLEB128(-0x1c)
486+
| 0x65 ⇒ stringref ; SLEB128(-0x1b)
487+
| 0x64 ⇒ stringview_wtf8 ; SLEB128(-0x1c)
488+
| 0x63 ⇒ stringview_wtf16 ; SLEB128(-0x1d)
489+
| 0x62 ⇒ stringview_iter ; SLEB128(-0x1e)
490490
491491
wtf8_policy ::= 0x00 ⇒ utf8
492492
| 0x01 ⇒ wtf8
493493
| 0x02 ⇒ replace
494494
495495
instr ::= ...
496-
| 0xfc 0x12 $mem:u32 ⇒ string.new_wtf8 $mem
497-
| 0xfc 0x13 $mem:u32 ⇒ string.new_wtf16 $mem
498-
| 0xfc 0x14 $idx:u32 ⇒ string.const $idx
499-
| 0xfc 0x15 ⇒ string.measure_utf8
500-
| 0xfc 0x16 ⇒ string.measure_wtf8
501-
| 0xfc 0x17 ⇒ string.measure_wtf16
502-
| 0xfc 0x18 $mem:u32 $policy:u32 ⇒ string.encode_wtf8 $mem $policy
503-
| 0xfc 0x19 $mem:u32 ⇒ string.encode_wtf16 $mem
504-
| 0xfc 0x1a ⇒ string.concat
505-
| 0xfc 0x1b ⇒ string.eq
506-
| 0xfc 0x1c ⇒ string.is_usv_sequence
507-
| 0xfc 0x1d ⇒ string.as_wtf8
508-
| 0xfc 0x1estring.as_wtf16
509-
| 0xfc 0x1f ⇒ string.as_iter
510-
| 0xfc 0x20 ⇒ stringview_wtf8.advance
511-
| 0xfc 0x21 $mem:u32 $policy:u32 ⇒ stringview_wtf8.encode $mem $policy
512-
| 0xfc 0x22stringview_wtf8.slice
513-
| 0xfc 0x23 ⇒ stringview_wtf16.length
514-
| 0xfc 0x24 ⇒ stringview_wtf16.get_codeunit
515-
| 0xfc 0x25 $mem:u32 ⇒ stringview_wtf16.encode $mem
516-
| 0xfc 0x26stringview_wtf16.slice
517-
| 0xfc 0x27 ⇒ stringview_iter.cur
518-
| 0xfc 0x28 ⇒ stringview_iter.advance
519-
| 0xfc 0x29 ⇒ stringview_iter.rewind
520-
| 0xfc 0x2a ⇒ stringview_iter.slice
496+
| 0xfb 0x80 $mem:u32 ⇒ string.new_wtf8 $mem
497+
| 0xfb 0x81 $mem:u32 ⇒ string.new_wtf16 $mem
498+
| 0xfb 0x82 $idx:u32 ⇒ string.const $idx
499+
| 0xfb 0x83 ⇒ string.measure_utf8
500+
| 0xfb 0x84 ⇒ string.measure_wtf8
501+
| 0xfb 0x85 ⇒ string.measure_wtf16
502+
| 0xfb 0x86 $mem:u32 $policy:u32 ⇒ string.encode_wtf8 $mem $policy
503+
| 0xfb 0x87 $mem:u32 ⇒ string.encode_wtf16 $mem
504+
| 0xfb 0x88 ⇒ string.concat
505+
| 0xfb 0x89 ⇒ string.eq
506+
| 0xfb 0x8a ⇒ string.is_usv_sequence
507+
| 0xfb 0x90 ⇒ string.as_wtf8
508+
| 0xfb 0x91stringview_wtf8.advance
509+
| 0xfb 0x92 $mem:u32 $policy:u32 ⇒ stringview_wtf8.encode $mem $policy
510+
| 0xfb 0x93 ⇒ stringview_wtf8.slice
511+
| 0xfb 0x98 ⇒ string.as_wtf16
512+
| 0xfb 0x99stringview_wtf16.length
513+
| 0xfb 0x9a ⇒ stringview_wtf16.get_codeunit
514+
| 0xfb 0x9b $mem:u32 ⇒ stringview_wtf16.encode $mem
515+
| 0xfb 0x9c ⇒ stringview_wtf16.slice
516+
| 0xfb 0xa0string.as_iter
517+
| 0xfb 0xa1 ⇒ stringview_iter.cur
518+
| 0xfb 0xa2 ⇒ stringview_iter.advance
519+
| 0xfb 0xa3 ⇒ stringview_iter.rewind
520+
| 0xfb 0xa4 ⇒ stringview_iter.slice
521521
522522
;; New section. Could be a data segment instead, but really we would
523523
;; like for it to come before the code so that we can avoid dynamic
524524
;; checks in string.const, and before the elem and global sections so
525525
;; that we can have constant strings. If present, must be present only
526526
;; once, and right before the globals section (or where the globals
527527
;; section would be).
528-
stringrefs ::= section_13(vec(vec(u8)))
528+
stringrefs ::= section_14(vec(vec(u8)))
529529
```
530530

531531
## Examples

0 commit comments

Comments
 (0)