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: https://github.com/WebAssembly/reference-types/pull/66

Differential Revision: https://phabricator.services.mozilla.com/D58882

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ryan Hunt 2020-01-26 04:13:56 +00:00
parent 2694c42d68
commit af432e59ad
2 changed files with 6 additions and 6 deletions

View File

@ -41,7 +41,7 @@ const F32Code = 0x7d;
const F64Code = 0x7c;
const AnyFuncCode = 0x70;
const AnyrefCode = 0x6f;
const RefCode = 0x6e;
const RefCode = 0x6d;
const FuncCode = 0x60;
const VoidCode = 0x40;

View File

@ -62,10 +62,13 @@ enum class TypeCode {
FuncRef = 0x70, // SLEB128(-0x10)
// A reference to any type.
AnyRef = 0x6f,
AnyRef = 0x6f, // SLEB128(-0x11)
// A null reference.
NullRef = 0x6e, // SLEB128(-0x12)
// Type constructor for reference types.
Ref = 0x6e,
Ref = 0x6d,
// Type constructor for function types
Func = 0x60, // SLEB128(-0x20)
@ -76,9 +79,6 @@ enum class TypeCode {
// The 'empty' case of blocktype.
BlockVoid = 0x40, // SLEB128(-0x40)
// Type designator for null - unofficial, will not appear in the binary format
NullRef = 0x39,
Limit = 0x80
};