Lines Matching defs:inst

8319             struct instr *inst = &b->b_instr[i];
8321 assert(inst->i_opcode != EXTENDED_ARG);
8322 assert(inst->i_opcode != EXTENDED_ARG_QUICK);
8323 int oldoffset = inst->i_oparg;
8324 switch(inst->i_opcode) {
8334 inst->i_oparg = fixedmap[oldoffset];
8536 struct instr *inst,
8541 assert(inst[n].i_opcode == BUILD_TUPLE);
8542 assert(inst[n].i_oparg == n);
8545 if (!HAS_CONST(inst[i].i_opcode)) {
8556 int op = inst[i].i_opcode;
8557 int arg = inst[i].i_oparg;
8588 inst[i].i_opcode = NOP;
8590 inst[n].i_opcode = LOAD_CONST;
8591 inst[n].i_oparg = (int)index;
8781 // Attempt to eliminate jumps to jumps by updating inst to jump to
8785 jump_thread(struct instr *inst, struct instr *target, int opcode)
8788 assert(is_jump(inst));
8790 // bpo-45773: If inst->i_target == target->i_target, then nothing actually
8792 if (inst->i_lineno == target->i_lineno &&
8793 inst->i_target != target->i_target)
8795 inst->i_target = target->i_target;
8796 inst->i_opcode = opcode;
8814 struct instr *inst = &bb->b_instr[i];
8815 int oparg = inst->i_oparg;
8817 if (is_jump(inst) || is_block_push(inst)) {
8819 while (inst->i_target->b_iused == 0) {
8820 inst->i_target = inst->i_target->b_next;
8822 target = &inst->i_target->b_instr[0];
8828 assert(!IS_ASSEMBLER_OPCODE(inst->i_opcode));
8829 switch (inst->i_opcode) {
8839 cnt = get_const_value(inst->i_opcode, oparg, consts);
8848 inst->i_opcode = NOP;
8860 cnt = get_const_value(inst->i_opcode, oparg, consts);
8875 inst->i_opcode = NOP;
8880 cnt = get_const_value(inst->i_opcode, oparg, consts);
8887 inst->i_opcode = NOP;
8906 inst->i_opcode = NOP;
8911 inst->i_opcode = NOP;
8917 if (fold_tuple_on_constants(c, inst-oparg, oparg, consts)) {
8940 i -= jump_thread(inst, target, POP_JUMP_IF_FALSE);
8944 i -= jump_thread(inst, target, JUMP_IF_FALSE_OR_POP);
8948 if (inst->i_lineno == target->i_lineno) {
8951 assert(inst->i_target != inst->i_target->b_next);
8952 inst->i_opcode = POP_JUMP_IF_FALSE;
8953 inst->i_target = inst->i_target->b_next;
8962 i -= jump_thread(inst, target, POP_JUMP_IF_TRUE);
8966 i -= jump_thread(inst, target, JUMP_IF_TRUE_OR_POP);
8970 if (inst->i_lineno == target->i_lineno) {
8973 assert(inst->i_target != inst->i_target->b_next);
8974 inst->i_opcode = POP_JUMP_IF_TRUE;
8975 inst->i_target = inst->i_target->b_next;
8985 i -= jump_thread(inst, target, inst->i_opcode);
8991 i -= jump_thread(inst, target, POP_JUMP_IF_FALSE);
8997 i -= jump_thread(inst, target, POP_JUMP_IF_TRUE);
9003 i -= jump_thread(inst, target, JUMP);
9014 i -= jump_thread(inst, target, FOR_ITER);
9020 inst->i_opcode = NOP;
9031 if (nextop == LOAD_GLOBAL && (inst[1].i_opcode & 1) == 0) {
9032 inst->i_opcode = NOP;
9033 inst->i_oparg = 0;
9034 inst[1].i_oparg |= 1;
9039 assert (!HAS_CONST(inst->i_opcode));