Changeset 780
- Timestamp:
- 04/22/2011 11:33:46 AM (2 years ago)
- Location:
- trunk
- Files:
-
- 3 modified
-
Decompiler.class.php (modified) (6 diffs)
-
decompilesample.php (modified) (1 diff)
-
xcache.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Decompiler.class.php
r777 r780 737 737 $EX['last'] = count($opcodes) - 1; 738 738 $EX['silence'] = 0; 739 $EX['recvs'] = array(); 740 $EX['uses'] = array(); 739 741 740 742 for ($next = 0, $last = $EX['last']; … … 1140 1142 } 1141 1143 $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 } 1142 1152 break; 1143 1153 // }}} … … 1842 1852 } 1843 1853 // }}} 1854 function duses(&$EX, $indent) // {{{ 1855 { 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), ')'; 1865 } 1866 // }}} 1844 1867 function dfunction($func, $indent = '', $nobody = false) // {{{ 1845 1868 { … … 1850 1873 $EX['op_array'] = &$func['op_array']; 1851 1874 $EX['recvs'] = array(); 1875 $EX['uses'] = array(); 1852 1876 } 1853 1877 else { … … 1856 1880 $EX = &$this->dop_array($func['op_array'], $newindent); 1857 1881 $body = ob_get_clean(); 1858 if (!isset($EX['recvs'])) {1859 $EX['recvs'] = array();1860 }1861 1882 } 1862 1883 … … 1868 1889 $this->dargs($EX, $indent); 1869 1890 echo ")"; 1891 $this->duses($EX, $indent); 1870 1892 if ($nobody) { 1871 1893 echo ";\n"; -
trunk/decompilesample.php
r761 r780 363 363 static $static = array(1); 364 364 $tax = 'tax'; 365 $tax = --$tax; 365 366 $pricePerItem = constant('PRICE_' . strtoupper($product)); 366 367 $total += $pricePerItem * $quantity * ($tax + 1); -
trunk/xcache.c
r767 r780 2875 2875 } 2876 2876 /* }}} */ 2877 /* {{{ proto int xcache_get_refcount(mixed variable) 2878 Get reference count of variable */ 2879 PHP_FUNCTION(xcache_get_refcount) 2880 { 2881 zval *variable; 2882 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &variable) == FAILURE) { 2883 RETURN_NULL(); 2884 } 2885 2886 RETURN_LONG(Z_REFCOUNT_P(variable)); 2887 } 2888 /* }}} */ 2889 /* {{{ proto bool xcache_get_isref(mixed variable) 2890 check if variable data is marked referenced */ 2891 PHP_FUNCTION(xcache_get_isref) 2892 { 2893 zval *variable; 2894 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &variable) == FAILURE) { 2895 RETURN_NULL(); 2896 } 2897 2898 RETURN_BOOL(Z_ISREF_P(variable)); 2899 } 2900 /* }}} */ 2877 2901 #ifdef HAVE_XCACHE_DPRINT 2878 2902 /* {{{ proto bool xcache_dprint(mixed value) … … 3116 3140 PHP_FE(xcache_unset, NULL) 3117 3141 PHP_FE(xcache_unset_by_prefix, NULL) 3142 PHP_FE(xcache_get_refcount, NULL) 3143 PHP_FE(xcache_get_isref, NULL) 3118 3144 #ifdef HAVE_XCACHE_DPRINT 3119 3145 PHP_FE(xcache_dprint, NULL)

