Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Avoid reloading
  • Loading branch information
dstogov committed Jul 24, 2019
1 parent b05f364 commit 6191df7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
6 changes: 4 additions & 2 deletions Zend/zend_vm_def.h
Expand Up @@ -1000,8 +1000,10 @@ ZEND_VM_COLD_CONST_HANDLER(13, ZEND_BW_NOT, CONST|TMPVAR|CV, ANY)
}

SAVE_OPLINE();
bitwise_not_function(EX_VAR(opline->result.var),
GET_OP1_ZVAL_PTR(BP_VAR_R));
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
op1 = ZVAL_UNDEFINED_OP1();
}
bitwise_not_function(EX_VAR(opline->result.var), op1);
FREE_OP1();
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
Expand Down
18 changes: 12 additions & 6 deletions Zend/zend_vm_execute.h
Expand Up @@ -3244,8 +3244,10 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_NOT_SPEC_CONST
}

SAVE_OPLINE();
bitwise_not_function(EX_VAR(opline->result.var),
RT_CONSTANT(opline, opline->op1));
if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
op1 = ZVAL_UNDEFINED_OP1();
}
bitwise_not_function(EX_VAR(opline->result.var), op1);

ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
Expand Down Expand Up @@ -13212,8 +13214,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_NOT_SPEC_TMPVAR_HANDLER(ZEN
}

SAVE_OPLINE();
bitwise_not_function(EX_VAR(opline->result.var),
_get_zval_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC));
if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
op1 = ZVAL_UNDEFINED_OP1();
}
bitwise_not_function(EX_VAR(opline->result.var), op1);
zval_ptr_dtor_nogc(free_op1);
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
Expand Down Expand Up @@ -36417,8 +36421,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_NOT_SPEC_CV_HANDLER(ZEND_OP
}

SAVE_OPLINE();
bitwise_not_function(EX_VAR(opline->result.var),
_get_zval_ptr_cv_BP_VAR_R(opline->op1.var EXECUTE_DATA_CC));
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
op1 = ZVAL_UNDEFINED_OP1();
}
bitwise_not_function(EX_VAR(opline->result.var), op1);

ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
Expand Down

0 comments on commit 6191df7

Please sign in to comment.