Browse Source

Tweaked type dstance calc. Fixes #368.

woollybah 6 years ago
parent
commit
8a4aea808c
1 changed files with 18 additions and 18 deletions
  1. 18 18
      type.bmx

+ 18 - 18
type.bmx

@@ -461,7 +461,7 @@ Type TIntType Extends TIntegralType
 		End If
 		End If
 		
 		
 		If WORD_SIZE = 4 And TLParamType(ty)<>Null Then
 		If WORD_SIZE = 4 And TLParamType(ty)<>Null Then
-			Return 0
+			Return 1
 		End If
 		End If
 		
 		
 		If TLongType(ty)<>Null Then
 		If TLongType(ty)<>Null Then
@@ -469,7 +469,7 @@ Type TIntType Extends TIntegralType
 		End If
 		End If
 
 
 		If WORD_SIZE = 8 And TLParamType(ty)<>Null Then
 		If WORD_SIZE = 8 And TLParamType(ty)<>Null Then
-			Return 2
+			Return 3
 		End If
 		End If
 		
 		
 		If TFloatType(ty)<>Null Then
 		If TFloatType(ty)<>Null Then
@@ -527,32 +527,32 @@ Type TUIntType Extends TIntegralType
 			End If
 			End If
 		End If
 		End If
 
 
-		If WORD_SIZE = 4 And (TSizeTType(ty)<>Null Or TWParamType(ty)<>Null) Then
-			Return 0
-		End If
-		
 		If TUIntType(ty)<>Null Then
 		If TUIntType(ty)<>Null Then
 			Return 0
 			Return 0
 		End If
 		End If
 
 
-		If TIntType(ty)<>Null Then
+		If WORD_SIZE = 4 And (TSizeTType(ty)<>Null Or TWParamType(ty)<>Null) Then
 			Return 1
 			Return 1
 		End If
 		End If
 		
 		
-		If WORD_SIZE = 8 And (TSizeTType(ty)<>Null Or TWParamType(ty)<>Null) Then
+		If TIntType(ty)<>Null Then
 			Return 2
 			Return 2
 		End If
 		End If
 		
 		
+		If WORD_SIZE = 8 And (TSizeTType(ty)<>Null Or TWParamType(ty)<>Null) Then
+			Return 3
+		End If
+		
 		If TULongType(ty)<>Null Then
 		If TULongType(ty)<>Null Then
-			Return 2
+			Return 3
 		End If
 		End If
 
 
 		If TLongType(ty)<>Null Then
 		If TLongType(ty)<>Null Then
-			Return 3
+			Return 4
 		End If
 		End If
 
 
 		If TFloatType(ty)<>Null Then
 		If TFloatType(ty)<>Null Then
-			Return 4
+			Return 5
 		End If
 		End If
 
 
 		If TDoubleType(ty)<>Null Then
 		If TDoubleType(ty)<>Null Then
@@ -615,12 +615,12 @@ Type TSizeTType Extends TIntegralType
 		End If
 		End If
 
 
 		If TWParamType(ty)<>Null Then
 		If TWParamType(ty)<>Null Then
-			Return 0
+			Return 1
 		End If
 		End If
 
 
 		If WORD_SIZE = 4 Then
 		If WORD_SIZE = 4 Then
 			If TUIntType(ty)<>Null Then
 			If TUIntType(ty)<>Null Then
-				Return 0
+				Return 1
 			End If
 			End If
 
 
 			If TIntType(ty)<>Null Then
 			If TIntType(ty)<>Null Then
@@ -649,7 +649,7 @@ Type TSizeTType Extends TIntegralType
 			
 			
 		Else
 		Else
 			If TULongType(ty)<>Null Then
 			If TULongType(ty)<>Null Then
-				Return 0
+				Return 1
 			End If
 			End If
 
 
 			If TLongType(ty)<>Null Then
 			If TLongType(ty)<>Null Then
@@ -912,7 +912,7 @@ Type TLongType Extends TIntegralType ' BaH Long
 		End If
 		End If
 		
 		
 		If WORD_SIZE = 8 And TLParamType(ty)<>Null Then
 		If WORD_SIZE = 8 And TLParamType(ty)<>Null Then
-			Return 0
+			Return 1
 		End If
 		End If
 
 
 		If TFloatType(ty)<>Null Then
 		If TFloatType(ty)<>Null Then
@@ -974,15 +974,15 @@ Type TULongType Extends TIntegralType
 		End If
 		End If
 
 
 		If WORD_SIZE = 8 And (TSizeTType(ty)<>Null Or TWParamType(ty)<>Null) Then
 		If WORD_SIZE = 8 And (TSizeTType(ty)<>Null Or TWParamType(ty)<>Null) Then
-			Return 0
+			Return 1
 		End If
 		End If
 		
 		
 		If TLongType(ty)<>Null Then
 		If TLongType(ty)<>Null Then
-			Return 1
+			Return 2
 		End If
 		End If
 
 
 		If TFloatType(ty)<>Null Then
 		If TFloatType(ty)<>Null Then
-			Return 2
+			Return 3
 		End If
 		End If
 
 
 		If TDoubleType(ty)<>Null Then
 		If TDoubleType(ty)<>Null Then