mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
gh-105481: add pseudo-instructions to the bytecodes DSL (#105506)
This commit is contained in:
parent
20a56d8bec
commit
58f5227d7c
8 changed files with 507 additions and 267 deletions
|
@ -4,6 +4,7 @@
|
|||
#include "pycore_code.h" // write_location_entry_start()
|
||||
#include "pycore_compile.h"
|
||||
#include "pycore_opcode.h" // _PyOpcode_Caches[] and opcode category macros
|
||||
#include "opcode_metadata.h" // IS_PSEUDO_INSTR
|
||||
|
||||
|
||||
#define DEFAULT_CODE_SIZE 128
|
||||
|
@ -338,7 +339,8 @@ static void
|
|||
write_instr(_Py_CODEUNIT *codestr, instruction *instr, int ilen)
|
||||
{
|
||||
int opcode = instr->i_opcode;
|
||||
assert(!IS_PSEUDO_OPCODE(opcode));
|
||||
assert(IS_PSEUDO_OPCODE(opcode) == IS_PSEUDO_INSTR(opcode));
|
||||
assert(!IS_PSEUDO_INSTR(opcode));
|
||||
int oparg = instr->i_oparg;
|
||||
assert(HAS_ARG(opcode) || oparg == 0);
|
||||
int caches = _PyOpcode_Caches[opcode];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue