Skip to content

Commit ccf8849

Browse files
committed
Bug 1574865 - Wasm: Update encoding of nullref to match proposal. r=lth
This commit updates the encoding of nullref to match the one given in the reference types proposal. Spec: WebAssembly/reference-types#66 Differential Revision: https://phabricator.services.mozilla.com/D58882 UltraBlame original commit: 985cd0a6aca99bb5bb0b0ad8d2225a019bdf1d58
1 parent f067cff commit ccf8849

File tree

2 files changed

+25
-20
lines changed

2 files changed

+25
-20
lines changed

js/src/jit-test/lib/wasm-binary.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ AnyrefCode
246246
const
247247
RefCode
248248
=
249-
0x6e
249+
0x6d
250250
;
251251
const
252252
FuncCode

js/src/wasm/WasmConstants.h

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,29 @@ AnyRef
420420
0x6f
421421
/
422422
/
423+
SLEB128
424+
(
425+
-
426+
0x11
427+
)
428+
/
429+
/
430+
A
431+
null
432+
reference
433+
.
434+
NullRef
435+
=
436+
0x6e
437+
/
438+
/
439+
SLEB128
440+
(
441+
-
442+
0x12
443+
)
444+
/
445+
/
423446
Type
424447
constructor
425448
for
@@ -428,7 +451,7 @@ types
428451
.
429452
Ref
430453
=
431-
0x6e
454+
0x6d
432455
/
433456
/
434457
Type
@@ -485,24 +508,6 @@ SLEB128
485508
-
486509
0x40
487510
)
488-
/
489-
/
490-
Type
491-
designator
492-
for
493-
null
494-
-
495-
unofficial
496-
will
497-
not
498-
appear
499-
in
500-
the
501-
binary
502-
format
503-
NullRef
504-
=
505-
0x39
506511
Limit
507512
=
508513
0x80

0 commit comments

Comments
 (0)