mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 02:44:47 +01:00
add opcodes for function references https://github.com/WebAssembly/function-references/blob/master/proposals/function-references/Overview.md#instructions-1
This commit is contained in:
parent
d3f7069cc8
commit
7fd8d16403
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2017 - 2019 Volker Berlin (i-net software)
|
||||
* Copyright 2017 - 2020 Volker Berlin (i-net software)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@ -85,6 +85,18 @@ interface InstructionOpcodes {
|
||||
|
||||
static final int RETURN_CALL_INDIRECT = 0x13; // tail call
|
||||
|
||||
/** calling a function through a ref */
|
||||
static final int CALL_REF = 0x14;
|
||||
|
||||
/** tail calling a function through a ref */
|
||||
static final int RETURN_CALL_REF = 0x15;
|
||||
|
||||
/** create a closure */
|
||||
static final int FUNC_BIND = 0x16;
|
||||
|
||||
/** locals with block scope, in order to handle reference types without default initialisation values */
|
||||
static final int LET = 0x17;
|
||||
|
||||
static final int DROP = 0x1A;
|
||||
|
||||
/**
|
||||
@ -441,6 +453,12 @@ interface InstructionOpcodes {
|
||||
|
||||
static final int REF_ISNULL = 0xD1;
|
||||
|
||||
/** converts a nullable reference to a non-nullable one or traps if null */
|
||||
static final int REF_AS_NON_NULL = 0xD3;
|
||||
|
||||
/** converts a nullable reference to a non-nullable one or branches if null */
|
||||
static final int BR_ON_NULL = 0xD4;
|
||||
|
||||
static final int REF_EQ = 0xF0;
|
||||
|
||||
// === Non-trapping float-to-int conversions ====== https://github.com/WebAssembly/design/issues/1143
|
||||
|
Loading…
x
Reference in New Issue
Block a user