Index: /trunk/Decompiler.class.php
===================================================================
--- /trunk/Decompiler.class.php	(revision 736)
+++ /trunk/Decompiler.class.php	(revision 737)
@@ -9,4 +9,16 @@
 }
 
+function str($code, $indent = '') // {{{
+{
+	if (is_object($code)) {
+		if (get_class($code) != 'Decompiler_Code') {
+			$code = toCode($code, $indent);
+		}
+		return $code->__toString();
+	}
+
+	return (string) $code;
+}
+// }}}
 function toCode($src, $indent = '') // {{{
 {
@@ -20,8 +32,8 @@
 			exit('no toCode');
 		}
-		return $src->toCode($indent);
-	}
-
-	return $src;
+		return new Decompiler_Code($src->toCode($indent));
+	}
+
+	return new Decompiler_Code($src);
 }
 // }}}
@@ -37,9 +49,9 @@
 	}
 
-	if ($value instanceof Decompiler_Object) {
+	if (is_a($value, 'Decompiler_Object')) {
 		// use as is
 	}
 	else if (is_array($value)) {
-		$value = new Decompiler_Array($value);
+		$value = new Decompiler_ConstArray($value);
 	}
 	else {
@@ -78,4 +90,9 @@
 
 	function toCode($indent)
+	{
+		return $this;
+	}
+
+	function __toString()
 	{
 		return $this->src;
@@ -243,11 +260,24 @@
 class Decompiler_Array extends Decompiler_Value // {{{
 {
-	function Decompiler_Array($value = array())
-	{
-		$this->value = $value;
+	// emenets
+	function Decompiler_Array()
+	{
+		$this->value = array();
 	}
 
 	function toCode($indent)
 	{
+		$subindent = $indent . INDENT;
+
+		$elementsCode = array();
+		$index = 0;
+		foreach ($this->value as $element) {
+			list($key, $value) = $element;
+			if (!isset($key)) {
+				$key = $index++;
+			}
+			$elementsCode[] = array(str($key, $subindent), str($value, $subindent), $key, $value);
+		}
+
 		$exp = "array(";
 		$indent = $indent . INDENT;
@@ -255,29 +285,28 @@
 		$multiline = 0;
 		$i = 0;
-		foreach ($this->value as $k => $v) {
-			if ($i !== $k) {
+		foreach ($elementsCode as $element) {
+			list($keyCode, $valueCode) = $element;
+			if ((string) $i !== $keyCode) {
 				$assocWidth = 1;
+				break;
 			}
 			++$i;
 		}
-		foreach ($this->value as $k => $v) {
+		foreach ($elementsCode as $element) {
+			list($keyCode, $valueCode, $key, $value) = $element;
 			if ($assocWidth) {
-				$len = strlen($k);
+				$len = strlen($keyCode);
 				if ($assocWidth < $len) {
 					$assocWidth = $len;
 				}
 			}
-			$spec = xcache_get_special_value($v);
-			if (is_array(isset($spec) ? $spec : $v)) {
+			if (is_array($value) || is_a($value, 'Decompiler_Array')) {
 				$multiline ++;
 			}
 		}
-		if ($assocWidth) {
-			$assocWidth += 2;
-		}
 
 		$i = 0;
-		$subindent = $indent . INDENT;
-		foreach ($this->value as $k => $v) {
+		foreach ($elementsCode as $element) {
+			list($keyCode, $value) = $element;
 			if ($multiline) {
 				if ($i) {
@@ -293,15 +322,14 @@
 			}
 
-			$k = var_export($k, true);
 			if ($assocWidth) {
 				if ($multiline) {
-					$exp .= sprintf("%{$assocWidth}s => ", $k);
+					$exp .= sprintf("%-{$assocWidth}s => ", $keyCode);
 				}
 				else {
-					$exp .= $k . ' => ';
-				}
-			}
-
-			$exp .= toCode(value($v), $subindent);
+					$exp .= $keyCode . ' => ';
+				}
+			}
+
+			$exp .= $value;
 
 			$i ++;
@@ -314,4 +342,16 @@
 		}
 		return $exp;
+	}
+}
+// }}}
+class Decompiler_ConstArray extends Decompiler_Array // {{{
+{
+	function Decompiler_ConstArray($array)
+	{
+		$elements = array();
+		foreach ($array as $key => $value) {
+			$elements[] = array(value($key), value($value));
+		}
+		$this->value = $elements;
 	}
 }
@@ -1239,10 +1279,10 @@
 
 					if ($opc == XC_ADD_ARRAY_ELEMENT) {
-						$offset = $this->getOpVal($op2, $EX);
-						if (isset($offset)) {
-							$T[$res['var']]->value[$offset] = $rvalue;
+						$assoc = $this->getOpVal($op2, $EX);
+						if (isset($assoc)) {
+							$T[$res['var']]->value[] = array($assoc, $rvalue);
 						}
 						else {
-							$T[$res['var']]->value[] = $rvalue;
+							$T[$res['var']]->value[] = array(null, $rvalue);
 						}
 					}
@@ -1255,10 +1295,10 @@
 						}
 
-						$offset = $this->getOpVal($op2, $EX);
-						if (isset($offset)) {
-							$resvar->value[$offset] = $rvalue;
+						$assoc = $this->getOpVal($op2, $EX);
+						if (isset($assoc)) {
+							$resvar->value[] = array($assoc, $rvalue);
 						}
 						else {
-							$resvar->value[] = $rvalue;
+							$resvar->value[] = array(null, $rvalue);
 						}
 					}
@@ -1373,5 +1413,5 @@
 						$default = null;
 					}
-					$EX['recvs'][$offset] = array($lvalue, $default);
+					$EX['recvs'][str($offset)] = array($lvalue, $default);
 					break;
 				case XC_POST_DEC:
Index: /trunk/decompilesample.php
===================================================================
--- /trunk/decompilesample.php	(revision 736)
+++ /trunk/decompilesample.php	(revision 737)
@@ -46,4 +46,13 @@
 		))
 	{
+		$runtimeArray = array('1');
+		$runtimeArray2 = array(
+			'1',
+			array()
+			);
+		$runtimeArray3 = array(
+			'a' => '1',
+			2   => array()
+			);
 		return 'protected';
 	}
Index: /trunk/processor/head.m4
===================================================================
--- /trunk/processor/head.m4	(revision 736)
+++ /trunk/processor/head.m4	(revision 737)
@@ -141,5 +141,5 @@
 #define C_RELAYLINE , __LINE__
 ')
-static inline void xc_calc_string_n(xc_processor_t *processor, zend_uchar type, const zstr str, long size IFASSERT(`, int relayline')) {
+static inline void xc_calc_string_n(xc_processor_t *processor, zend_uchar type, const zstr const str, long size IFASSERT(`, int relayline')) {
 	pushdef(`__LINE__', `relayline')
 	int realsize = UNISW(size, (type == IS_UNICODE) ? UBYTES(size) : size);
@@ -163,5 +163,5 @@
 /* {{{ xc_store_string_n */
 REDEF(`KIND', `store')
-static inline zstr xc_store_string_n(xc_processor_t *processor, zend_uchar type, const zstr str, long size IFASSERT(`, int relayline')) {
+static inline zstr xc_store_string_n(xc_processor_t *processor, zend_uchar type, const zstr const str, long size IFASSERT(`, int relayline')) {
 	pushdef(`__LINE__', `relayline')
 	int realsize = UNISW(size, (type == IS_UNICODE) ? UBYTES(size) : size);
