Explorar o código

Class and scope names are now stored in the ifc. Resolves #643

Brucey hai 1 ano
pai
achega
e8655e1c62
Modificáronse 3 ficheiros con 16 adicións e 18 borrados
  1. 6 5
      ctranslator.bmx
  2. 9 12
      iparser.bmx
  3. 1 1
      version.bmx

+ 6 - 5
ctranslator.bmx

@@ -5947,13 +5947,12 @@ End Rem
 			
 			
 			
 			
 			If classDecl.templateSource Then
 			If classDecl.templateSource Then
-				t :+ Enquote(classDecl.scope.munged)
-			
-				t :+ ",<"
-
 				Local s:String
 				Local s:String
-				
+
 				If classDecl.instArgs Then
 				If classDecl.instArgs Then
+					t :+ Enquote(classDecl.scope.munged + "|" + classDecl.munged)
+					t :+ ",<"
+
 					For Local ty:TType = EachIn classDecl.instArgs
 					For Local ty:TType = EachIn classDecl.instArgs
 						If s Then
 						If s Then
 							s :+ ","
 							s :+ ","
@@ -5961,6 +5960,8 @@ End Rem
 						s :+ ty.ToString()
 						s :+ ty.ToString()
 					Next
 					Next
 				Else
 				Else
+					t :+ Enquote(classDecl.scope.munged)
+					t :+ ",<"
 					s = "?"
 					s = "?"
 				End If
 				End If
 				
 				

+ 9 - 12
iparser.bmx

@@ -416,21 +416,18 @@ Type TIParser
 										
 										
 											cdecl = genDecl.GenClassInstance(args, True)
 											cdecl = genDecl.GenClassInstance(args, True)
 
 
-											cdecl.scope.munged = class.munged
-											cdecl.scope.scope = _appInstance
-
-											If Not cdecl.munged Then
-												Local mung:String = cdecl.scope.munged + "_" + cdecl.ident
-							
-												If cdecl.instArgs Then
-													For Local ty:TType = EachIn cdecl.instArgs
-														mung :+ TTranslator.TransMangleType(ty)
-													Next
-												End If
+											Local scopeMunged:String = class.munged
 
 
-												cdecl.munged = mung
+											If class.munged.Find("|") >= 0 Then
+												Local mung:String[] = class.munged.Split("|")
+												scopeMunged = mung[0]
+												
+												cdecl.munged = mung[1]
 											End If
 											End If
 
 
+											cdecl.scope.munged = scopeMunged
+											cdecl.scope.scope = _appInstance
+
 										End If
 										End If
 									
 									
 										' don't add to module
 										' don't add to module

+ 1 - 1
version.bmx

@@ -23,4 +23,4 @@
 '
 '
 SuperStrict
 SuperStrict
 
 
-Const BCC_VERSION:String = "0.141"
+Const BCC_VERSION:String = "0.142"