[][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 #name expression.

AtomicRmw

An atomic read/modify/write operation

AtomicRmwId

An identifier to a #name expression.

AtomicWait

The *.atomic.wait instruction to block threads

AtomicWaitId

An identifier to a #name expression.

Binop

Binary operations, those requiring two operands

BinopId

An identifier to a #name expression.

Block

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

BlockId

An identifier to a #name expression.

Br

br

BrId

An identifier to a #name expression.

BrIf

br_if

BrIfId

An identifier to a #name expression.

BrTable

br_table

BrTableId

An identifier to a #name expression.

Call

call

CallId

An identifier to a #name expression.

CallIndirect

call_indirect

CallIndirectId

An identifier to a #name expression.

Cmpxchg

An atomic compare exchange operation

CmpxchgId

An identifier to a #name expression.

Const

*.const

ConstId

An identifier to a #name expression.

DataDrop

data.drop

DataDropId

An identifier to a #name expression.

Drop

drop

DropId

An identifier to a #name expression.

GlobalGet

global.get n

GlobalGetId

An identifier to a #name expression.

GlobalSet

global.set n

GlobalSetId

An identifier to a #name expression.

IfElse

if ... else ... end

IfElseId

An identifier to a #name expression.

Load

Loading a value from memory

LoadId

An identifier to a #name expression.

Local

A local variable or parameter.

LocalGet

local.get n

LocalGetId

An identifier to a #name expression.

LocalSet

local.set n

LocalSetId

An identifier to a #name expression.

LocalTee

local.tee n

LocalTeeId

An identifier to a #name 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 #name expression.

MemoryFill

memory.fill

MemoryFillId

An identifier to a #name expression.

MemoryGrow

memory.grow

MemoryGrowId

An identifier to a #name expression.

MemoryInit

memory.init

MemoryInitId

An identifier to a #name expression.

MemorySize

memory.size

MemorySizeId

An identifier to a #name expression.

RefIsNull

ref.is_null

RefIsNullId

An identifier to a #name expression.

RefNull

ref.null

RefNullId

An identifier to a #name expression.

Return

return

ReturnId

An identifier to a #name expression.

Select

select

SelectId

An identifier to a #name expression.

Store

Storing a value to memory

StoreId

An identifier to a #name expression.

TableGet

table.get

TableGetId

An identifier to a #name expression.

TableGrow

table.grow

TableGrowId

An identifier to a #name expression.

TableSet

table.set

TableSetId

An identifier to a #name expression.

TableSize

table.size

TableSizeId

An identifier to a #name expression.

Unop

Unary operations, those requiring one operand

UnopId

An identifier to a #name expression.

Unreachable

unreachable

UnreachableId

An identifier to a #name expression.

V128BitselectId

An identifier to a #name expression.

V128Bitselect

v128.bitselect

V128ShuffleId

An identifier to a #name expression.

V128Shuffle

v128.shuffle

WithSideEffects

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

WithSideEffectsId

An identifier to a #name 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

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