v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
wasm-opcodes-inl.h File Reference
#include "src/wasm/wasm-opcodes.h"
#include <array>
#include "src/base/template-utils.h"
#include "src/codegen/signature.h"
#include "src/execution/messages.h"
Include dependency graph for wasm-opcodes-inl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  v8
 
namespace  v8::internal
 
namespace  v8::internal::wasm
 
namespace  v8::internal::wasm::impl
 

Macros

#define CASE(opcode, binary, sig, name, ...)
 
#define CHECK_PREFIX(name, opcode)
 
#define CHECK_OPCODE(name, ...)
 
#define CHECK_OPCODE(name, opcode, ...)
 
#define DECLARE_SIG_ENUM(name, ...)
 
#define DECLARE_SIG(name, ...)
 
#define DECLARE_SIG_ENTRY(name, ...)
 
#define CASE(name, opc, sig, ...)
 
#define CASE(name, opc, sig, ...)
 
#define CASE(name, opc, sig, ...)
 
#define CASE(name, opc, sig, ...)
 
#define CASE(name, opc, sig, ...)
 
#define CASE(name, opc, sig32, text, sig64)
 
#define CASE(name, opc, sig, ...)
 
#define TRAPREASON_TO_MESSAGE(name)
 
#define MESSAGE_TO_TRAPREASON(name)
 

Enumerations

enum  v8::internal::wasm::impl::WasmOpcodeSig : uint8_t { v8::internal::wasm::impl::kSigEnum_None }
 

Functions

constexpr WasmOpcodeSig v8::internal::wasm::impl::GetShortOpcodeSigIndex (uint8_t opcode)
 
constexpr WasmOpcodeSig v8::internal::wasm::impl::GetAsmJsOpcodeSigIndex (uint8_t opcode)
 
constexpr WasmOpcodeSig v8::internal::wasm::impl::GetSimdOpcodeSigIndex (uint8_t opcode)
 
constexpr WasmOpcodeSig v8::internal::wasm::impl::GetRelaxedSimdOpcodeSigIndex (uint8_t opcode)
 
constexpr WasmOpcodeSig v8::internal::wasm::impl::GetAtomicOpcodeMem32SigIndex (uint8_t opcode)
 
constexpr WasmOpcodeSig v8::internal::wasm::impl::GetAtomicOpcodeMem64SigIndex (uint8_t opcode)
 
constexpr WasmOpcodeSig v8::internal::wasm::impl::GetNumericOpcodeSigIndex (uint8_t opcode)
 

Variables

constexpr const FunctionSigv8::internal::wasm::impl::kCachedSigs []
 
constexpr std::array< WasmOpcodeSig, 256 > v8::internal::wasm::impl::kShortSigTable
 
constexpr std::array< WasmOpcodeSig, 256 > v8::internal::wasm::impl::kSimpleAsmjsExprSigTable
 
constexpr std::array< WasmOpcodeSig, 256 > v8::internal::wasm::impl::kSimdExprSigTable
 
constexpr std::array< WasmOpcodeSig, 256 > v8::internal::wasm::impl::kRelaxedSimdExprSigTable
 
constexpr std::array< WasmOpcodeSig, 256 > v8::internal::wasm::impl::kAtomicExprSigTableMem32
 
constexpr std::array< WasmOpcodeSig, 256 > v8::internal::wasm::impl::kAtomicExprSigTableMem64
 
constexpr std::array< WasmOpcodeSig, 256 > v8::internal::wasm::impl::kNumericExprSigTable
 

Macro Definition Documentation

◆ CASE [1/8]

#define CASE ( name,
opc,
sig,
... )
Value:
opcode == opc ? kSigEnum_##sig:

◆ CASE [2/8]

#define CASE ( name,
opc,
sig,
... )
Value:
opcode == (opc & 0xFF) ? kSigEnum_##sig:

◆ CASE [3/8]

#define CASE ( name,
opc,
sig,
... )
Value:
opcode == (opc & 0xFF) ? kSigEnum_##sig:

◆ CASE [4/8]

#define CASE ( name,
opc,
sig,
... )
Value:
opcode == (opc & 0xFF) ? kSigEnum_##sig:

◆ CASE [5/8]

#define CASE ( name,
opc,
sig,
... )
Value:
opcode == (opc & 0xFF) ? kSigEnum_##sig:

◆ CASE [6/8]

#define CASE ( name,
opc,
sig,
... )
Value:
opcode == (opc & 0xFF) ? kSigEnum_##sig:

◆ CASE [7/8]

#define CASE ( name,
opc,
sig32,
text,
sig64 )
Value:
opcode == (opc & 0xFF) ? kSigEnum_##sig64:

◆ CASE [8/8]

#define CASE ( opcode,
binary,
sig,
name,
... )
Value:
case kExpr##opcode: \
return name;
const char * name
Definition builtins.cc:39

◆ CHECK_OPCODE [1/2]

#define CHECK_OPCODE ( name,
opcode,
... )
Value:
static_assert((opcode & 0xfff00) == 0xfd100);

◆ CHECK_OPCODE [2/2]

#define CHECK_OPCODE ( name,
... )
Value:
case kExpr##name:

◆ CHECK_PREFIX

#define CHECK_PREFIX ( name,
opcode )
Value:
case k##name##Prefix:

◆ DECLARE_SIG

#define DECLARE_SIG ( name,
... )
Value:
constexpr inline ValueType kTypes_##name[] = {__VA_ARGS__}; \
constexpr inline int kReturnsCount_##name = \
kTypes_##name[0] == kWasmVoid ? 0 : 1; \
constexpr inline FunctionSig kSig_##name( \
kReturnsCount_##name, static_cast<int>(arraysize(kTypes_##name)) - 1, \
kTypes_##name + (1 - kReturnsCount_##name));
#define arraysize(array)
Definition macros.h:67

Definition at line 177 of file wasm-opcodes-inl.h.

◆ DECLARE_SIG_ENTRY

#define DECLARE_SIG_ENTRY ( name,
... )
Value:
&kSig_##name,

Definition at line 187 of file wasm-opcodes-inl.h.

◆ DECLARE_SIG_ENUM

#define DECLARE_SIG_ENUM ( name,
... )
Value:
kSigEnum_##name,

Definition at line 171 of file wasm-opcodes-inl.h.

◆ MESSAGE_TO_TRAPREASON

#define MESSAGE_TO_TRAPREASON ( name)
Value:
case MessageTemplate::kWasm##name: \
return k##name;

◆ TRAPREASON_TO_MESSAGE

#define TRAPREASON_TO_MESSAGE ( name)
Value:
case k##name: \
return MessageTemplate::kWasm##name;