new internal layout


git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@748 59561ff5-6e30-0410-9f3c-9617f08c8826
diff --git a/tests/43-recursion-OK.asn1.-P b/tests/43-recursion-OK.asn1.-P
index a5f8654..de35638 100644
--- a/tests/43-recursion-OK.asn1.-P
+++ b/tests/43-recursion-OK.asn1.-P
@@ -40,7 +40,7 @@
 
 /*** <<< STAT-DEFS [Test-structure-1] >>> ***/
 
-static asn_TYPE_member_t asn_MBR_t_member1[] = {
+static asn_TYPE_member_t asn_MBR_t_member1_2[] = {
 	{ ATF_NOFLAGS, 0, 0,
 		.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
 		.tag_mode = 0,
@@ -49,16 +49,16 @@
 		.name = ""
 		},
 };
-static ber_tlv_tag_t asn_DEF_t_member1_tags[] = {
+static ber_tlv_tag_t asn_DEF_t_member1_2_tags[] = {
 	(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
 };
-static asn_SET_OF_specifics_t asn_DEF_t_member1_specs = {
+static asn_SET_OF_specifics_t asn_SPC_t_member1_2_specs = {
 	sizeof(struct t_member1),
 	offsetof(struct t_member1, _asn_ctx),
 	0,	/* XER encoding is XMLDelimitedItemList */
 };
 static /* Use -fall-defs-global to expose */
-asn_TYPE_descriptor_t asn_DEF_t_member1 = {
+asn_TYPE_descriptor_t asn_DEF_t_member1_2 = {
 	"t-member1",
 	"t-member1",
 	SET_OF_free,
@@ -69,18 +69,18 @@
 	SET_OF_decode_xer,
 	SET_OF_encode_xer,
 	0,	/* Use generic outmost tag fetcher */
-	asn_DEF_t_member1_tags,
-	sizeof(asn_DEF_t_member1_tags)
-		/sizeof(asn_DEF_t_member1_tags[0]), /* 1 */
-	asn_DEF_t_member1_tags,	/* Same as above */
-	sizeof(asn_DEF_t_member1_tags)
-		/sizeof(asn_DEF_t_member1_tags[0]), /* 1 */
-	asn_MBR_t_member1,
+	asn_DEF_t_member1_2_tags,
+	sizeof(asn_DEF_t_member1_2_tags)
+		/sizeof(asn_DEF_t_member1_2_tags[0]), /* 1 */
+	asn_DEF_t_member1_2_tags,	/* Same as above */
+	sizeof(asn_DEF_t_member1_2_tags)
+		/sizeof(asn_DEF_t_member1_2_tags[0]), /* 1 */
+	asn_MBR_t_member1_2,
 	1,	/* Single element */
-	&asn_DEF_t_member1_specs	/* Additional specs */
+	&asn_SPC_t_member1_2_specs	/* Additional specs */
 };
 
-static asn_TYPE_member_t asn_MBR_t_member2[] = {
+static asn_TYPE_member_t asn_MBR_t_member2_3[] = {
 	{ ATF_NOFLAGS, 0, 0,
 		.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
 		.tag_mode = 0,
@@ -89,16 +89,16 @@
 		.name = ""
 		},
 };
-static ber_tlv_tag_t asn_DEF_t_member2_tags[] = {
+static ber_tlv_tag_t asn_DEF_t_member2_3_tags[] = {
 	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
 };
-static asn_SET_OF_specifics_t asn_DEF_t_member2_specs = {
+static asn_SET_OF_specifics_t asn_SPC_t_member2_3_specs = {
 	sizeof(struct t_member2),
 	offsetof(struct t_member2, _asn_ctx),
 	0,	/* XER encoding is XMLDelimitedItemList */
 };
 static /* Use -fall-defs-global to expose */
-asn_TYPE_descriptor_t asn_DEF_t_member2 = {
+asn_TYPE_descriptor_t asn_DEF_t_member2_3 = {
 	"t-member2",
 	"t-member2",
 	SEQUENCE_OF_free,
@@ -109,29 +109,29 @@
 	SEQUENCE_OF_decode_xer,
 	SEQUENCE_OF_encode_xer,
 	0,	/* Use generic outmost tag fetcher */
-	asn_DEF_t_member2_tags,
-	sizeof(asn_DEF_t_member2_tags)
-		/sizeof(asn_DEF_t_member2_tags[0]), /* 1 */
-	asn_DEF_t_member2_tags,	/* Same as above */
-	sizeof(asn_DEF_t_member2_tags)
-		/sizeof(asn_DEF_t_member2_tags[0]), /* 1 */
-	asn_MBR_t_member2,
+	asn_DEF_t_member2_3_tags,
+	sizeof(asn_DEF_t_member2_3_tags)
+		/sizeof(asn_DEF_t_member2_3_tags[0]), /* 1 */
+	asn_DEF_t_member2_3_tags,	/* Same as above */
+	sizeof(asn_DEF_t_member2_3_tags)
+		/sizeof(asn_DEF_t_member2_3_tags[0]), /* 1 */
+	asn_MBR_t_member2_3,
 	1,	/* Single element */
-	&asn_DEF_t_member2_specs	/* Additional specs */
+	&asn_SPC_t_member2_3_specs	/* Additional specs */
 };
 
-static asn_TYPE_member_t asn_MBR_Test_structure_1[] = {
+static asn_TYPE_member_t asn_MBR_Test_structure_1_1[] = {
 	{ ATF_NOFLAGS, 0, offsetof(struct Test_structure_1, t_member1),
 		.tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
 		.tag_mode = 0,
-		.type = (void *)&asn_DEF_t_member1,
+		.type = (void *)&asn_DEF_t_member1_2,
 		.memb_constraints = 0,	/* Defer constraints checking to the member type */
 		.name = "t-member1"
 		},
 	{ ATF_NOFLAGS, 0, offsetof(struct Test_structure_1, t_member2),
 		.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
 		.tag_mode = 0,
-		.type = (void *)&asn_DEF_t_member2,
+		.type = (void *)&asn_DEF_t_member2_3,
 		.memb_constraints = 0,	/* Defer constraints checking to the member type */
 		.name = "t-member2"
 		},
@@ -150,19 +150,19 @@
 		.name = "t-member4"
 		},
 };
-static ber_tlv_tag_t asn_DEF_Test_structure_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Test_structure_1_1_tags[] = {
 	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
 };
-static asn_TYPE_tag2member_t asn_DEF_Test_structure_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Test_structure_1_1_tag2el[] = {
     { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, 0, 0 }, /* t-member4 at 19 */
     { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 1 }, /* t-member2 at 16 */
     { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 0 }, /* t-member3 at 17 */
     { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* t-member1 at 15 */
 };
-static asn_SEQUENCE_specifics_t asn_DEF_Test_structure_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Test_structure_1_1_specs = {
 	sizeof(struct Test_structure_1),
 	offsetof(struct Test_structure_1, _asn_ctx),
-	asn_DEF_Test_structure_1_tag2el,
+	asn_MAP_Test_structure_1_1_tag2el,
 	4,	/* Count of tags in the map */
 	-1,	/* Start extensions */
 	-1	/* Stop extensions */
@@ -178,15 +178,15 @@
 	SEQUENCE_decode_xer,
 	SEQUENCE_encode_xer,
 	0,	/* Use generic outmost tag fetcher */
-	asn_DEF_Test_structure_1_tags,
-	sizeof(asn_DEF_Test_structure_1_tags)
-		/sizeof(asn_DEF_Test_structure_1_tags[0]), /* 1 */
-	asn_DEF_Test_structure_1_tags,	/* Same as above */
-	sizeof(asn_DEF_Test_structure_1_tags)
-		/sizeof(asn_DEF_Test_structure_1_tags[0]), /* 1 */
-	asn_MBR_Test_structure_1,
+	asn_DEF_Test_structure_1_1_tags,
+	sizeof(asn_DEF_Test_structure_1_1_tags)
+		/sizeof(asn_DEF_Test_structure_1_1_tags[0]), /* 1 */
+	asn_DEF_Test_structure_1_1_tags,	/* Same as above */
+	sizeof(asn_DEF_Test_structure_1_1_tags)
+		/sizeof(asn_DEF_Test_structure_1_1_tags[0]), /* 1 */
+	asn_MBR_Test_structure_1_1,
 	4,	/* Elements count */
-	&asn_DEF_Test_structure_1_specs	/* Additional specs */
+	&asn_SPC_Test_structure_1_1_specs	/* Additional specs */
 };
 
 
@@ -236,7 +236,7 @@
 
 /*** <<< STAT-DEFS [Choice-1] >>> ***/
 
-static asn_TYPE_member_t asn_MBR_or[] = {
+static asn_TYPE_member_t asn_MBR_or_2[] = {
 	{ ATF_NOFLAGS, 0, 0,
 		.tag = -1 /* Ambiguous tag (CHOICE?) */,
 		.tag_mode = 0,
@@ -245,17 +245,17 @@
 		.name = ""
 		},
 };
-static ber_tlv_tag_t asn_DEF_or_tags[] = {
+static ber_tlv_tag_t asn_DEF_or_2_tags[] = {
 	(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
 	(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
 };
-static asn_SET_OF_specifics_t asn_DEF_or_specs = {
+static asn_SET_OF_specifics_t asn_SPC_or_2_specs = {
 	sizeof(struct or),
 	offsetof(struct or, _asn_ctx),
 	1,	/* XER encoding is XMLValueList */
 };
 static /* Use -fall-defs-global to expose */
-asn_TYPE_descriptor_t asn_DEF_or = {
+asn_TYPE_descriptor_t asn_DEF_or_2 = {
 	"or",
 	"or",
 	SET_OF_free,
@@ -266,18 +266,18 @@
 	SET_OF_decode_xer,
 	SET_OF_encode_xer,
 	0,	/* Use generic outmost tag fetcher */
-	asn_DEF_or_tags,
-	sizeof(asn_DEF_or_tags)
-		/sizeof(asn_DEF_or_tags[0]) - 1, /* 1 */
-	asn_DEF_or_tags,	/* Same as above */
-	sizeof(asn_DEF_or_tags)
-		/sizeof(asn_DEF_or_tags[0]), /* 2 */
-	asn_MBR_or,
+	asn_DEF_or_2_tags,
+	sizeof(asn_DEF_or_2_tags)
+		/sizeof(asn_DEF_or_2_tags[0]) - 1, /* 1 */
+	asn_DEF_or_2_tags,	/* Same as above */
+	sizeof(asn_DEF_or_2_tags)
+		/sizeof(asn_DEF_or_2_tags[0]), /* 2 */
+	asn_MBR_or_2,
 	1,	/* Single element */
-	&asn_DEF_or_specs	/* Additional specs */
+	&asn_SPC_or_2_specs	/* Additional specs */
 };
 
-static asn_TYPE_member_t asn_MBR_Choice_1[] = {
+static asn_TYPE_member_t asn_MBR_Choice_1_1[] = {
 	{ ATF_POINTER, 0, offsetof(struct Choice_1, choice.and),
 		.tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
 		.tag_mode = +1,	/* EXPLICIT tag at current level */
@@ -288,7 +288,7 @@
 	{ ATF_NOFLAGS, 0, offsetof(struct Choice_1, choice.or),
 		.tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
 		.tag_mode = -1,	/* IMPLICIT tag at current level */
-		.type = (void *)&asn_DEF_or,
+		.type = (void *)&asn_DEF_or_2,
 		.memb_constraints = 0,	/* Defer constraints checking to the member type */
 		.name = "or"
 		},
@@ -307,18 +307,18 @@
 		.name = "other"
 		},
 };
-static asn_TYPE_tag2member_t asn_DEF_Choice_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Choice_1_1_tag2el[] = {
     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* and at 22 */
     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* or at 23 */
     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* not at 24 */
     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 3, 0, 0 } /* other at 26 */
 };
-static asn_CHOICE_specifics_t asn_DEF_Choice_1_specs = {
+static asn_CHOICE_specifics_t asn_SPC_Choice_1_1_specs = {
 	sizeof(struct Choice_1),
 	offsetof(struct Choice_1, _asn_ctx),
 	offsetof(struct Choice_1, present),
 	sizeof(((struct Choice_1 *)0)->present),
-	asn_DEF_Choice_1_tag2el,
+	asn_MAP_Choice_1_1_tag2el,
 	4,	/* Count of tags in the map */
 	0	/* Whether extensible */
 };
@@ -337,9 +337,9 @@
 	0,	/* No effective tags (count) */
 	0,	/* No tags (pointer) */
 	0,	/* No tags (count) */
-	asn_MBR_Choice_1,
+	asn_MBR_Choice_1_1,
 	4,	/* Elements count */
-	&asn_DEF_Choice_1_specs	/* Additional specs */
+	&asn_SPC_Choice_1_1_specs	/* Additional specs */
 };
 
 
@@ -377,7 +377,7 @@
 
 /*** <<< STAT-DEFS [Test-structure-2] >>> ***/
 
-static asn_TYPE_member_t asn_MBR_Test_structure_2[] = {
+static asn_TYPE_member_t asn_MBR_Test_structure_2_1[] = {
 	{ ATF_POINTER, 1, offsetof(struct Test_structure_2, m1),
 		.tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
 		.tag_mode = 0,
@@ -386,25 +386,25 @@
 		.name = "m1"
 		},
 };
-static ber_tlv_tag_t asn_DEF_Test_structure_2_tags[] = {
+static ber_tlv_tag_t asn_DEF_Test_structure_2_1_tags[] = {
 	(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
 };
-static asn_TYPE_tag2member_t asn_DEF_Test_structure_2_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Test_structure_2_1_tag2el[] = {
     { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* m1 at 28 */
 };
-static uint8_t asn_DEF_Test_structure_2_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
+static uint8_t asn_MAP_Test_structure_2_1_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
 	(0 << 7)
 };
-static asn_SET_specifics_t asn_DEF_Test_structure_2_specs = {
+static asn_SET_specifics_t asn_SPC_Test_structure_2_1_specs = {
 	sizeof(struct Test_structure_2),
 	offsetof(struct Test_structure_2, _asn_ctx),
 	offsetof(struct Test_structure_2, _presence_map),
-	asn_DEF_Test_structure_2_tag2el,
+	asn_MAP_Test_structure_2_1_tag2el,
 	1,	/* Count of tags in the map */
-	asn_DEF_Test_structure_2_tag2el,	/* Same as above */
+	asn_MAP_Test_structure_2_1_tag2el,	/* Same as above */
 	1,	/* Count of tags in the CXER map */
 	0,	/* Whether extensible */
-	(unsigned int *)asn_DEF_Test_structure_2_mmap	/* Mandatory elements map */
+	(unsigned int *)asn_MAP_Test_structure_2_1_mmap	/* Mandatory elements map */
 };
 asn_TYPE_descriptor_t asn_DEF_Test_structure_2 = {
 	"Test-structure-2",
@@ -417,15 +417,15 @@
 	SET_decode_xer,
 	SET_encode_xer,
 	0,	/* Use generic outmost tag fetcher */
-	asn_DEF_Test_structure_2_tags,
-	sizeof(asn_DEF_Test_structure_2_tags)
-		/sizeof(asn_DEF_Test_structure_2_tags[0]), /* 1 */
-	asn_DEF_Test_structure_2_tags,	/* Same as above */
-	sizeof(asn_DEF_Test_structure_2_tags)
-		/sizeof(asn_DEF_Test_structure_2_tags[0]), /* 1 */
-	asn_MBR_Test_structure_2,
+	asn_DEF_Test_structure_2_1_tags,
+	sizeof(asn_DEF_Test_structure_2_1_tags)
+		/sizeof(asn_DEF_Test_structure_2_1_tags[0]), /* 1 */
+	asn_DEF_Test_structure_2_1_tags,	/* Same as above */
+	sizeof(asn_DEF_Test_structure_2_1_tags)
+		/sizeof(asn_DEF_Test_structure_2_1_tags[0]), /* 1 */
+	asn_MBR_Test_structure_2_1,
 	1,	/* Elements count */
-	&asn_DEF_Test_structure_2_specs	/* Additional specs */
+	&asn_SPC_Test_structure_2_1_specs	/* Additional specs */
 };
 
 
@@ -463,7 +463,7 @@
 
 /*** <<< STAT-DEFS [Test-structure-3] >>> ***/
 
-static asn_TYPE_member_t asn_MBR_Test_structure_3[] = {
+static asn_TYPE_member_t asn_MBR_Test_structure_3_1[] = {
 	{ ATF_POINTER, 1, offsetof(struct Test_structure_3, m1),
 		.tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
 		.tag_mode = 0,
@@ -472,25 +472,25 @@
 		.name = "m1"
 		},
 };
-static ber_tlv_tag_t asn_DEF_Test_structure_3_tags[] = {
+static ber_tlv_tag_t asn_DEF_Test_structure_3_1_tags[] = {
 	(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
 };
-static asn_TYPE_tag2member_t asn_DEF_Test_structure_3_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Test_structure_3_1_tag2el[] = {
     { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* m1 at 29 */
 };
-static uint8_t asn_DEF_Test_structure_3_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
+static uint8_t asn_MAP_Test_structure_3_1_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
 	(0 << 7)
 };
-static asn_SET_specifics_t asn_DEF_Test_structure_3_specs = {
+static asn_SET_specifics_t asn_SPC_Test_structure_3_1_specs = {
 	sizeof(struct Test_structure_3),
 	offsetof(struct Test_structure_3, _asn_ctx),
 	offsetof(struct Test_structure_3, _presence_map),
-	asn_DEF_Test_structure_3_tag2el,
+	asn_MAP_Test_structure_3_1_tag2el,
 	1,	/* Count of tags in the map */
-	asn_DEF_Test_structure_3_tag2el,	/* Same as above */
+	asn_MAP_Test_structure_3_1_tag2el,	/* Same as above */
 	1,	/* Count of tags in the CXER map */
 	0,	/* Whether extensible */
-	(unsigned int *)asn_DEF_Test_structure_3_mmap	/* Mandatory elements map */
+	(unsigned int *)asn_MAP_Test_structure_3_1_mmap	/* Mandatory elements map */
 };
 asn_TYPE_descriptor_t asn_DEF_Test_structure_3 = {
 	"Test-structure-3",
@@ -503,14 +503,14 @@
 	SET_decode_xer,
 	SET_encode_xer,
 	0,	/* Use generic outmost tag fetcher */
-	asn_DEF_Test_structure_3_tags,
-	sizeof(asn_DEF_Test_structure_3_tags)
-		/sizeof(asn_DEF_Test_structure_3_tags[0]), /* 1 */
-	asn_DEF_Test_structure_3_tags,	/* Same as above */
-	sizeof(asn_DEF_Test_structure_3_tags)
-		/sizeof(asn_DEF_Test_structure_3_tags[0]), /* 1 */
-	asn_MBR_Test_structure_3,
+	asn_DEF_Test_structure_3_1_tags,
+	sizeof(asn_DEF_Test_structure_3_1_tags)
+		/sizeof(asn_DEF_Test_structure_3_1_tags[0]), /* 1 */
+	asn_DEF_Test_structure_3_1_tags,	/* Same as above */
+	sizeof(asn_DEF_Test_structure_3_1_tags)
+		/sizeof(asn_DEF_Test_structure_3_1_tags[0]), /* 1 */
+	asn_MBR_Test_structure_3_1,
 	1,	/* Elements count */
-	&asn_DEF_Test_structure_3_specs	/* Additional specs */
+	&asn_SPC_Test_structure_3_1_specs	/* Additional specs */
 };