From a7c50ccc67912c65fe1b56e64d60a5521657e66f Mon Sep 17 00:00:00 2001 From: Boris Lytochkin Date: Fri, 20 Dec 2013 00:51:59 +0400 Subject: keep 'em sorted --- NEWS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 9ad1253bf5..75c39ee980 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,9 @@ PHP NEWS . Fixed bug #64405 (Use freetype-config for determining freetype2 dir(s)). (Adam) +- SNMP: + . Fixed SNMP_ERR_TOOBIG handling for bulk walk operations. (Boris Lytochkin) + - XSL . Fixed bug #49634 (Segfault throwing an exception in a XSL registered function). (Mike) @@ -34,9 +37,6 @@ PHP NEWS - ZIP: . Fixed Bug #66321 (ZipArchive::open() ze_obj->filename_len not real). (Remi) -- SNMP: - . Fixed SNMP_ERR_TOOBIG handling for bulk walk operations (Boris Lytochkin) - 12 Dec 2013, PHP 5.4.23 - Core: -- cgit v1.2.1 From 50d50c2f047dde3c2e3bf48490a1aa230e71ba16 Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Sat, 21 Dec 2013 19:22:47 +0100 Subject: Added an opcode to opcode name map That way extensions etc. don't have to maintain their own lists anymore. Also as phpdbg is included and needs such a map, it'd be counterproductive to need to change two things on every new opcode. --- Zend/zend_vm_gen.php | 10 +++ Zend/zend_vm_opcodes.h | 167 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 177 insertions(+) diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php index 37deae8657..2f7c3cfd42 100644 --- a/Zend/zend_vm_gen.php +++ b/Zend/zend_vm_gen.php @@ -1201,11 +1201,21 @@ function gen_vm($def, $skel) { // Insert header out($f, $GLOBALS['header_text']); + fputs($f, "#ifndef ZEND_VM_OPCODES_H\n#define ZEND_VM_OPCODES_H\n\n"); + foreach ($opcodes as $code => $dsc) { $code = str_pad((string)$code,$code_len," ",STR_PAD_LEFT); $op = str_pad($dsc["op"],$max_opcode_len); fputs($f,"#define $op $code\n"); } + + fputs($f,"\nconst char *zend_vm_opcodes_map[] = {\n"); + for ($i = 0; $i <= $max_opcode; $i++) { + fputs($f,"\t".(isset($opcodes[$i]["op"])?'"'.$opcodes[$i]["op"].'"':"NULL").",\n"); + } + fputs($f, "};\n"); + + fputs($f, "\n#endif"); fclose($f); echo "zend_vm_opcodes.h generated successfully.\n"; diff --git a/Zend/zend_vm_opcodes.h b/Zend/zend_vm_opcodes.h index 94e69abf1e..e0bc2f5bf6 100644 --- a/Zend/zend_vm_opcodes.h +++ b/Zend/zend_vm_opcodes.h @@ -18,6 +18,9 @@ +----------------------------------------------------------------------+ */ +#ifndef ZEND_VM_OPCODES_H +#define ZEND_VM_OPCODES_H + #define ZEND_NOP 0 #define ZEND_ADD 1 #define ZEND_SUB 2 @@ -159,3 +162,167 @@ #define ZEND_SEPARATE 156 #define ZEND_QM_ASSIGN_VAR 157 #define ZEND_JMP_SET_VAR 158 + +const char *zend_vm_opcodes_map[] = { + "ZEND_NOP", + "ZEND_ADD", + "ZEND_SUB", + "ZEND_MUL", + "ZEND_DIV", + "ZEND_MOD", + "ZEND_SL", + "ZEND_SR", + "ZEND_CONCAT", + "ZEND_BW_OR", + "ZEND_BW_AND", + "ZEND_BW_XOR", + "ZEND_BW_NOT", + "ZEND_BOOL_NOT", + "ZEND_BOOL_XOR", + "ZEND_IS_IDENTICAL", + "ZEND_IS_NOT_IDENTICAL", + "ZEND_IS_EQUAL", + "ZEND_IS_NOT_EQUAL", + "ZEND_IS_SMALLER", + "ZEND_IS_SMALLER_OR_EQUAL", + "ZEND_CAST", + "ZEND_QM_ASSIGN", + "ZEND_ASSIGN_ADD", + "ZEND_ASSIGN_SUB", + "ZEND_ASSIGN_MUL", + "ZEND_ASSIGN_DIV", + "ZEND_ASSIGN_MOD", + "ZEND_ASSIGN_SL", + "ZEND_ASSIGN_SR", + "ZEND_ASSIGN_CONCAT", + "ZEND_ASSIGN_BW_OR", + "ZEND_ASSIGN_BW_AND", + "ZEND_ASSIGN_BW_XOR", + "ZEND_PRE_INC", + "ZEND_PRE_DEC", + "ZEND_POST_INC", + "ZEND_POST_DEC", + "ZEND_ASSIGN", + "ZEND_ASSIGN_REF", + "ZEND_ECHO", + "ZEND_PRINT", + "ZEND_JMP", + "ZEND_JMPZ", + "ZEND_JMPNZ", + "ZEND_JMPZNZ", + "ZEND_JMPZ_EX", + "ZEND_JMPNZ_EX", + "ZEND_CASE", + "ZEND_SWITCH_FREE", + "ZEND_BRK", + "ZEND_CONT", + "ZEND_BOOL", + "ZEND_INIT_STRING", + "ZEND_ADD_CHAR", + "ZEND_ADD_STRING", + "ZEND_ADD_VAR", + "ZEND_BEGIN_SILENCE", + "ZEND_END_SILENCE", + "ZEND_INIT_FCALL_BY_NAME", + "ZEND_DO_FCALL", + "ZEND_DO_FCALL_BY_NAME", + "ZEND_RETURN", + "ZEND_RECV", + "ZEND_RECV_INIT", + "ZEND_SEND_VAL", + "ZEND_SEND_VAR", + "ZEND_SEND_REF", + "ZEND_NEW", + "ZEND_INIT_NS_FCALL_BY_NAME", + "ZEND_FREE", + "ZEND_INIT_ARRAY", + "ZEND_ADD_ARRAY_ELEMENT", + "ZEND_INCLUDE_OR_EVAL", + "ZEND_UNSET_VAR", + "ZEND_UNSET_DIM", + "ZEND_UNSET_OBJ", + "ZEND_FE_RESET", + "ZEND_FE_FETCH", + "ZEND_EXIT", + "ZEND_FETCH_R", + "ZEND_FETCH_DIM_R", + "ZEND_FETCH_OBJ_R", + "ZEND_FETCH_W", + "ZEND_FETCH_DIM_W", + "ZEND_FETCH_OBJ_W", + "ZEND_FETCH_RW", + "ZEND_FETCH_DIM_RW", + "ZEND_FETCH_OBJ_RW", + "ZEND_FETCH_IS", + "ZEND_FETCH_DIM_IS", + "ZEND_FETCH_OBJ_IS", + "ZEND_FETCH_FUNC_ARG", + "ZEND_FETCH_DIM_FUNC_ARG", + "ZEND_FETCH_OBJ_FUNC_ARG", + "ZEND_FETCH_UNSET", + "ZEND_FETCH_DIM_UNSET", + "ZEND_FETCH_OBJ_UNSET", + "ZEND_FETCH_DIM_TMP_VAR", + "ZEND_FETCH_CONSTANT", + "ZEND_GOTO", + "ZEND_EXT_STMT", + "ZEND_EXT_FCALL_BEGIN", + "ZEND_EXT_FCALL_END", + "ZEND_EXT_NOP", + "ZEND_TICKS", + "ZEND_SEND_VAR_NO_REF", + "ZEND_CATCH", + "ZEND_THROW", + "ZEND_FETCH_CLASS", + "ZEND_CLONE", + "ZEND_RETURN_BY_REF", + "ZEND_INIT_METHOD_CALL", + "ZEND_INIT_STATIC_METHOD_CALL", + "ZEND_ISSET_ISEMPTY_VAR", + "ZEND_ISSET_ISEMPTY_DIM_OBJ", + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + "ZEND_PRE_INC_OBJ", + "ZEND_PRE_DEC_OBJ", + "ZEND_POST_INC_OBJ", + "ZEND_POST_DEC_OBJ", + "ZEND_ASSIGN_OBJ", + NULL, + "ZEND_INSTANCEOF", + "ZEND_DECLARE_CLASS", + "ZEND_DECLARE_INHERITED_CLASS", + "ZEND_DECLARE_FUNCTION", + "ZEND_RAISE_ABSTRACT_ERROR", + "ZEND_DECLARE_CONST", + "ZEND_ADD_INTERFACE", + "ZEND_DECLARE_INHERITED_CLASS_DELAYED", + "ZEND_VERIFY_ABSTRACT_CLASS", + "ZEND_ASSIGN_DIM", + "ZEND_ISSET_ISEMPTY_PROP_OBJ", + "ZEND_HANDLE_EXCEPTION", + "ZEND_USER_OPCODE", + NULL, + "ZEND_JMP_SET", + "ZEND_DECLARE_LAMBDA_FUNCTION", + "ZEND_ADD_TRAIT", + "ZEND_BIND_TRAITS", + "ZEND_SEPARATE", + "ZEND_QM_ASSIGN_VAR", + "ZEND_JMP_SET_VAR", +}; + +#endif \ No newline at end of file -- cgit v1.2.1 From 7894e397d83a1ecaddd06732171d5bf28c2265fb Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Sat, 21 Dec 2013 21:29:08 +0100 Subject: Fixed build... --- Zend/zend_vm_gen.php | 2 +- Zend/zend_vm_opcodes.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php index 2f7c3cfd42..87a9b3c48e 100644 --- a/Zend/zend_vm_gen.php +++ b/Zend/zend_vm_gen.php @@ -1209,7 +1209,7 @@ function gen_vm($def, $skel) { fputs($f,"#define $op $code\n"); } - fputs($f,"\nconst char *zend_vm_opcodes_map[] = {\n"); + fputs($f,"\nstatic const char *zend_vm_opcodes_map[] = {\n"); for ($i = 0; $i <= $max_opcode; $i++) { fputs($f,"\t".(isset($opcodes[$i]["op"])?'"'.$opcodes[$i]["op"].'"':"NULL").",\n"); } diff --git a/Zend/zend_vm_opcodes.h b/Zend/zend_vm_opcodes.h index e0bc2f5bf6..51b513a56d 100644 --- a/Zend/zend_vm_opcodes.h +++ b/Zend/zend_vm_opcodes.h @@ -163,7 +163,7 @@ #define ZEND_QM_ASSIGN_VAR 157 #define ZEND_JMP_SET_VAR 158 -const char *zend_vm_opcodes_map[] = { +static const char *zend_vm_opcodes_map[] = { "ZEND_NOP", "ZEND_ADD", "ZEND_SUB", -- cgit v1.2.1