Changeset 730 in svn


Ignore:
Timestamp:
2011-04-10T07:58:58Z (4 years ago)
Author:
Xuefer
Message:

PHP_6: disassembler/decompiler: fix property

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Decompiler.class.php

    r727 r730  
    16701670        // }}}
    16711671        // {{{ properties
    1672         if (!empty($class['default_properties']) || !empty($class['default_static_members'])) {
     1672        $member_variables = isset($class['properties_info']) ? $class['properties_info'] : ($class['default_static_members'] + $class['default_properties']);
     1673        if ($member_variables) {
    16731674            echo "\n";
    16741675            $infos = !empty($class['properties_info']) ? $class['properties_info'] : null;
    1675             foreach (!empty($class['properties_info']) ? $class['properties_info'] : ($class['default_static_members'] + $class['default_properties']) as $name => $dummy) {
     1676            foreach ($member_variables as $name => $dummy) {
    16761677                $info = (isset($infos) && isset($infos[$name])) ? $infos[$name] : null;
    16771678                if (isset($info)) {
     
    17261727                echo '$', $name;
    17271728
    1728                 $key = isset($info) ? $info['name'] . ($mangled ? "\000" : "") : $name;
    1729 
    1730                 $value = $class[$static ? 'default_static_members' : 'default_properties'][$key];
     1729                if (isset($info['offset'])) {
     1730                    $value = $class[$static ? 'default_static_members_table' : 'default_properties_table'][$info['offset']];
     1731                }
     1732                else {
     1733                    $key = isset($info) ? $info['name'] . ($mangled ? "\000" : "") : $name;
     1734
     1735                    $value = $class[$static ? 'default_static_members' : 'default_properties'][$key];
     1736                }
    17311737                if (isset($value)) {
    17321738                    echo ' = ';
  • trunk/processor/processor.m4

    r724 r730  
    328328#ifdef ZEND_ENGINE_2_4
    329329    DISPATCH(int, default_properties_count)
    330     STRUCT_ARRAY(default_properties_count, zval, default_properties_table)
     330    STRUCT_ARRAY(default_properties_count, zval_ptr, default_properties_table)
    331331    DISPATCH(int, default_static_members_count)
    332     STRUCT_ARRAY(default_static_members_count, zval, default_static_members_table)
    333     IFCOPY(`dst->static_members_table = &dst->default_static_members_table;')
     332    STRUCT_ARRAY(default_static_members_count, zval_ptr, default_static_members_table)
     333    IFCOPY(`dst->static_members_table = dst->default_static_members_table;')
    334334    DONE(static_members_table)
    335335#else
Note: See TracChangeset for help on using the changeset viewer.