Index: /trunk/optimizer.c
===================================================================
--- /trunk/optimizer.c	(revision 876)
+++ /trunk/optimizer.c	(revision 877)
@@ -29,5 +29,5 @@
 typedef int bbid_t;
 enum {
-	BBID_INVALID = -1,
+	BBID_INVALID = -1
 };
 /* {{{ basic block */
Index: /trunk/processor/head.m4
===================================================================
--- /trunk/processor/head.m4	(revision 876)
+++ /trunk/processor/head.m4	(revision 877)
@@ -99,9 +99,9 @@
 
 	zend_bool readonly_protection; /* wheather it's present */
-IFASSERT(xc_stack_t allocsizes;)
+IFAUTOCHECK(xc_stack_t allocsizes;)
 };
 /* }}} */
 /* {{{ memsetptr */
-IFASSERT(`dnl
+IFAUTOCHECK(`dnl
 static void *memsetptr(void *mem, void *content, size_t n)
 {
@@ -171,9 +171,9 @@
 #undef C_RELAYLINE
 #define C_RELAYLINE
-IFASSERT(`
+IFAUTOCHECK(`
 #undef C_RELAYLINE
 #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 str, long size IFAUTOCHECK(`, int relayline')) {
 	pushdef(`__LINE__', `relayline')
 	int realsize = UNISW(size, (type == IS_UNICODE) ? UBYTES(size) : size);
@@ -187,5 +187,5 @@
 		ALLOC(, char, realsize)
 	} 
-	IFASSERT(`
+	IFAUTOCHECK(`
 		else {
 			dnl fprintf(stderr, "dupstr %s\n", ZSTR_S(str));
@@ -197,5 +197,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 str, long size IFAUTOCHECK(`, int relayline')) {
 	pushdef(`__LINE__', `relayline')
 	int realsize = UNISW(size, (type == IS_UNICODE) ? UBYTES(size) : size);
@@ -341,5 +341,5 @@
 /* }}} */
 /* {{{ field name checker */
-IFASSERT(`dnl
+IFAUTOCHECK(`dnl
 static int xc_check_names(const char *file, int line, const char *functionName, const char **assert_names, int assert_names_count, HashTable *done_names)
 {
@@ -394,5 +394,5 @@
 	processor.cache = cache;
 
-	IFASSERT(`xc_stack_init(&processor.allocsizes);')
+	IFAUTOCHECK(`xc_stack_init(&processor.allocsizes);')
 
 	/* calc size */ {
@@ -420,8 +420,8 @@
 	)
 
-	IFASSERT(`xc_stack_reverse(&processor.allocsizes);')
+	IFAUTOCHECK(`xc_stack_reverse(&processor.allocsizes);')
 	/* store {{{ */
 	{
-		IFASSERT(`char *oldp;')
+		IFAUTOCHECK(`char *oldp;')
 		zend_hash_init(&processor.strings, 0, NULL, NULL, 0);
 		if (processor.reference) {
@@ -435,5 +435,5 @@
 			goto err_alloc;
 		}
-		IFASSERT(`oldp = processor.p;')
+		IFAUTOCHECK(`oldp = processor.p;')
 		assert(processor.p == (char *) ALIGN(processor.p));
 
@@ -443,5 +443,5 @@
 
 		xc_store_$1(&processor, dst, src TSRMLS_CC);
-		IFASSERT(` {
+		IFAUTOCHECK(` {
 			int real = processor.p - oldp;
 			int should = processor.size;
@@ -459,5 +459,5 @@
 	/* }}} */
 
-	IFASSERT(`xc_stack_destroy(&processor.allocsizes);')
+	IFAUTOCHECK(`xc_stack_destroy(&processor.allocsizes);')
 
 	return dst;
Index: /trunk/processor/main.m4
===================================================================
--- /trunk/processor/main.m4	(revision 876)
+++ /trunk/processor/main.m4	(revision 877)
@@ -32,5 +32,5 @@
 	/* allocate */
 	IFCALC(`
-		IFASSERT(`
+		IFAUTOCHECK(`
 			xc_stack_push(&processor->allocsizes, (void *) (long) (SIZE));
 			xc_stack_push(&processor->allocsizes, (void *) (long) (__LINE__));
@@ -40,5 +40,5 @@
 	')
 	IFSTORE(`
-		IFASSERT(`{
+		IFAUTOCHECK(`{
 			if (!xc_stack_count(&processor->allocsizes)) {
 				fprintf(stderr, "mismatch `$@' at line %d\n", __LINE__);
@@ -58,5 +58,5 @@
 		$1 = (REALTYPE *) (processor->p = (char *) ALIGN(processor->p));
 		ifelse(`$4', `', `
-				IFASSERT(`memsetptr($1, (void *) (unsigned long) __LINE__, SIZE);')
+				IFAUTOCHECK(`memsetptr($1, (void *) (unsigned long) __LINE__, SIZE);')
 			', `
 				memset($1, 0, SIZE);
@@ -75,5 +75,5 @@
 				REALTYPE*COUNT, `HashTable*1', `ALLOC_HASHTABLE($1);',
 				`', `', `$1 = (REALTYPE *) emalloc(SIZE);')
-			IFASSERT(`memsetptr($1, (void *) __LINE__, SIZE);')
+			IFAUTOCHECK(`memsetptr($1, (void *) __LINE__, SIZE);')
 		', `
 			$1 = (REALTYPE *) ecalloc(COUNT, sizeof($2));
@@ -105,9 +105,9 @@
 ')
 dnl }}}
-dnl {{{ IFASSERTEX
-define(`IFASSERTEX', `ifdef(`XCACHE_ENABLE_TEST', `$1', `$2')')
-dnl }}}
-dnl {{{ IFASSERT
-define(`IFASSERT', `IFASSERTEX(`
+dnl {{{ IFAUTOCHECKEX
+define(`IFAUTOCHECKEX', `ifdef(`XCACHE_ENABLE_TEST', `$1', `$2')')
+dnl }}}
+dnl {{{ IFAUTOCHECK
+define(`IFAUTOCHECK', `IFAUTOCHECKEX(`
 #ifndef NDEBUG
 		$1
@@ -206,12 +206,12 @@
 dnl }}}
 dnl {{{ DONE_*
-define(`DONE_SIZE', `IFASSERT(`dnl
-	done_size += $1`';
-	done_count ++;
+define(`DONE_SIZE', `IFAUTOCHECK(`dnl
+	xc_autocheck_done_size += $1`';
+	xc_autocheck_done_count ++;
 ')')
 define(`DONE', `
 	define(`ELEMENTS_DONE', defn(`ELEMENTS_DONE')`,"$1"')
-	IFASSERT(`dnl
-		if (zend_u_hash_exists(&done_names, IS_STRING, "$1", sizeof("$1"))) {
+	IFAUTOCHECK(`dnl
+		if (zend_u_hash_exists(&xc_autocheck_done_names, IS_STRING, "$1", sizeof("$1"))) {
 			fprintf(stderr
 				, "duplicate field at %s `#'%d FUNC_NAME`' : %s\n"
@@ -222,5 +222,5 @@
 		else {
 			zend_uchar b = 1;
-			zend_hash_add(&done_names, "$1", sizeof("$1"), (void*)&b, sizeof(b), NULL);
+			zend_hash_add(&xc_autocheck_done_names, "$1", sizeof("$1"), (void*)&b, sizeof(b), NULL);
 		}
 	')
@@ -236,13 +236,13 @@
 dnl }}}
 dnl {{{ IF**
-define(`IFCALC', `ifelse(KIND, `calc', `$1', `$2')')
-define(`IFSTORE', `ifelse(KIND, `store', `$1', `$2')')
+define(`IFCALC', `ifelse(PROCESSOR_TYPE, `calc', `$1', `$2')')
+define(`IFSTORE', `ifelse(PROCESSOR_TYPE, `store', `$1', `$2')')
 define(`IFCALCSTORE', `IFSTORE(`$1', `IFCALC(`$1', `$2')')')
-define(`IFRESTORE', `ifelse(KIND, `restore', `$1', `$2')')
+define(`IFRESTORE', `ifelse(PROCESSOR_TYPE, `restore', `$1', `$2')')
 define(`IFCOPY', `IFSTORE(`$1', `IFRESTORE(`$1', `$2')')')
 define(`IFCALCCOPY', `IFCALC(`$1', `IFCOPY(`$1', `$2')')')
-define(`IFDPRINT', `ifelse(KIND, `dprint', `$1', `$2')')
-define(`IFASM', `ifelse(KIND, `asm', `$1', `$2')')
-define(`IFDASM', `ifelse(KIND, `dasm', `$1', `$2')')
+define(`IFDPRINT', `ifelse(PROCESSOR_TYPE, `dprint', `$1', `$2')')
+define(`IFASM', `ifelse(PROCESSOR_TYPE, `asm', `$1', `$2')')
+define(`IFDASM', `ifelse(PROCESSOR_TYPE, `dasm', `$1', `$2')')
 dnl }}}
 EXPORT(`zend_op')
@@ -265,21 +265,21 @@
 
 define(`IFNOTMEMCPY', `ifdef(`USEMEMCPY', `', `$1')')
-REDEF(`KIND', `calc') include(srcdir`/processor/processor.m4')
+REDEF(`PROCESSOR_TYPE', `calc') include(srcdir`/processor/processor.m4')
 pushdef(`xc_get_class_num', ``xc_get_class_num'($@)')
-REDEF(`KIND', `store') include(srcdir`/processor/processor.m4')
+REDEF(`PROCESSOR_TYPE', `store') include(srcdir`/processor/processor.m4')
 popdef(`xc_get_class_num')
 pushdef(`xc_get_class', ``xc_get_class'($@)')
-REDEF(`KIND', `restore') include(srcdir`/processor/processor.m4')
+REDEF(`PROCESSOR_TYPE', `restore') include(srcdir`/processor/processor.m4')
 popdef(`xc_get_class')
 
 REDEF(`IFNOTMEMCPY', `$1')
 #ifdef HAVE_XCACHE_DPRINT
-REDEF(`KIND', `dprint') include(srcdir`/processor/processor.m4')
+REDEF(`PROCESSOR_TYPE', `dprint') include(srcdir`/processor/processor.m4')
 #endif /* HAVE_XCACHE_DPRINT */
 #ifdef HAVE_XCACHE_DISASSEMBLER
-REDEF(`KIND', `dasm') include(srcdir`/processor/processor.m4')
+REDEF(`PROCESSOR_TYPE', `dasm') include(srcdir`/processor/processor.m4')
 #endif /* HAVE_XCACHE_DISASSEMBLER */
 #ifdef HAVE_XCACHE_ASSEMBLER
-REDEF(`KIND', `asm') include(srcdir`/processor/processor.m4')
+REDEF(`PROCESSOR_TYPE', `asm') include(srcdir`/processor/processor.m4')
 #endif /* HAVE_XCACHE_ASSEMBLER */
 
Index: /trunk/processor/processor.m4
===================================================================
--- /trunk/processor/processor.m4	(revision 876)
+++ /trunk/processor/processor.m4	(revision 877)
@@ -62,5 +62,4 @@
 dnl }}}
 DEF_HASH_TABLE_FUNC(`HashTable_zval_ptr',           `zval_ptr')
-DEF_HASH_TABLE_FUNC(`HashTable_zval_ptr_nullable',  `zval_ptr_nullable')
 DEF_HASH_TABLE_FUNC(`HashTable_zend_function',      `zend_function')
 #ifdef ZEND_ENGINE_2
@@ -173,5 +172,5 @@
 							dst[0] = *ppzv;
 							/* *dst is updated */
-							dnl fprintf(stderr, "*dst is set to %p, KIND is_shm %d\n", dst[0], xc_is_shm(dst[0]));
+							dnl fprintf(stderr, "*dst is set to %p, PROCESSOR_TYPE is_shm %d\n", dst[0], xc_is_shm(dst[0]));
 						')
 						IFCALCSTORE(`processor->have_references = 1;')
@@ -782,5 +781,5 @@
 			xc_gc_add_op_array(&gc_op_array TSRMLS_CC);
 		}
-		define(`SKIPASSERT_ONCE')
+		xc_autocheck_skip = 1;
 	}
 	else
@@ -989,4 +988,5 @@
 dnl }}}
 #endif
+IFRESTORE(`', `
 DEF_STRUCT_P_FUNC(`xc_op_array_info_detail_t', , `dnl {{{
 	PROCESS(zend_uint, index)
@@ -1004,4 +1004,5 @@
 ')
 dnl }}}
+')
 DEF_STRUCT_P_FUNC(`xc_funcinfo_t', , `dnl {{{
 	PROCESS(zend_uint, key_size)
@@ -1050,4 +1051,5 @@
 ')
 dnl }}}
+IFRESTORE(`', `
 #ifdef ZEND_ENGINE_2_1
 DEF_STRUCT_P_FUNC(`xc_autoglobal_t', , `dnl {{{
@@ -1063,4 +1065,6 @@
 dnl }}}
 #endif
+')
+IFRESTORE(`', `
 #ifdef E_STRICT
 DEF_STRUCT_P_FUNC(`xc_compilererror_t', , `dnl {{{
@@ -1072,4 +1076,5 @@
 dnl }}}
 #endif
+')
 DEF_STRUCT_P_FUNC(`xc_entry_data_php_t', , `dnl {{{
 	IFCOPY(`
Index: /trunk/processor/struct.m4
===================================================================
--- /trunk/processor/struct.m4	(revision 876)
+++ /trunk/processor/struct.m4	(revision 877)
@@ -1,4 +1,4 @@
 define(`pushdefFUNC_NAME', `
-	pushdef(`FUNC_NAME', `xc_`'KIND`'_`'ifelse(`$2', `', `$1', `$2')')
+	pushdef(`FUNC_NAME', `xc_`'PROCESSOR_TYPE`'_`'ifelse(`$2', `', `$1', `$2')')
 ')
 dnl {{{ DECL_STRUCT_P_FUNC(1:type, 2:name, 3:comma=;)
@@ -30,5 +30,5 @@
 	{
 		pushdef(`ELEMENTS_DONE')
-		IFASSERT(`
+		IFAUTOCHECK(`
 			/* {{{ init assert */
 			ifdef(`SIZEOF_$1', , `m4_errprint(`missing SIZEOF_$1, safe to ignore')')
@@ -45,9 +45,10 @@
 				define(`COUNTOF_$1', 0)
 			')
-			int assert_size = SIZEOF_$1, assert_count = COUNTOF_$1;
-			int done_size = 0, done_count = 0;
-			const char *assert_names[] = { ifdef(`ELEMENTSOF_$1', `ELEMENTSOF_$1') };
-			HashTable done_names;
-			zend_hash_init(&done_names, 0, NULL, NULL, 0);
+			int xc_autocheck_assert_size = SIZEOF_$1, assert_count = COUNTOF_$1;
+			int xc_autocheck_done_size = 0, xc_autocheck_done_count = 0;
+			const char *xc_autocheck_assert_names[] = { ifdef(`ELEMENTSOF_$1', `ELEMENTSOF_$1') };
+			zend_bool xc_autocheck_skip = 0;
+			HashTable xc_autocheck_done_names;
+			zend_hash_init(&xc_autocheck_done_names, 0, NULL, NULL, 0);
 			/* }}} */
 			IFRESTORE(`assert(xc_is_shm(src));')
@@ -71,49 +72,42 @@
 			INDENT()fprintf(stderr, "}\n");
 		')
-		ifdef(`SKIPASSERT_ONCE', `
-			undefine(`SKIPASSERT_ONCE')
-			IFASSERT(`
-				zend_hash_destroy(&done_names);
+		IFAUTOCHECK(`
+		/* {{{ autocheck */ if (!xc_autocheck_skip) {
+			int name_check_errors = xc_check_names(__FILE__, __LINE__, "FUNC_NAME", xc_autocheck_assert_names, sizeof(xc_autocheck_assert_names) / sizeof(xc_autocheck_assert_names[0]), &xc_autocheck_done_names);
+			zend_hash_destroy(&xc_autocheck_done_names);
+
+			if (xc_autocheck_done_count != assert_count) {
+				fprintf(stderr
+					, "count assertion failed at %s `#'%d FUNC_NAME`' : unexpected:%d - expecting:%d = %d != 0\n"
+					, __FILE__, __LINE__
+					, xc_autocheck_done_count, assert_count, xc_autocheck_done_count - assert_count
+					);
+			}
+			if (xc_autocheck_done_size != xc_autocheck_assert_size) {
+				fprintf(stderr
+					, "size assertion failed at %s `#'%d FUNC_NAME`' : unexpected:%d - expecting:%d = %d != 0\n"
+					, __FILE__, __LINE__
+					, xc_autocheck_done_size, xc_autocheck_assert_size, xc_autocheck_done_size - xc_autocheck_assert_size
+					);
+			}
+			if (name_check_errors || xc_autocheck_done_count != assert_count || xc_autocheck_done_size != xc_autocheck_assert_size) {
+				assert(0);
+			}
+		} while (0); /* }}} */
+		')
+		ifdef(`ELEMENTSOF_$1', `
+			pushdef(`ELEMENTS_UNDONE', LIST_DIFF(defn(`ELEMENTSOF_$1'), defn(`ELEMENTS_DONE')))
+			ifelse(defn(`ELEMENTS_UNDONE'), , `m4_errprint(`AUTOCHECK INFO: $1: processor looks good')', `
+				m4_errprint(`AUTOCHECK ERROR: ====' PROCESSOR_TYPE `$1 =================')
+				m4_errprint(`AUTOCHECK expected:' defn(`ELEMENTSOF_$1'))
+				m4_errprint(`AUTOCHECK missing :' defn(`ELEMENTS_UNDONE'))
+				define(`EXIT_PENDING', 1)
 			')
-		', `
-			IFASSERT(`
-			/* {{{ check assert */ do {
-				int name_check_errors = xc_check_names(__FILE__, __LINE__, "FUNC_NAME", assert_names, sizeof(assert_names) / sizeof(assert_names[0]), &done_names);
-				zend_hash_destroy(&done_names);
-
-				if (done_count != assert_count) {
-					fprintf(stderr
-						, "count assertion failed at %s `#'%d FUNC_NAME`' : unexpected:%d - expecting:%d = %d != 0\n"
-						, __FILE__, __LINE__
-						, done_count, assert_count, done_count - assert_count
-						);
-				}
-				if (done_size != assert_size) {
-					fprintf(stderr
-						, "size assertion failed at %s `#'%d FUNC_NAME`' : unexpected:%d - expecting:%d = %d != 0\n"
-						, __FILE__, __LINE__
-						, done_size, assert_size, done_size - assert_size
-						);
-				}
-				if (name_check_errors || done_count != assert_count || done_size != assert_size) {
-					assert(0);
-				}
-			} while (0); /* }}} */
-			')
-			ifdef(`ELEMENTSOF_$1', `
-				pushdef(`ELEMENTS_UNDONE', LIST_DIFF(defn(`ELEMENTSOF_$1'), defn(`ELEMENTS_DONE')))
-				ifelse(defn(`ELEMENTS_UNDONE'), , `m4_errprint(`AUTOCHECK INFO: $1: processor looks good')', `
-					m4_errprint(`AUTOCHECK ERROR: ====' KIND `$1 =================')
-					m4_errprint(`AUTOCHECK expected:' defn(`ELEMENTSOF_$1'))
-					m4_errprint(`AUTOCHECK missing :' defn(`ELEMENTS_UNDONE'))
-					define(`EXIT_PENDING', 1)
-				')
-				popdef(`ELEMENTS_UNDONE')
-			')
+			popdef(`ELEMENTS_UNDONE')
 		')
 		ifdef(`USEMEMCPY', `IFCOPY(`
 			} while (0);
 		')')
-		IFASSERT(`
+		IFAUTOCHECK(`
 			} while (0);
 		')
