summaryrefslogtreecommitdiff
path: root/Zend/zend_vm_gen.php
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-03-27 13:39:09 +0400
committerDmitry Stogov <dmitry@zend.com>2014-03-27 13:39:09 +0400
commitc6cba554544d9dc676d1cfa99447364c95768664 (patch)
treebce842d1abb17b69c78d918384428002d10ed934 /Zend/zend_vm_gen.php
parent54d559d893f07098e56bee4489d514726dc96f7d (diff)
downloadphp-git-c6cba554544d9dc676d1cfa99447364c95768664.tar.gz
Use ZVAL_DEREF() macro
Diffstat (limited to 'Zend/zend_vm_gen.php')
-rw-r--r--Zend/zend_vm_gen.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php
index 5dd5b94fa2..56a923b6a5 100644
--- a/Zend/zend_vm_gen.php
+++ b/Zend/zend_vm_gen.php
@@ -189,6 +189,24 @@ $op2_get_obj_zval_ptr = array(
"CV" => "_get_zval_ptr_cv_\\1(execute_data, opline->op2.var TSRMLS_CC)",
);
+$op1_get_obj_zval_ptr_deref = array(
+ "ANY" => "get_obj_zval_ptr(opline->op1_type, &opline->op1, execute_data, &free_op1, \\1)",
+ "TMP" => "_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC)",
+ "VAR" => "_get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1 TSRMLS_CC)",
+ "CONST" => "opline->op1.zv",
+ "UNUSED" => "_get_obj_zval_ptr_unused(TSRMLS_C)",
+ "CV" => "_get_zval_ptr_cv_deref_\\1(execute_data, opline->op1.var TSRMLS_CC)",
+);
+
+$op2_get_obj_zval_ptr_deref = array(
+ "ANY" => "get_obj_zval_ptr(opline->op2_type, &opline->op2, execute_data, &free_op2, \\1)",
+ "TMP" => "_get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC)",
+ "VAR" => "_get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2 TSRMLS_CC)",
+ "CONST" => "opline->op2.zv",
+ "UNUSED" => "_get_obj_zval_ptr_unused(TSRMLS_C)",
+ "CV" => "_get_zval_ptr_cv_deref_\\1(execute_data, opline->op2.var TSRMLS_CC)",
+);
+
$op1_get_obj_zval_ptr_ptr = array(
"ANY" => "get_obj_zval_ptr_ptr(opline->op1_type, &opline->op1, execute_data, &free_op1, \\1)",
"TMP" => "NULL",
@@ -331,6 +349,7 @@ function gen_code($f, $spec, $kind, $export, $code, $op1, $op2, $name) {
$op1_get_zval_ptr_deref, $op2_get_zval_ptr_deref,
$op1_get_zval_ptr_ptr, $op2_get_zval_ptr_ptr,
$op1_get_obj_zval_ptr, $op2_get_obj_zval_ptr,
+ $op1_get_obj_zval_ptr_deref, $op2_get_obj_zval_ptr_deref,
$op1_get_obj_zval_ptr_ptr, $op2_get_obj_zval_ptr_ptr,
$op1_is_tmp_free, $op2_is_tmp_free, $op1_free, $op2_free,
$op1_free_op, $op2_free_op, $op1_free_op_if_var, $op2_free_op_if_var,
@@ -352,6 +371,8 @@ function gen_code($f, $spec, $kind, $export, $code, $op1, $op2, $name) {
"/GET_OP2_ZVAL_PTR_PTR\(([^)]*)\)/",
"/GET_OP1_OBJ_ZVAL_PTR\(([^)]*)\)/",
"/GET_OP2_OBJ_ZVAL_PTR\(([^)]*)\)/",
+ "/GET_OP1_OBJ_ZVAL_PTR_DEREF\(([^)]*)\)/",
+ "/GET_OP2_OBJ_ZVAL_PTR_DEREF\(([^)]*)\)/",
"/GET_OP1_OBJ_ZVAL_PTR_PTR\(([^)]*)\)/",
"/GET_OP2_OBJ_ZVAL_PTR_PTR\(([^)]*)\)/",
"/IS_OP1_TMP_FREE\(\)/",
@@ -388,6 +409,8 @@ function gen_code($f, $spec, $kind, $export, $code, $op1, $op2, $name) {
$op2_get_zval_ptr_ptr[$op2],
$op1_get_obj_zval_ptr[$op1],
$op2_get_obj_zval_ptr[$op2],
+ $op1_get_obj_zval_ptr_deref[$op1],
+ $op2_get_obj_zval_ptr_deref[$op2],
$op1_get_obj_zval_ptr_ptr[$op1],
$op2_get_obj_zval_ptr_ptr[$op2],
$op1_is_tmp_free[$op1],