Changeset 781 for trunk/Decompiler.class.php
- Timestamp:
- 2011-04-22T14:05:08+02:00 (2 years ago)
- File:
-
- 1 edited
-
trunk/Decompiler.class.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Decompiler.class.php
r780 r781 1141 1141 break; 1142 1142 } 1143 if (is_a($rvalue, 'Decompiler_Fetch')) { 1144 $src = str($rvalue->src, $EX); 1145 if ('$' . unquoteName($src) == $lvalue) { 1146 switch ($rvalue->fetchType) { 1147 case ZEND_FETCH_STATIC: 1148 $statics = &$EX['op_array']['static_variables']; 1149 if ((xcache_get_type($statics[$name]) & IS_LEXICAL_VAR)) { 1150 $EX['uses'][] = str($lvalue); 1151 unset($statics); 1152 break 2; 1153 } 1154 unset($statics); 1155 } 1156 } 1157 } 1143 1158 $resvar = "$lvalue = " . str($rvalue, $EX); 1144 if (0) {1145 if ($op2['op_type'] == XC_IS_VAR) {1146 $resvar .= ' /* isvar */';1147 }1148 else if ($op2['op_type'] == XC_IS_TMP_VAR) {1149 $resvar .= ' /* istmp */';1150 }1151 }1152 1159 break; 1153 1160 // }}} … … 1165 1172 case ZEND_FETCH_STATIC: 1166 1173 $statics = &$EX['op_array']['static_variables']; 1174 if ((xcache_get_type($statics[$name]) & IS_LEXICAL_REF)) { 1175 $EX['uses'][] = '&' . str($lvalue); 1176 unset($statics); 1177 break 2; 1178 } 1179 1167 1180 $resvar = 'static ' . $lvalue; 1168 1181 $name = unquoteName($src); … … 1854 1867 function duses(&$EX, $indent) // {{{ 1855 1868 { 1856 if (!$EX['uses']) { 1857 return; 1858 } 1859 1860 $uses = array(); 1861 foreach ($EX['uses'] as $name => $value) { 1862 $uses = '$' . $name; 1863 } 1864 echo ' use(', implode(', ', $uses), ')'; 1869 if ($EX['uses']) { 1870 echo ' use(', implode(', ', $EX['uses']), ')'; 1871 } 1865 1872 } 1866 1873 // }}} … … 1886 1893 $functionName = ''; 1887 1894 } 1888 echo 'function ', $functionName, '(';1895 echo 'function', $functionName ? ' ' . $functionName : '', '('; 1889 1896 $this->dargs($EX, $indent); 1890 1897 echo ")"; … … 2257 2264 define('IS_CONSTANT', 8); 2258 2265 define('IS_CONSTANT_ARRAY', 9); 2266 /* Ugly hack to support constants as static array indices */ 2267 define('IS_CONSTANT_TYPE_MASK', 0x0f); 2268 define('IS_CONSTANT_UNQUALIFIED', 0x10); 2269 define('IS_CONSTANT_INDEX', 0x80); 2270 define('IS_LEXICAL_VAR', 0x20); 2271 define('IS_LEXICAL_REF', 0x40); 2259 2272 2260 2273 @define('XC_IS_CV', 16);
Note: See TracChangeset
for help on using the changeset viewer.

