Skip to content
Closed
Prev Previous commit
Next Next commit
Fix fmt_dis
  • Loading branch information
ShaharNaveh committed Nov 29, 2025
commit ef456a7338441c34e3fbf8e762bde066c5c5c72f
111 changes: 55 additions & 56 deletions crates/compiler-core/src/bytecode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1530,9 +1530,9 @@ impl Instruction {

match self {
Nop => w!(Nop),
ImportName { idx } => w!(ImportName, name = idx),
ImportName(idx) => w!(ImportName, name = idx),
ImportNameless => w!(ImportNameless),
ImportFrom { idx } => w!(ImportFrom, name = idx),
ImportFrom(idx) => w!(ImportFrom, name = idx),
LoadFast(idx) => w!(LoadFast, varname = idx),
LoadNameAny(idx) => w!(LoadNameAny, name = idx),
LoadGlobal(idx) => w!(LoadGlobal, name = idx),
Expand All @@ -1553,81 +1553,80 @@ impl Instruction {
Subscript => w!(Subscript),
StoreSubscript => w!(StoreSubscript),
DeleteSubscript => w!(DeleteSubscript),
StoreAttr { idx } => w!(StoreAttr, name = idx),
DeleteAttr { idx } => w!(DeleteAttr, name = idx),
LoadConst { idx } => fmt_const("LoadConst", arg, f, idx),
UnaryOperation { op } => w!(UnaryOperation, ?op),
BinaryOperation { op } => w!(BinaryOperation, ?op),
BinaryOperationInplace { op } => w!(BinaryOperationInplace, ?op),
StoreAttr(idx) => w!(StoreAttr, name = idx),
DeleteAttr(idx) => w!(DeleteAttr, name = idx),
LoadConst(idx) => fmt_const("LoadConst", arg, f, idx),
UnaryOperation(op) => w!(UnaryOperation, ?op),
BinaryOperation(op) => w!(BinaryOperation, ?op),
BinaryOperationInplace(op) => w!(BinaryOperationInplace, ?op),
BinarySubscript => w!(BinarySubscript),
LoadAttr { idx } => w!(LoadAttr, name = idx),
CompareOperation { op } => w!(CompareOperation, ?op),
CopyItem { index } => w!(CopyItem, index),
LoadAttr(idx) => w!(LoadAttr, name = idx),
CompareOperation(op) => w!(CompareOperation, ?op),
CopyItem(index) => w!(CopyItem, index),
Pop => w!(Pop),
Swap { index } => w!(Swap, index),
Swap(index) => w!(Swap, index),
ToBool => w!(ToBool),
GetIter => w!(GetIter),
// GET_LEN
GetLen => w!(GetLen),
CallIntrinsic1 { func } => w!(CallIntrinsic1, ?func),
CallIntrinsic2 { func } => w!(CallIntrinsic2, ?func),
Continue { target } => w!(Continue, target),
Break { target } => w!(Break, target),
Jump { target } => w!(Jump, target),
PopJumpIfTrue { target } => w!(PopJumpIfTrue, target),
PopJumpIfFalse { target } => w!(PopJumpIfFalse, target),
JumpIfTrueOrPop { target } => w!(JumpIfTrueOrPop, target),
JumpIfFalseOrPop { target } => w!(JumpIfFalseOrPop, target),
CallIntrinsic1(func) => w!(CallIntrinsic1, ?func),
CallIntrinsic2(func) => w!(CallIntrinsic2, ?func),
Continue(target) => w!(Continue, target),
Break(target) => w!(Break, target),
Jump(target) => w!(Jump, target),
PopJumpIfTrue(target) => w!(PopJumpIfTrue, target),
PopJumpIfFalse(target) => w!(PopJumpIfFalse, target),
JumpIfTrueOrPop(target) => w!(JumpIfTrueOrPop, target),
JumpIfFalseOrPop(target) => w!(JumpIfFalseOrPop, target),
MakeFunction => w!(MakeFunction),
SetFunctionAttribute { attr } => w!(SetFunctionAttribute, ?attr),
CallFunctionPositional { nargs } => w!(CallFunctionPositional, nargs),
CallFunctionKeyword { nargs } => w!(CallFunctionKeyword, nargs),
CallFunctionEx { has_kwargs } => w!(CallFunctionEx, has_kwargs),
LoadMethod { idx } => w!(LoadMethod, name = idx),
CallMethodPositional { nargs } => w!(CallMethodPositional, nargs),
CallMethodKeyword { nargs } => w!(CallMethodKeyword, nargs),
CallMethodEx { has_kwargs } => w!(CallMethodEx, has_kwargs),
ForIter { target } => w!(ForIter, target),
SetFunctionAttribute(attr) => w!(SetFunctionAttribute, ?attr),
CallFunctionPositional(nargs) => w!(CallFunctionPositional, nargs),
CallFunctionKeyword(nargs) => w!(CallFunctionKeyword, nargs),
CallFunctionEx(has_kwargs) => w!(CallFunctionEx, has_kwargs),
LoadMethod(idx) => w!(LoadMethod, name = idx),
CallMethodPositional(nargs) => w!(CallMethodPositional, nargs),
CallMethodKeyword(nargs) => w!(CallMethodKeyword, nargs),
CallMethodEx(has_kwargs) => w!(CallMethodEx, has_kwargs),
ForIter(target) => w!(ForIter, target),
ReturnValue => w!(ReturnValue),
ReturnConst { idx } => fmt_const("ReturnConst", arg, f, idx),
Resume { arg } => w!(Resume, arg),
ReturnConst(idx) => fmt_const("ReturnConst", arg, f, idx),
Resume(arg) => w!(Resume, arg),
YieldValue => w!(YieldValue),
YieldFrom => w!(YieldFrom),
SetupAnnotation => w!(SetupAnnotation),
SetupLoop => w!(SetupLoop),
SetupExcept { handler } => w!(SetupExcept, handler),
SetupFinally { handler } => w!(SetupFinally, handler),
SetupExcept(handler) => w!(SetupExcept, handler),
SetupFinally(handler) => w!(SetupFinally, handler),
EnterFinally => w!(EnterFinally),
EndFinally => w!(EndFinally),
SetupWith { end } => w!(SetupWith, end),
SetupWith(end) => w!(SetupWith, end),
WithCleanupStart => w!(WithCleanupStart),
WithCleanupFinish => w!(WithCleanupFinish),
BeforeAsyncWith => w!(BeforeAsyncWith),
SetupAsyncWith { end } => w!(SetupAsyncWith, end),
SetupAsyncWith(end) => w!(SetupAsyncWith, end),
PopBlock => w!(PopBlock),
Raise { kind } => w!(Raise, ?kind),
BuildString { size } => w!(BuildString, size),
BuildTuple { size } => w!(BuildTuple, size),
BuildTupleFromTuples { size } => w!(BuildTupleFromTuples, size),
Raise(kind) => w!(Raise, ?kind),
BuildString(size) => w!(BuildString, size),
BuildTuple(size) => w!(BuildTuple, size),
BuildTupleFromTuples(size) => w!(BuildTupleFromTuples, size),
BuildTupleFromIter => w!(BuildTupleFromIter),
BuildList { size } => w!(BuildList, size),
BuildListFromTuples { size } => w!(BuildListFromTuples, size),
BuildSet { size } => w!(BuildSet, size),
BuildSetFromTuples { size } => w!(BuildSetFromTuples, size),
BuildMap { size } => w!(BuildMap, size),
BuildMapForCall { size } => w!(BuildMapForCall, size),
DictUpdate { index } => w!(DictUpdate, index),
BuildSlice { step } => w!(BuildSlice, step),
ListAppend { i } => w!(ListAppend, i),
SetAdd { i } => w!(SetAdd, i),
MapAdd { i } => w!(MapAdd, i),
BuildList(size) => w!(BuildList, size),
BuildListFromTuples(size) => w!(BuildListFromTuples, size),
BuildSet(size) => w!(BuildSet, size),
BuildSetFromTuples(size) => w!(BuildSetFromTuples, size),
BuildMap(size) => w!(BuildMap, size),
BuildMapForCall(size) => w!(BuildMapForCall, size),
DictUpdate(index) => w!(DictUpdate, index),
BuildSlice(step) => w!(BuildSlice, step),
ListAppend(i) => w!(ListAppend, i),
SetAdd(i) => w!(SetAdd, i),
MapAdd(i) => w!(MapAdd, i),
PrintExpr => w!(PrintExpr),
LoadBuildClass => w!(LoadBuildClass),
UnpackSequence { size } => w!(UnpackSequence, size),
UnpackEx { args } => w!(UnpackEx, args),
FormatValue { conversion } => w!(FormatValue, ?conversion),
UnpackSequence(size) => w!(UnpackSequence, size),
UnpackEx(args) => w!(UnpackEx, args),
FormatValue(conversion) => w!(FormatValue, ?conversion),
PopException => w!(PopException),
Reverse { amount } => w!(Reverse, amount),
Reverse(amount) => w!(Reverse, amount),
GetAwaitable => w!(GetAwaitable),
GetAIter => w!(GetAIter),
GetANext => w!(GetANext),
Expand Down