diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2015-10-28 23:25:05 +0300 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2015-10-30 07:18:44 +0300 |
| commit | d83600a2d5d40b1785a0bbe5188f626c736ec93f (patch) | |
| tree | 8636703ebb4b2617372d6ee956cdaf09d6e0e50e /Zend/zend_vm_opcodes.c | |
| parent | 648347536a162696fd909da59b606646c30a97d7 (diff) | |
| download | php-git-d83600a2d5d40b1785a0bbe5188f626c736ec93f.tar.gz | |
Added zend_get_opcode_flags() function to get information about opcode operands and extended_value meaning
Diffstat (limited to 'Zend/zend_vm_opcodes.c')
| -rw-r--r-- | Zend/zend_vm_opcodes.c | 192 |
1 files changed, 190 insertions, 2 deletions
diff --git a/Zend/zend_vm_opcodes.c b/Zend/zend_vm_opcodes.c index 000d39044b..4b2913b5e1 100644 --- a/Zend/zend_vm_opcodes.c +++ b/Zend/zend_vm_opcodes.c @@ -21,7 +21,7 @@ #include <stdio.h> #include <zend.h> -const char *zend_vm_opcodes_map[182] = { +static const char *zend_vm_opcodes_names[182] = { "ZEND_NOP", "ZEND_ADD", "ZEND_SUB", @@ -206,6 +206,194 @@ const char *zend_vm_opcodes_map[182] = { "ZEND_FETCH_CLASS_CONSTANT", }; +static uint32_t zend_vm_opcodes_flags[182] = { + 0x00000000, + 0x00000707, + 0x00000707, + 0x00000707, + 0x00000707, + 0x00000707, + 0x00000707, + 0x00000707, + 0x00000707, + 0x00000707, + 0x00000707, + 0x00000707, + 0x00000007, + 0x00000007, + 0x00000707, + 0x00000303, + 0x00000303, + 0x00000707, + 0x00000707, + 0x00000707, + 0x00000707, + 0x02000003, + 0x00000003, + 0x00100701, + 0x00100701, + 0x00100701, + 0x00100701, + 0x00100701, + 0x00100701, + 0x00100701, + 0x00100701, + 0x00100701, + 0x00100701, + 0x00100701, + 0x00000001, + 0x00000001, + 0x00000001, + 0x00000001, + 0x00000301, + 0x00000101, + 0x00000007, + 0x00000000, + 0x00000010, + 0x00001007, + 0x00001007, + 0x00081007, + 0x00001007, + 0x00001007, + 0x00000707, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000007, + 0x00000707, + 0x00010701, + 0x00010701, + 0x00010701, + 0x00000000, + 0x00000001, + 0x00010300, + 0x00000000, + 0x00010300, + 0x00000003, + 0x00000008, + 0x00000308, + 0x00000803, + 0x00000801, + 0x00000801, + 0x00011003, + 0x00010300, + 0x00000005, + 0x01000703, + 0x00010703, + 0x04000007, + 0x00800107, + 0x00000701, + 0x00000701, + 0x00001003, + 0x00080001, + 0x00000007, + 0x00800107, + 0x00000707, + 0x00000703, + 0x00800107, + 0x00000701, + 0x00000701, + 0x00800107, + 0x00000701, + 0x00000701, + 0x00800107, + 0x00000707, + 0x00000707, + 0x00800107, + 0x00000703, + 0x00000703, + 0x00800107, + 0x00000701, + 0x00000701, + 0x00000307, + 0x00400301, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00010000, + 0x00000801, + 0x00040103, + 0x00000003, + 0x00200700, + 0x00000007, + 0x00000003, + 0x00010707, + 0x00010703, + 0x00800107, + 0x20000707, + 0x00000803, + 0x00000801, + 0x00010703, + 0x00000000, + 0x00000801, + 0x00000007, + 0x00000003, + 0x02000003, + 0x00000103, + 0x00001003, + 0x00080001, + 0x00000005, + 0x00010700, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000701, + 0x00000701, + 0x00000701, + 0x00000701, + 0x00000701, + 0x00000000, + 0x00000305, + 0x00000000, + 0x00020000, + 0x00000000, + 0x00000003, + 0x00000303, + 0x00000300, + 0x00020000, + 0x00000000, + 0x00000701, + 0x20000707, + 0x00000000, + 0x00000000, + 0x00001000, + 0x00001003, + 0x00000103, + 0x00000000, + 0x00000000, + 0x00000101, + 0x00200000, + 0x00000000, + 0x00000000, + 0x00000303, + 0x00000003, + 0x08002010, + 0x10002000, + 0x00000008, + 0x00000000, + 0x00000707, + 0x00100701, + 0x00000301, + 0x00001003, + 0x00000707, + 0x00000010, + 0x00020010, + 0x00000307, + 0x00000307, + 0x00000307, + 0x00000307, + 0x00000307, + 0x00000307, + 0x00000307, + 0x20000307, + 0x00000303, +}; + ZEND_API const char* zend_get_opcode_name(zend_uchar opcode) { - return zend_vm_opcodes_map[opcode]; + return zend_vm_opcodes_names[opcode]; +} +ZEND_API uint32_t zend_get_opcode_flags(zend_uchar opcode) { + return zend_vm_opcodes_flags[opcode]; } |
