- Created by Mark Juras on Jul 25, 2018
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
Version 1 Current »
The TypeInference Service Class
The service class TypeInference contains methods related to the type inference operations made during migrations. There are two types of operations performed in this context -- first, the actual changing of a components binary types or context flags and second, the insertion of a conversion operator into the code to compenstate for a type or status mismatch. Though currently incomplete the eventual goal of this class is not only to reform the indicated operations but also to record those operations for later analysis.The field TypeInference_HostFile
Prototypeint TypeInference_HostFile = 0
The method TypeInference_ArrayCast
Prototypeint TypeInference_ArrayCast(int iCall,int subRoot,int icode,int castType,int rank)
Parameter | Description |
iCall | specifies a unique number relative to this method defining which at which particular point in the migration process it was called. Though these are magic numbers, a particular call n can be located by searching for "TypeInference_ArrayCast(n," in the code. |
subRoot | specifies the root offset of the component whose code is being modified. |
icode | specifies the offset in the code block at which operation is to be inserted. In some cases the calling method has already allocated the space for the operation. In this case a negative icode value is passed. |
castType | specifies type of the array cast. |
rank | specifies the rank of the array cast. |
The method returns the number of bytes the the code block was expanded by.
The method TypeInference_InsertCast
Prototypeint TypeInference_InsertCast(int iCall,int subRoot,int icode,int typeOper,int castType,int castOper);
Parameter | Description |
iCall | specifies a unique number relative to this method defining which at which particular point in the migration process it was called. Though these are magic numbers, a particular call n can be located by searching for "TypeInference_InsertCast(n," in the code. |
subRoot | specifies the root offset of the component whose code is being modified. |
icode | specifies the offset in the code block at which operation is to be inserted. In some cases the calling method has already allocated the space for the operation. In this case a negative icode value is passed. |
typeOper | specifies the opcode to be used to cast the type. |
castType | specifies subcode value which is the output type of the operation. |
castOper | specifies the CNV subcode to be used to form the final operation. |
The method returns the number of bytes the the code block was expanded by.
The method TypeInference_InsertConversion
Prototypeint TypeInference_InsertConversion(int iCall,int subRoot,int icode, int conversion)
Parameter | Description |
iCall | specifies a unique number relative to this method defining which at which particular point in the migration process it was called. Though these are magic numbers, a particular call n can be located by searching for "TypeInference_InsertConversion(n," |
subRoot | specifies the root offset of the component whose code is being modified. |
icode | specifies the offset in the code block at which operation is to be inserted. In some cases the calling method has already allocated the space for the operation. In this case a negative icode value is passed. |
conversion | specifies the CNV subcode to be used to form the final operation. |
The method returns the number of bytes the the code block was expanded by.
The method TypeInference_ObjectOnly
Prototypevoid TypeInference_ObjectOnly(int iCall,int varBase,int type)
Parameter | Description |
iCall | specifies a unique number relative to this method defining which at which particular point in the migration process it was called. Though these are magic numbers, a particular call n can be located by searching for "TypeInference_ObjectOnly(n,". |
varVase | specifies the root offset of the component that is to be made ObjectOnly. |
type | specifies the low level type to be assigned to the component. THis is normally TYP_VARIANT or TYP_OBJECT. |
The method TypeInference_QuantityContext
Prototypevoid TypeInference_QuantityContext(int iCall,int varBase,int newFlags,int subRoot,int iNew)
Parameter | Description |
iCall | specifies a unique number relative to this method defining which at which particular point in the migration process it was called. Though these are magic numbers, a particular call n can be located by searching for "TypeInference_QuantityContext(n,". |
varVase | specifies the root offset of the component whose context flags are being changed. |
newFlags | specifies the new context flags. |
subRoot | specifies the root offset of the component whose code is causing the context change. |
iNew | specifies the offset of the last NEW operation found before the decision to do the change, if greater than zero. It is used to get the line number of the statement that caused the change. |
The method TypeInference_QuantityType
Prototypevoid TypeInference_QuantityType(int iCall,int varBase,int newType,int referType,int subRoot,int iNew)
Parameter | Description |
iCall | specifies a unique number relative to this method defining which at which particular point in the migration process it was called. Though these are magic numbers, a particular call n can be located by searching for "TypeInference_QuantityType(n,". |
varVase | specifies the root offset of the component whose binany type is being changed. |
newType | specifies the new binary type. A negative type indicates that any FixedType attribute associated with the quantity should be ignored. |
referType | specifies the reference of than new binary type or zerot if there is no associated reference. |
subRoot | specifies the root offset of the component whose code is causing the type change. |
iNew | specifies the offset of the last NEW operation found before the decision to do the type change, if greater than zero. |
Table of Contents
- No labels