mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
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:
parent
2694c42d68
commit
af432e59ad
@ -41,7 +41,7 @@ const F32Code = 0x7d;
|
|||||||
const F64Code = 0x7c;
|
const F64Code = 0x7c;
|
||||||
const AnyFuncCode = 0x70;
|
const AnyFuncCode = 0x70;
|
||||||
const AnyrefCode = 0x6f;
|
const AnyrefCode = 0x6f;
|
||||||
const RefCode = 0x6e;
|
const RefCode = 0x6d;
|
||||||
const FuncCode = 0x60;
|
const FuncCode = 0x60;
|
||||||
const VoidCode = 0x40;
|
const VoidCode = 0x40;
|
||||||
|
|
||||||
|
@ -62,10 +62,13 @@ enum class TypeCode {
|
|||||||
FuncRef = 0x70, // SLEB128(-0x10)
|
FuncRef = 0x70, // SLEB128(-0x10)
|
||||||
|
|
||||||
// A reference to any type.
|
// A reference to any type.
|
||||||
AnyRef = 0x6f,
|
AnyRef = 0x6f, // SLEB128(-0x11)
|
||||||
|
|
||||||
|
// A null reference.
|
||||||
|
NullRef = 0x6e, // SLEB128(-0x12)
|
||||||
|
|
||||||
// Type constructor for reference types.
|
// Type constructor for reference types.
|
||||||
Ref = 0x6e,
|
Ref = 0x6d,
|
||||||
|
|
||||||
// Type constructor for function types
|
// Type constructor for function types
|
||||||
Func = 0x60, // SLEB128(-0x20)
|
Func = 0x60, // SLEB128(-0x20)
|
||||||
@ -76,9 +79,6 @@ enum class TypeCode {
|
|||||||
// The 'empty' case of blocktype.
|
// The 'empty' case of blocktype.
|
||||||
BlockVoid = 0x40, // SLEB128(-0x40)
|
BlockVoid = 0x40, // SLEB128(-0x40)
|
||||||
|
|
||||||
// Type designator for null - unofficial, will not appear in the binary format
|
|
||||||
NullRef = 0x39,
|
|
||||||
|
|
||||||
Limit = 0x80
|
Limit = 0x80
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user