Skip to content

Commit 44ca2d3

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: f76fa61db00e7985aa70eb01c548478e0ff319ab
1 parent a84d246 commit 44ca2d3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const F32Code = 0x7d;
4141
const F64Code = 0x7c;
4242
const AnyFuncCode = 0x70;
4343
const AnyrefCode = 0x6f;
44-
const RefCode = 0x6e;
44+
const RefCode = 0x6d;
4545
const FuncCode = 0x60;
4646
const VoidCode = 0x40;
4747

js/src/wasm/WasmConstants.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,13 @@ enum class TypeCode {
6262
FuncRef = 0x70,
6363

6464

65-
AnyRef = 0x6f,
65+
AnyRef = 0x6f,
6666

6767

68-
Ref = 0x6e,
68+
NullRef = 0x6e,
69+
70+
71+
Ref = 0x6d,
6972

7073

7174
Func = 0x60,
@@ -76,9 +79,6 @@ enum class TypeCode {
7679

7780
BlockVoid = 0x40,
7881

79-
80-
NullRef = 0x39,
81-
8282
Limit = 0x80
8383
};
8484

0 commit comments

Comments
 (0)