[][src]Module walrus::ir

Intermediate representation for expressions.

The goal is to match wasm instructions as closely as possible, but translate the stack machine into an expression tree. Additionally all control frames are representd as Blocks.

Modules

matcher

Matching expressions.

Structs

AtomicNotify

The atomic.notify instruction to wake up threads

AtomicNotifyId

An identifier to a AtomicNotify expression.

AtomicRmw

An atomic read/modify/write operation

AtomicRmwId

An identifier to a AtomicRmw expression.

AtomicWait

The *.atomic.wait instruction to block threads

AtomicWaitId

An identifier to a AtomicWait expression.

Binop

Binary operations, those requiring two operands

BinopId

An identifier to a Binop expression.

Block

A block of multiple expressions, and also a control frame.

BlockId

An identifier to a Block expression.

Br

br

BrId

An identifier to a Br expression.

BrIf

br_if

BrIfId

An identifier to a BrIf expression.

BrTable

br_table

BrTableId

An identifier to a BrTable expression.

Call

call

CallId

An identifier to a Call expression.

CallIndirect

call_indirect

CallIndirectId

An identifier to a CallIndirect expression.

Cmpxchg

An atomic compare exchange operation

CmpxchgId

An identifier to a Cmpxchg expression.

Const

*.const

ConstId

An identifier to a Const expression.

DataDrop

data.drop

DataDropId

An identifier to a DataDrop expression.

Drop

drop

DropId

An identifier to a Drop expression.

GlobalGet

global.get n

GlobalGetId

An identifier to a GlobalGet expression.

GlobalSet

global.set n

GlobalSetId

An identifier to a GlobalSet expression.

IfElse

if ... else ... end

IfElseId

An identifier to a IfElse expression.

Load

Loading a value from memory

LoadId

An identifier to a Load expression.

LoadSplat

iaaxbb.load_splat

LoadSplatId

An identifier to a LoadSplat expression.

Local

A local variable or parameter.

LocalGet

local.get n

LocalGetId

An identifier to a LocalGet expression.

LocalSet

local.set n

LocalSetId

An identifier to a LocalSet expression.

LocalTee

local.tee n

LocalTeeId

An identifier to a LocalTee expression.

MemArg

Arguments to memory operations, containing a constant offset from a dynamic address as well as a predicted alignment.

MemoryCopy

memory.copy

MemoryCopyId

An identifier to a MemoryCopy expression.

MemoryFill

memory.fill

MemoryFillId

An identifier to a MemoryFill expression.

MemoryGrow

memory.grow

MemoryGrowId

An identifier to a MemoryGrow expression.

MemoryInit

memory.init

MemoryInitId

An identifier to a MemoryInit expression.

MemorySize

memory.size

MemorySizeId

An identifier to a MemorySize expression.

RefIsNull

ref.is_null

RefIsNullId

An identifier to a RefIsNull expression.

RefNull

ref.null

RefNullId

An identifier to a RefNull expression.

Return

return

ReturnId

An identifier to a Return expression.

Select

select

SelectId

An identifier to a Select expression.

Store

Storing a value to memory

StoreId

An identifier to a Store expression.

TableGet

table.get

TableGetId

An identifier to a TableGet expression.

TableGrow

table.grow

TableGrowId

An identifier to a TableGrow expression.

TableSet

table.set

TableSetId

An identifier to a TableSet expression.

TableSize

table.size

TableSizeId

An identifier to a TableSize expression.

Unop

Unary operations, those requiring one operand

UnopId

An identifier to a Unop expression.

Unreachable

unreachable

UnreachableId

An identifier to a Unreachable expression.

V128BitselectId

An identifier to a V128Bitselect expression.

V128Bitselect

v128.bitselect

V128SwizzleId

An identifier to a V128Swizzle expression.

V128Swizzle

v128.swizzle

V128ShuffleId

An identifier to a V128Shuffle expression.

V128Shuffle

v128.shuffle

WithSideEffects

A value followed by one or more stack-neutral, side-effecting expressions.

WithSideEffectsId

An identifier to a WithSideEffects expression.

Enums

AtomicOp

The different kinds of atomic rmw operations

AtomicWidth

The different kinds of atomic rmw operations

BinaryOp

Possible binary operations in wasm

BlockKind

Different kinds of blocks.

Expr

An enum of all the different kinds of wasm expressions.

ExtendedLoad

The kinds of extended loads which can happen

LoadKind

The different kinds of load instructions that are part of a Load IR node

LoadSplatKind

The different kinds of load instructions that are part of a LoadSplat IR node

StoreKind

The different kinds of store instructions that are part of a Store IR node

UnaryOp

Possible unary operations in wasm

Value

Constant values that can show up in WebAssembly

Traits

Ast

A trait for anything that is an AST node in our IR.

Visit

Anything that can be visited by a Visitor.

VisitMut

Anything that can be visited by a Visitor.

Visitor

A visitor walks over an IR expression tree.

VisitorMut

A visitor walks over a mutable IR expression tree.

Type Definitions

ExprId

An identifier for a particular expression.

LocalId

The id of a local.

ShuffleIndices

Argument in V128Shuffle of lane indices to select