Browse Source

MFT: [1486-1491] [1496-1516], PHP 5.6 support

git-svn-id: svn://svn.lighttpd.net/xcache/branches/3.2@1515 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.2
Xuefer 7 years ago
parent
commit
36033d45c2
  1. 1
      ChangeLog
  2. 1
      NEWS
  3. 3
      devel/prepare.cfg.example
  4. 10
      devel/prepare.mak
  5. 8
      devel/sample.cpp.php
  6. 83
      lib/Decompiler.class.php
  7. 32
      mod_disassembler/xc_disassembler.c
  8. 3
      processor/head.m4
  9. 7
      processor/main.m4
  10. 83
      processor/processor.m4
  11. 6
      processor/struct.m4
  12. 6
      tests/xcache_deep_copy_arg_info.phpt
  13. 6
      tests/xcache_deep_copy_opcodes_for_const.phpt
  14. 6
      tests/xcache_deep_copy_static_variables.phpt
  15. 3
      tests/xcache_include_absolute.phpt
  16. 3
      tests/xcache_include_relative_cwd.phpt
  17. 3
      tests/xcache_include_relative_file.phpt
  18. 3
      tests/xcache_is_autoglobal.phpt
  19. 4
      tests/xcache_shallow_copy_check_early_binding.phpt
  20. 4
      tests/xcache_var.phpt
  21. 8
      xcache.c
  22. 9
      xcache/xc_compatibility.h
  23. 2
      xcache/xc_const_string.c
  24. 171
      xcache/xc_const_string_opcodes_php5.6.h
  25. 6
      xcache/xc_opcode_spec_def.h

1
ChangeLog

@ -2,6 +2,7 @@
ChangeLog
========
* cacher:
* PHP_5_6 support
* fixed #333: reduce memory usage for small or empty files
3.1.1 2014-09-02

1
NEWS

@ -1,5 +1,6 @@
3.2.1 2013-??-??
========
* PHP_5_6 support
* reduce memory usage for small or empty files
3.1.1 2014-09-02

3
devel/prepare.cfg.example

@ -5,9 +5,10 @@ PHP5_1_DIR=
PHP5_3_DIR=
PHP5_4_DIR=
PHP5_5_DIR=
PHP5_6_DIR=
PHP6_x_DIR=
PHP_DEVEL_DIR=
PHP_DEVEL_DIR=$(PHP5_6_DIR)
# path to eaccelerator source dir
EA_DIR=

10
devel/prepare.mak

@ -24,6 +24,7 @@ xc_const_string: \
xcache/xc_const_string_opcodes_php5.3.h \
xcache/xc_const_string_opcodes_php5.4.h \
xcache/xc_const_string_opcodes_php5.5.h \
xcache/xc_const_string_opcodes_php5.6.h \
xcache/xc_const_string_opcodes_php6.x.h
ifeq (${EA_DIR},)
@ -98,6 +99,15 @@ xcache/xc_const_string_opcodes_php5.5.h: ${PHP5_5_DIR}/Zend/zend_vm_def.h
mv "$@.tmp" "$@"
endif
ifeq (${PHP5_6_DIR},)
xcache/xc_const_string_opcodes_php5.6.h: dummy
@echo "Skipped $@: PHP_5_6_DIR not set"
else
xcache/xc_const_string_opcodes_php5.6.h: ${PHP5_6_DIR}/Zend/zend_vm_def.h
$(AWK) -f ./devel/gen_const_string_opcodes.awk < "$<" > "$@.tmp"
mv "$@.tmp" "$@"
endif
ifeq (${PHP6_x_DIR},)
xcache/xc_const_string_opcodes_php6.x.h: dummy
@echo "Skipped $@: PHP_6_x_DIR not set"

8
devel/sample.cpp.php

@ -44,6 +44,14 @@ abstract class ClassName
static public $static_const10 = array(CONST_VALUE => CONST_VALUE);
static public $static_const11 = array(self::CONST_VALUE => self::CONST_VALUE);
static public $static_const12 = array(ClassName::CONST_VALUE => ClassName::CONST_VALUE);
#if PHP_VERSION >= 560
static public $ast_binop = ClassName::CONST_VALUE + ClassName::CONST_VALUE;
static public $ast_and = ClassName::CONST_VALUE && 1;
static public $ast_or = ClassName::CONST_VALUE || 2;
static public $ast_select = ClassName::CONST_VALUE ? a : b;
static public $ast_unaryPlus = +ClassName::CONST_VALUE;
static public $ast_unaryMinus = -ClassName::CONST_VALUE;
#endif
/** doc */
static public $public_static = array(2, 'str');
/** doc */

83
lib/Decompiler.class.php

@ -87,8 +87,66 @@ function foldToCode($src, $indent = '') // {{{ wrap or rewrap anything to Decomp
return $src;
}
// }}}
function decompileAst($ast, $EX) // {{{
{
$kind = $ast['kind'];
$children = $ast['children'];
unset($ast['kind']);
unset($ast['children']);
switch ($kind) {
case ZEND_CONST:
return value($ast[0], $EX);
case XC_INIT_ARRAY:
$array = new Decompiler_Array();
for ($i = 0; $i < $children; $i += 2) {
if (isset($ast[$i + 1])) {
$key = decompileAst($ast[$i], $EX);
$value = decompileAst($ast[$i + 1], $EX);
$array->value[] = array($key, $value);
}
else {
$array->value[] = array(null, decompileAst($ast[$i], $EX));
}
}
return $array;
// ZEND_BOOL_AND: handled in binop
// ZEND_BOOL_OR: handled in binop
case ZEND_SELECT:
return new Decompiler_TriOp(
decompileAst($ast[0], $EX)
, decompileAst($ast[1], $EX)
, decompileAst($ast[2], $EX)
);
case ZEND_UNARY_PLUS:
return new Decompiler_Code('+' . str(decompileAst($ast[0], $EX)));
case ZEND_UNARY_MINUS:
return new Decompiler_Code('-' . str(decompileAst($ast[0], $EX)));
default:
$decompiler = $GLOBALS['__xcache_decompiler'];
if (isset($decompiler->binops[$kind])) {
return new Decompiler_Binop($decompiler
, decompileAst($ast[0], $EX)
, $kind
, decompileAst($ast[1], $EX)
);
}
return "un-handled kind $kind in zend_ast";
}
}
// }}}
function value($value, &$EX) // {{{
{
if (ZEND_ENGINE_2_6 && (xcache_get_type($value) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT_AST) {
return decompileAst(xcache_dasm_ast($value), $EX);
}
$originalValue = xcache_get_special_value($value);
if (isset($originalValue)) {
if ((xcache_get_type($value) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT) {
@ -591,6 +649,10 @@ class Decompiler
XC_JMPZ_EX => "&&",
XC_JMPNZ_EX => "||",
);
if (defined('IS_CONSTANT_AST')) {
$this->binops[ZEND_BOOL_AND] = '&&';
$this->binops[ZEND_BOOL_OR] = '||';
}
// }}}
$this->includeTypes = array( // {{{
ZEND_EVAL => 'eval',
@ -2796,7 +2858,9 @@ class Decompiler
}
// {{{ defines
define('ZEND_ENGINE_2_4', PHP_VERSION >= "5.4");
define('ZEND_ENGINE_2_6', PHP_VERSION >= "5.6");
define('ZEND_ENGINE_2_5', ZEND_ENGINE_2_6 || PHP_VERSION >= "5.5.");
define('ZEND_ENGINE_2_4', ZEND_ENGINE_2_5 || PHP_VERSION >= "5.4.");
define('ZEND_ENGINE_2_3', ZEND_ENGINE_2_4 || PHP_VERSION >= "5.3.");
define('ZEND_ENGINE_2_2', ZEND_ENGINE_2_3 || PHP_VERSION >= "5.2.");
define('ZEND_ENGINE_2_1', ZEND_ENGINE_2_2 || PHP_VERSION >= "5.1.");
@ -2925,7 +2989,13 @@ define('IS_OBJECT', 5);
define('IS_STRING', ZEND_ENGINE_2_1 ? 6 : 3);
define('IS_RESOURCE', 7);
define('IS_CONSTANT', 8);
define('IS_CONSTANT_ARRAY', 9);
if (ZEND_ENGINE_2_6) {
define('IS_CONSTANT_ARRAY', -1);
define('IS_CONSTANT_AST', 9);
}
else {
define('IS_CONSTANT_ARRAY', 9);
}
if (ZEND_ENGINE_2_4) {
define('IS_CALLABLE', 10);
}
@ -2936,6 +3006,15 @@ define('IS_CONSTANT_INDEX', 0x80);
define('IS_LEXICAL_VAR', 0x20);
define('IS_LEXICAL_REF', 0x40);
if (ZEND_ENGINE_2_6) {
define('ZEND_CONST', 256);
define('ZEND_BOOL_AND', 256 + 1);
define('ZEND_BOOL_OR', 256 + 2);
define('ZEND_SELECT', 256 + 3);
define('ZEND_UNARY_PLUS', 256 + 4);
define('ZEND_UNARY_MINUS', 256 + 5);
}
@define('XC_IS_CV', 16);
/*

32
mod_disassembler/xc_disassembler.c

@ -220,6 +220,35 @@ PHP_FUNCTION(xcache_dasm_string)
}
/* }}} */
#ifdef IS_CONSTANT_AST
/* {{{ proto array xcache_dasm_ast(mixed ast)
Disassemble zend_ast data into array */
#ifdef ZEND_BEGIN_ARG_INFO_EX
ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_dasm_ast, 0, 0, 1)
ZEND_ARG_INFO(0, ast)
ZEND_END_ARG_INFO()
#else
static unsigned char arginfo_xcache_dasm_ast[] = { 1, BYREF_NONE };
#endif
PHP_FUNCTION(xcache_dasm_ast)
{
zval *ast;
xc_dasm_t dasm;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &ast) == FAILURE) {
return;
}
if ((Z_TYPE_P(ast) & IS_CONSTANT_TYPE_MASK) != IS_CONSTANT_AST) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Data type is not zend_ast");
return;
}
array_init(return_value);
xc_dasm_zend_ast(&dasm, return_value, ast->value.ast TSRMLS_CC);
}
/* }}} */
#endif
/* {{{ PHP_MINFO_FUNCTION(xcache_disassembler) */
static PHP_MINFO_FUNCTION(xcache_disassembler)
{
@ -234,6 +263,9 @@ static zend_function_entry xcache_disassembler_functions[] = /* {{{ */
{
PHP_FE(xcache_dasm_file, NULL)
PHP_FE(xcache_dasm_string, NULL)
#ifdef IS_CONSTANT_AST
PHP_FE(xcache_dasm_ast, arginfo_xcache_dasm_ast)
#endif
PHP_FE_END
};
/* }}} */

3
processor/head.m4

@ -309,6 +309,9 @@ static void xc_fix_method(xc_processor_t *processor, zend_op_array *dst TSRMLS_D
#endif
#if defined(ZEND_ENGINE_2_2) || PHP_MAJOR_VERSION >= 6
SET_IF_SAME_NAME(__tostring);
#endif
#if defined(ZEND_ENGINE_2_6)
SET_IF_SAME_NAME(__debugInfo);
#endif
')
#ifdef IS_UNICODE

7
processor/main.m4

@ -27,7 +27,11 @@ dnl }}}
dnl {{{ ALLOC(1:dst, 2:type, 3:count=1, 4:clean=false, 5:realtype=$2)
define(`ALLOC', `
pushdef(`COUNT', `ifelse(`$3', `', `1', `$3')')
pushdef(`SIZE', `sizeof($2)ifelse(`$3', `', `', ` * $3')')
ifdef(`ALLOC_SIZE_HELPER', `
pushdef(`SIZE', `ALLOC_SIZE_HELPER()')
', `
pushdef(`SIZE', `sizeof($2)ifelse(`$3', `', `', ` * $3')')
')
pushdef(`REALTYPE', `ifelse(`$5', , `$2', `$5')')
/* allocate */
IFCALC(`
@ -254,6 +258,7 @@ EXPORT(`xc_funcinfo_t')
EXPORT(`xc_entry_var_t')
EXPORT(`xc_entry_php_t')
EXPORT(`xc_entry_data_php_t')
EXPORT(`zend_ast')
EXPORT(`zval')
include(srcdir`/processor/hashtable.m4')

83
processor/processor.m4

@ -69,6 +69,55 @@ DEF_HASH_TABLE_FUNC(`HashTable_zend_function', `zend_function')
#ifdef ZEND_ENGINE_2
DEF_HASH_TABLE_FUNC(`HashTable_zend_property_info', `zend_property_info')
#endif
#ifdef IS_CONSTANT_AST
define(`ZEND_AST_HELPER', `dnl {{{
{
IFCALCCOPY(`
size_t zend_ast_size = ($1->kind == ZEND_CONST)
? sizeof(zend_ast) + sizeof(zval)
: sizeof(zend_ast) + sizeof(zend_ast *) * ($1->children - 1);
')
pushdef(`ALLOC_SIZE_HELPER', `zend_ast_size')
$2
popdef(`ALLOC_SIZE_HELPER')
}
')
dnl }}}
DEF_STRUCT_P_FUNC(`zend_ast', , `dnl {{{
zend_ushort i;
PROCESS(zend_ushort, kind)
PROCESS(zend_ushort, children)
DONE(u)
DISABLECHECK(`
if (src->kind == ZEND_CONST) {
assert(src->u.val);
IFCOPY(`
dst->u.val = (zval *) (dst + 1);
memcpy(dst->u.val, src->u.val, sizeof(zval));
')
STRUCT_P_EX(zval, dst->u.val, src->u.val, `[]', `', ` ')
FIXPOINTER(zval, u.val)
}
else {
for (i = 0; i < src->children; ++i) {
zend_ast *src_ast = (&src->u.child)[i];
if (src_ast) {
ZEND_AST_HELPER(`src_ast', `
ALLOC(`(&dst->u.child)[i]', zend_ast)
STRUCT_P_EX(zend_ast, (&dst->u.child)[i], src_ast, `[]', `', ` ')
')
FIXPOINTER_EX(zend_ast, (&dst->u.child)[i])
}
else {
SETNULL_EX(`(&dst->u.child)[i]', `[]')
}
}
}
')
')
dnl }}}
#endif
DEF_STRUCT_P_FUNC(`zval', , `dnl {{{
IFDASM(`do {
zval_dtor(dst);
@ -125,10 +174,20 @@ proc_unicode:
#endif
case IS_ARRAY:
#ifdef IS_CONSTANT_ARRAY
case IS_CONSTANT_ARRAY:
#endif
assert(src->value.ht);
STRUCT_P(HashTable, value.ht, HashTable_zval_ptr)
break;
#ifdef IS_CONSTANT_AST
case IS_CONSTANT_AST:
assert(src->value.ast);
ZEND_AST_HELPER(`src->value.ast', `STRUCT_P(zend_ast, value.ast)')
break;
#endif
case IS_OBJECT:
IFNOTMEMCPY(`IFCOPY(`memcpy(dst, src, sizeof(src[0]));')')
dnl STRUCT(value.obj)
@ -237,9 +296,18 @@ DEF_STRUCT_P_FUNC(`zend_arg_info', , `dnl {{{
PROCESS(zend_uchar, type_hint)
#elif defined(ZEND_ENGINE_2_1)
PROCESS(zend_bool, array_type_hint)
#endif
#ifdef ZEND_ENGINE_2_6
PROCESS(zend_uchar, pass_by_reference)
#endif
PROCESS(zend_bool, allow_null)
#ifdef ZEND_ENGINE_2_6
PROCESS(zend_bool, is_variadic)
#else
PROCESS(zend_bool, pass_by_reference)
#endif
#ifndef ZEND_ENGINE_2_4
PROCESS(zend_bool, return_reference)
PROCESS(int, required_num_args)
@ -481,14 +549,17 @@ DEF_STRUCT_P_FUNC(`zend_class_entry', , `dnl {{{
# ifdef ZEND_ENGINE_2_1
COPY(__unset)
COPY(__isset)
# if defined(ZEND_ENGINE_2_2) || PHP_MAJOR_VERSION >= 6
COPY(__tostring)
# endif
# endif
COPY(__call)
# ifdef ZEND_CALLSTATIC_FUNC_NAME
COPY(__callstatic)
# endif
# if defined(ZEND_ENGINE_2_2) || PHP_MAJOR_VERSION >= 6
COPY(__tostring)
# endif
# if defined(ZEND_ENGINE_2_6)
COPY(__debugInfo)
# endif
# ifndef ZEND_ENGINE_2_4
/* # NOT DONE */
COPY(module)
@ -533,9 +604,9 @@ define(`UNION_znode_op', `dnl {{{
', `
IFDASM(`{
zval *zv;
ALLOC_INIT_ZVAL(zv);
*zv = dasm->active_op_array_src->literals[SRC(`$1.constant')].constant;
zval_copy_ctor(zv);
zval *srczv = &dasm->active_op_array_src->literals[SRC(`$1.constant')].constant;
ALLOC_ZVAL(zv);
MAKE_COPY_ZVAL(&srczv, zv);
add_assoc_zval_ex(dst, XCACHE_STRS("$1.constant"), zv);
}
', `

6
processor/struct.m4

@ -150,7 +150,11 @@ ifdef(`DASM_STRUCT_DIRECT', `', `
);
ifdef(`DASM_STRUCT_DIRECT', `', `
IFDASM(`
add_assoc_zval_ex(dst, XCACHE_STRS("$4"), zv);
ifelse(`$4', `[]', `
add_next_index_zval(dst, zv);
', `
add_assoc_zval_ex(dst, XCACHE_STRS("$4"), zv);
')
} while (0);
')
')

6
tests/xcache_deep_copy_arg_info.phpt

@ -1,7 +1,13 @@
--TEST--
xcache requires deep copying arg info
--SKIPIF--
<?php
require("include-skipif.inc");
?>
--INI--
xcache.readonly_protection=0
xcache.test = 1
xcache.size = 32M
--FILE--
<?php
function a($a = 1) {

6
tests/xcache_deep_copy_opcodes_for_const.phpt

@ -1,6 +1,12 @@
--TEST--
xcache requires deep copying opcodes for __FILE__ and __DIR__
--SKIPIF--
<?php
require("include-skipif.inc");
?>
--INI--
xcache.test = 1
xcache.size = 32M
--FILE--
<?php
echo __FILE__, PHP_EOL;

6
tests/xcache_deep_copy_static_variables.phpt

@ -1,7 +1,13 @@
--TEST--
xcache requires deep copying static variables in shallow copy mode
--SKIPIF--
<?php
require("include-skipif.inc");
?>
--INI--
xcache.readonly_protection=0
xcache.test = 1
xcache.size = 32M
--FILE--
<?php
static $a = array(1);

3
tests/xcache_include_absolute.phpt

@ -4,6 +4,9 @@ include absolute path
<?php
require("include-skipif.inc");
?>
--INI--
xcache.test = 1
xcache.size = 32M
--FILE--
<?php
include __DIR__ . "/sub-a.inc";

3
tests/xcache_include_relative_cwd.phpt

@ -4,6 +4,9 @@ include relative to current working dir
<?php
require("include-skipif.inc");
?>
--INI--
xcache.test = 1
xcache.size = 32M
--FILE--
<?php
chdir(__DIR__);

3
tests/xcache_include_relative_file.phpt

@ -4,6 +4,9 @@ include relative to current file
<?php
require("include-skipif.inc");
?>
--INI--
xcache.test = 1
xcache.size = 32M
--FILE--
<?php
include "sub-a.inc";

3
tests/xcache_is_autoglobal.phpt

@ -4,6 +4,9 @@ xcache_is_autoglobal
<?php
require("skipif.inc");
?>
--INI--
xcache.test = 1
xcache.size = 32M
--FILE--
<?php
var_dump(xcache_is_autoglobal("GLOBALS"));

4
tests/xcache_shallow_copy_check_early_binding.phpt

@ -2,10 +2,14 @@
xcache shallow copying precondition: early binding changes constant inside opcode for PHP5.2-
--SKIPIF--
<?php
require("include-skipif.inc");
if (version_compare(PHP_VERSION, "5.3", ">=")) {
die("skip only needed for PHP 5.2 or less");
}
?>
--INI--
xcache.test = 1
xcache.size = 32M
--FILE--
<?php
class A extends Exception {

4
tests/xcache_var.phpt

@ -4,6 +4,10 @@ xcache_set/get test
<?php
require("skipif.inc");
?>
--INI--
xcache.test = 1
xcache.size = 32M
xcache.var_size = 2M
--FILE--
<?php
var_dump(xcache_isset("a"));

8
xcache.c

@ -343,11 +343,19 @@ PHP_FUNCTION(xcache_get_special_value)
return_value->type = UNISW(IS_STRING, UG(unicode) ? IS_UNICODE : IS_STRING);
break;
#ifdef IS_CONSTANT_ARRAY
case IS_CONSTANT_ARRAY:
*return_value = *value;
zval_copy_ctor(return_value);
return_value->type = IS_ARRAY;
break;
#endif
#ifdef IS_CONSTANT_AST
case IS_CONSTANT_AST:
RETURN_NULL();
break;
#endif
default:
if ((Z_TYPE_P(value) & ~IS_CONSTANT_TYPE_MASK)) {

9
xcache/xc_compatibility.h

@ -10,7 +10,10 @@
/* Purpose: Privode stuffs for compatibility with different PHP version
*/
#if !defined(ZEND_ENGINE_2_5) && (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 5 || PHP_MAJOR_VERSION > 6)
#if !defined(ZEND_ENGINE_2_6) && (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 6 || PHP_MAJOR_VERSION > 6)
# define ZEND_ENGINE_2_6
#endif
#if !defined(ZEND_ENGINE_2_5) && (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION == 5 || defined(ZEND_ENGINE_2_6))
# define ZEND_ENGINE_2_5
#endif
#if !defined(ZEND_ENGINE_2_4) && (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION == 4 || defined(ZEND_ENGINE_2_5))
@ -95,6 +98,10 @@ static inline void xc_add_assoc_null_ex(zval *arg, char *key, uint key_len)
#endif
/* }}} */
#ifndef ZEND_ENGINE_2_6
typedef void zend_ast;
#endif
#ifdef ZEND_ENGINE_2_4
# define Z_OP(op) (op)
# define Z_OP_CONSTANT(op) (op).literal->constant

2
xcache/xc_const_string.c

@ -71,6 +71,8 @@ const char *xc_get_data_type(zend_uchar data_type)
/* {{{ xc_get_opcode */
#if PHP_MAJOR_VERSION >= 6
# include "xc_const_string_opcodes_php6.x.h"
#elif defined(ZEND_ENGINE_2_6)
# include "xc_const_string_opcodes_php5.6.h"
#elif defined(ZEND_ENGINE_2_5)
# include "xc_const_string_opcodes_php5.5.h"
#elif defined(ZEND_ENGINE_2_4)

171
xcache/xc_const_string_opcodes_php5.6.h

@ -0,0 +1,171 @@
/* size = 168 */
static const char *const xc_opcode_names[] = {
/* 0 */ "NOP",
/* 1 */ "ADD",
/* 2 */ "SUB",
/* 3 */ "MUL",
/* 4 */ "DIV",
/* 5 */ "MOD",
/* 6 */ "SL",
/* 7 */ "SR",
/* 8 */ "CONCAT",
/* 9 */ "BW_OR",
/* 10 */ "BW_AND",
/* 11 */ "BW_XOR",
/* 12 */ "BW_NOT",
/* 13 */ "BOOL_NOT",
/* 14 */ "BOOL_XOR",
/* 15 */ "IS_IDENTICAL",
/* 16 */ "IS_NOT_IDENTICAL",
/* 17 */ "IS_EQUAL",
/* 18 */ "IS_NOT_EQUAL",
/* 19 */ "IS_SMALLER",
/* 20 */ "IS_SMALLER_OR_EQUAL",
/* 21 */ "CAST",
/* 22 */ "QM_ASSIGN",
/* 23 */ "ASSIGN_ADD",
/* 24 */ "ASSIGN_SUB",
/* 25 */ "ASSIGN_MUL",
/* 26 */ "ASSIGN_DIV",
/* 27 */ "ASSIGN_MOD",
/* 28 */ "ASSIGN_SL",
/* 29 */ "ASSIGN_SR",
/* 30 */ "ASSIGN_CONCAT",
/* 31 */ "ASSIGN_BW_OR",
/* 32 */ "ASSIGN_BW_AND",
/* 33 */ "ASSIGN_BW_XOR",
/* 34 */ "PRE_INC",
/* 35 */ "PRE_DEC",
/* 36 */ "POST_INC",
/* 37 */ "POST_DEC",
/* 38 */ "ASSIGN",
/* 39 */ "ASSIGN_REF",
/* 40 */ "ECHO",
/* 41 */ "PRINT",
/* 42 */ "JMP",
/* 43 */ "JMPZ",
/* 44 */ "JMPNZ",
/* 45 */ "JMPZNZ",
/* 46 */ "JMPZ_EX",
/* 47 */ "JMPNZ_EX",
/* 48 */ "CASE",
/* 49 */ "SWITCH_FREE",
/* 50 */ "BRK",
/* 51 */ "CONT",
/* 52 */ "BOOL",
/* 53 */ "INIT_STRING",
/* 54 */ "ADD_CHAR",
/* 55 */ "ADD_STRING",
/* 56 */ "ADD_VAR",
/* 57 */ "BEGIN_SILENCE",
/* 58 */ "END_SILENCE",
/* 59 */ "INIT_FCALL_BY_NAME",
/* 60 */ "DO_FCALL",
/* 61 */ "DO_FCALL_BY_NAME",
/* 62 */ "RETURN",
/* 63 */ "RECV",
/* 64 */ "RECV_INIT",
/* 65 */ "SEND_VAL",
/* 66 */ "SEND_VAR",
/* 67 */ "SEND_REF",
/* 68 */ "NEW",
/* 69 */ "INIT_NS_FCALL_BY_NAME",
/* 70 */ "FREE",
/* 71 */ "INIT_ARRAY",
/* 72 */ "ADD_ARRAY_ELEMENT",
/* 73 */ "INCLUDE_OR_EVAL",
/* 74 */ "UNSET_VAR",
/* 75 */ "UNSET_DIM",
/* 76 */ "UNSET_OBJ",
/* 77 */ "FE_RESET",
/* 78 */ "FE_FETCH",
/* 79 */ "EXIT",
/* 80 */ "FETCH_R",
/* 81 */ "FETCH_DIM_R",
/* 82 */ "FETCH_OBJ_R",
/* 83 */ "FETCH_W",
/* 84 */ "FETCH_DIM_W",
/* 85 */ "FETCH_OBJ_W",
/* 86 */ "FETCH_RW",
/* 87 */ "FETCH_DIM_RW",
/* 88 */ "FETCH_OBJ_RW",
/* 89 */ "FETCH_IS",
/* 90 */ "FETCH_DIM_IS",
/* 91 */ "FETCH_OBJ_IS",
/* 92 */ "FETCH_FUNC_ARG",
/* 93 */ "FETCH_DIM_FUNC_ARG",
/* 94 */ "FETCH_OBJ_FUNC_ARG",
/* 95 */ "FETCH_UNSET",
/* 96 */ "FETCH_DIM_UNSET",
/* 97 */ "FETCH_OBJ_UNSET",
/* 98 */ "FETCH_DIM_TMP_VAR",
/* 99 */ "FETCH_CONSTANT",
/* 100 */ "GOTO",
/* 101 */ "EXT_STMT",
/* 102 */ "EXT_FCALL_BEGIN",
/* 103 */ "EXT_FCALL_END",
/* 104 */ "EXT_NOP",
/* 105 */ "TICKS",
/* 106 */ "SEND_VAR_NO_REF",
/* 107 */ "CATCH",
/* 108 */ "THROW",
/* 109 */ "FETCH_CLASS",
/* 110 */ "CLONE",
/* 111 */ "RETURN_BY_REF",
/* 112 */ "INIT_METHOD_CALL",
/* 113 */ "INIT_STATIC_METHOD_CALL",
/* 114 */ "ISSET_ISEMPTY_VAR",
/* 115 */ "ISSET_ISEMPTY_DIM_OBJ",
/* 116 */ "UNDEF",
/* 117 */ "UNDEF",
/* 118 */ "UNDEF",
/* 119 */ "UNDEF",
/* 120 */ "UNDEF",
/* 121 */ "UNDEF",
/* 122 */ "UNDEF",
/* 123 */ "UNDEF",
/* 124 */ "UNDEF",
/* 125 */ "UNDEF",
/* 126 */ "UNDEF",
/* 127 */ "UNDEF",
/* 128 */ "UNDEF",
/* 129 */ "UNDEF",
/* 130 */ "UNDEF",
/* 131 */ "UNDEF",
/* 132 */ "PRE_INC_OBJ",
/* 133 */ "PRE_DEC_OBJ",
/* 134 */ "POST_INC_OBJ",
/* 135 */ "POST_DEC_OBJ",
/* 136 */ "ASSIGN_OBJ",
/* 137 */ "OP_DATA",
/* 138 */ "INSTANCEOF",
/* 139 */ "DECLARE_CLASS",
/* 140 */ "DECLARE_INHERITED_CLASS",
/* 141 */ "DECLARE_FUNCTION",
/* 142 */ "RAISE_ABSTRACT_ERROR",
/* 143 */ "DECLARE_CONST",
/* 144 */ "ADD_INTERFACE",
/* 145 */ "DECLARE_INHERITED_CLASS_DELAYED",
/* 146 */ "VERIFY_ABSTRACT_CLASS",
/* 147 */ "ASSIGN_DIM",
/* 148 */ "ISSET_ISEMPTY_PROP_OBJ",
/* 149 */ "HANDLE_EXCEPTION",
/* 150 */ "USER_OPCODE",
/* 151 */ "UNDEF",
/* 152 */ "JMP_SET",
/* 153 */ "DECLARE_LAMBDA_FUNCTION",
/* 154 */ "ADD_TRAIT",
/* 155 */ "BIND_TRAITS",
/* 156 */ "SEPARATE",
/* 157 */ "QM_ASSIGN_VAR",
/* 158 */ "JMP_SET_VAR",
/* 159 */ "DISCARD_EXCEPTION",
/* 160 */ "YIELD",
/* 161 */ "GENERATOR_RETURN",
/* 162 */ "FAST_CALL",
/* 163 */ "FAST_RET",
/* 164 */ "RECV_VARIADIC",
/* 165 */ "SEND_UNPACK",
/* 166 */ "POW",
/* 167 */ "ASSIGN_POW"
};

6
xcache/xc_opcode_spec_def.h

@ -300,4 +300,10 @@ static const xc_opcode_spec_t xc_opcode_spec[] = {
OPSPEC( UNUSED, JMPADDR, UNUSED, UNUSED) /* 162 FAST_CALL */
OPSPEC( UNUSED, UNUSED, UNUSED, UNUSED) /* 163 FAST_RET */
#endif
#ifdef ZEND_ENGINE_2_6
OPSPEC( UNUSED, ARG, UNUSED, VAR) /* 164 RECV_VARIADIC */
OPSPEC( SEND, STD, ARG, UNUSED) /* 165 SEND_UNPACK */
OPSPEC( UNUSED, STD, STD, TMP) /* 166 POW */
OPSPEC( ASSIGN, STD, STD, VAR) /* 167 ASSIGN_POW */
#endif
};

Loading…
Cancel
Save