mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 23:52:31 +00:00
e5bc5873d7
closes #437
113 lines
2.0 KiB
Zig
113 lines
2.0 KiB
Zig
const Scope = @import("scope.zig").Scope;
|
|
|
|
pub const Instruction = struct {
|
|
id: Id,
|
|
scope: &Scope,
|
|
|
|
pub const Id = enum {
|
|
Br,
|
|
CondBr,
|
|
SwitchBr,
|
|
SwitchVar,
|
|
SwitchTarget,
|
|
Phi,
|
|
UnOp,
|
|
BinOp,
|
|
DeclVar,
|
|
LoadPtr,
|
|
StorePtr,
|
|
FieldPtr,
|
|
StructFieldPtr,
|
|
UnionFieldPtr,
|
|
ElemPtr,
|
|
VarPtr,
|
|
Call,
|
|
Const,
|
|
Return,
|
|
Cast,
|
|
ContainerInitList,
|
|
ContainerInitFields,
|
|
StructInit,
|
|
UnionInit,
|
|
Unreachable,
|
|
TypeOf,
|
|
ToPtrType,
|
|
PtrTypeChild,
|
|
SetRuntimeSafety,
|
|
SetFloatMode,
|
|
ArrayType,
|
|
SliceType,
|
|
Asm,
|
|
SizeOf,
|
|
TestNonNull,
|
|
UnwrapMaybe,
|
|
MaybeWrap,
|
|
UnionTag,
|
|
Clz,
|
|
Ctz,
|
|
Import,
|
|
CImport,
|
|
CInclude,
|
|
CDefine,
|
|
CUndef,
|
|
ArrayLen,
|
|
Ref,
|
|
MinValue,
|
|
MaxValue,
|
|
CompileErr,
|
|
CompileLog,
|
|
ErrName,
|
|
EmbedFile,
|
|
Cmpxchg,
|
|
Fence,
|
|
Truncate,
|
|
IntType,
|
|
BoolNot,
|
|
Memset,
|
|
Memcpy,
|
|
Slice,
|
|
MemberCount,
|
|
MemberType,
|
|
MemberName,
|
|
Breakpoint,
|
|
ReturnAddress,
|
|
FrameAddress,
|
|
AlignOf,
|
|
OverflowOp,
|
|
TestErr,
|
|
UnwrapErrCode,
|
|
UnwrapErrPayload,
|
|
ErrWrapCode,
|
|
ErrWrapPayload,
|
|
FnProto,
|
|
TestComptime,
|
|
PtrCast,
|
|
BitCast,
|
|
WidenOrShorten,
|
|
IntToPtr,
|
|
PtrToInt,
|
|
IntToEnum,
|
|
IntToErr,
|
|
ErrToInt,
|
|
CheckSwitchProngs,
|
|
CheckStatementIsVoid,
|
|
TypeName,
|
|
CanImplicitCast,
|
|
DeclRef,
|
|
Panic,
|
|
TagName,
|
|
TagType,
|
|
FieldParentPtr,
|
|
OffsetOf,
|
|
TypeId,
|
|
SetEvalBranchQuota,
|
|
PtrTypeOf,
|
|
AlignCast,
|
|
OpaqueType,
|
|
SetAlignStack,
|
|
ArgType,
|
|
Export,
|
|
};
|
|
|
|
};
|