Skip to content

Commit 5369dab

Browse files
committed
save
1 parent e367145 commit 5369dab

File tree

1 file changed

+31
-92
lines changed

1 file changed

+31
-92
lines changed

crates/compiler-core/src/bytecode.rs

Lines changed: 31 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -676,101 +676,40 @@ pub type NameIdx = u32;
676676
#[repr(u8)]
677677
pub enum Instruction {
678678
// ==================== No-argument instructions (opcode < 44) ====================
679-
// 0: CACHE - placeholder for inline cache (not executed)
680-
Cache,
681-
// 1: BEFORE_ASYNC_WITH
682-
BeforeAsyncWith,
683-
// 2: BEFORE_WITH
684-
BeforeWith,
685-
// 3: Reserved (BINARY_OP_INPLACE_ADD_UNICODE in CPython)
686-
Reserved3,
687-
// 4: BINARY_SLICE - not implemented, placeholder
688-
BinarySlice,
689-
// 5: BINARY_SUBSCR
690-
BinarySubscript,
691-
// 6: CHECK_EG_MATCH
692-
CheckEgMatch,
693-
// 7: CHECK_EXC_MATCH
694-
CheckExcMatch,
695-
// 8: CLEANUP_THROW
696-
CleanupThrow,
697-
// 9: DELETE_SUBSCR
698-
DeleteSubscript,
699-
// 10: END_ASYNC_FOR
700-
EndAsyncFor,
701-
// 11: END_FOR - not implemented, placeholder
702-
EndFor,
703-
// 12: END_SEND
704-
EndSend,
705-
// 13: EXIT_INIT_CHECK - not implemented, placeholder
706-
ExitInitCheck,
707-
// 14: FORMAT_SIMPLE
708-
FormatSimple,
709-
// 15: FORMAT_WITH_SPEC
710-
FormatWithSpec,
711-
// 16: GET_AITER
712-
GetAIter,
713-
// 17: RESERVED
714-
Reserved17,
715-
// 18: GET_ANEXT
716-
GetANext,
717-
// 19: GET_ITER
718-
GetIter,
719-
// 20: GET_LEN
720-
GetLen,
721-
// 21: GET_YIELD_FROM_ITER - not implemented, placeholder
722-
GetYieldFromIter,
723-
// 22: INTERPRETER_EXIT - not implemented, placeholder
724-
InterpreterExit,
725-
// 23: LOAD_ASSERTION_ERROR - not implemented, placeholder
726-
LoadAssertionError,
727-
// 24: LOAD_BUILD_CLASS
728-
LoadBuildClass,
729-
// 25: LOAD_LOCALS - not implemented, placeholder
730-
LoadLocals,
731-
// 26: MAKE_FUNCTION
732-
MakeFunction,
733-
// 27: MATCH_KEYS
734-
MatchKeys,
735-
// 28: MATCH_MAPPING
736-
MatchMapping,
737-
// 29: MATCH_SEQUENCE
738-
MatchSequence,
739-
// 30: NOP
740-
Nop,
741-
// 31: POP_EXCEPT
742-
PopException,
743-
// 32: POP_TOP
744-
PopTop,
745-
// 33: PUSH_EXC_INFO
746-
PushExcInfo,
747-
// 34: PUSH_NULL - not implemented, placeholder
748-
PushNull,
749-
// 35: RETURN_GENERATOR - not implemented, placeholder
750-
ReturnGenerator,
751-
// 36: RETURN_VALUE
752-
ReturnValue,
753-
// 37: SETUP_ANNOTATIONS
754-
SetupAnnotation,
755-
// 38: STORE_SLICE - not implemented, placeholder
756-
StoreSlice,
757-
// 39: STORE_SUBSCR
758-
StoreSubscript,
759-
// 40: TO_BOOL
760-
ToBool,
761-
// 41: UNARY_INVERT
762-
UnaryInvert,
763-
// 42: UNARY_NEGATIVE
764-
UnaryNegative,
765-
// 43: UNARY_NOT
766-
UnaryNot,
679+
BeforeAsyncWith = 1,
680+
BeforeWith = 2,
681+
BinarySubscr = 5,
682+
CheckEgMatch = 6,
683+
CheckExcMatch = 7,
684+
CleanupThrow = 8,
685+
DeleteSubscr = 9,
686+
EndAsyncFor = 10,
687+
EndSend = 12,
688+
FormatSimple = 14,
689+
FormatWithSpec = 15,
690+
GetAIter = 16,
691+
Reserved = 17,
692+
GetANext = 18,
693+
GetIter = 19,
694+
GetLen = 20,
695+
LoadBuildClass = 24,
696+
MakeFunction = 26,
697+
MatchKeys = 27,
698+
MatchMapping = 28,
699+
MatchSequence = 29,
700+
Nop = 30,
701+
PopExcept = 31,
702+
PopTop = 32,
703+
PushExcInfo = 33,
704+
ReturnValue = 36,
705+
SetupAnnotations = 37,
706+
StoreSubscr = 39,
707+
ToBool = 40,
767708
// ==================== With-argument instructions (opcode >= 44) ====================
768-
// 44: WITH_EXCEPT_START
769-
WithExceptStart,
770-
// 45: BINARY_OP
709+
WithExceptStart = 44,
771710
BinaryOp {
772711
op: Arg<BinaryOperator>,
773-
},
712+
} = 45,
774713
// 46: BUILD_CONST_KEY_MAP - not implemented, placeholder
775714
BuildConstKeyMap {
776715
size: Arg<u32>,

0 commit comments

Comments
 (0)