?? hla.hhf
字號:
ptInt16, ptInt16, ptInt16, ptInt16, ptInt32, ptInt64, ptInt128, // Int16-> ptWord, ptWord, ptDWord, ptQWord, ptTByte, ptLWord, ptInt16, ptInt16, ptInt32, ptInt64, ptInt128, ptInt16, ptInt16, ptReal32, ptReal64, ptReal80, ptInt16, ptInt16, ptInt32, ptInt32, ptInt32, ptInt32, ptInt32, ptInt64, ptInt128, // Int32-> ptDWord, ptDWord, ptDWord, ptQWord, ptTByte, ptLWord, ptInt32, ptInt32, ptInt32, ptInt64, ptInt128, ptInt32, ptInt32, ptReal32, ptReal64, ptReal80, ptInt32, ptInt32, ptInt64, ptInt64, ptInt64, ptInt64, ptInt64, ptInt64, ptInt128, // Int64-> ptQWord, ptQWord, ptQWord, ptQWord, ptTByte, ptLWord, ptInt64, ptInt64, ptInt64, ptInt64, ptInt128, ptInt64, ptInt64, ptReal32, ptReal64, ptReal80, ptInt64, ptInt64, ptInt128, ptInt128, ptInt128, ptInt128, ptInt128, ptInt128, ptInt128, // Int64-> ptLWord, ptLWord, ptLWord, ptLWord, ptLWord, ptLWord, ptInt128, ptInt128, ptInt128, ptInt128, ptInt128, ptInt128, ptInt128, ptInt128, ptInt128, ptInt128, ptInt128, ptInt128, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, // char-> ptByte, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, // WChar-> ptWChar, ptWord, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, // Real32-> ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal64, ptReal80, ptReal32, ptReal32, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, // Real64-> ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal32, ptReal64, ptReal80, ptReal64, ptReal64, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, // Real80-> ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal32, ptReal64, ptReal80, ptReal80, ptReal80, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, // Real128-> ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptString, ptString, ptString, ptString, ptString, ptString, ptString, // String-> ptString, ptString, ptDWord, ptString, ptString, ptString, ptString, ptString, ptString, ptString, ptString, ptString, ptString, ptString, ptString, ptString, ptString, ptString, ]; // The following is used to promote non-constant object types. _ovld_type_promotion: uns8[ 25, 25 ] := //[actualconst, formalType] [ ptBoolean, ptBoolean, // Boolean-> ptBoolean, ptBoolean, ptBoolean, ptBoolean, ptBoolean, ptByte, ptBoolean, ptBoolean, ptBoolean, ptBoolean, ptBoolean, ptBoolean, ptBoolean, ptBoolean, ptBoolean, ptBoolean, ptBoolean, ptBoolean, ptBoolean, ptBoolean, ptBoolean, ptBoolean, ptBoolean, ptEnum, ptEnum, // Enum-> ptEnum, ptEnum, ptEnum, ptEnum, ptEnum, #if( @enumsize = 2) ) ptEnum, ptWord, ptEnum, ptEnum, ptEnum, ptEnum, #elseif( @enumsize = 4 ) ptEnum, ptEnum, ptDWord, ptEnum, ptEnum, ptEnum, #else // If @enumsize is not 2 or 4, assume it's 1. ptByte, ptEnum, ptEnum, ptEnum, ptEnum, ptEnum, #endif ptEnum, ptEnum, ptEnum, ptEnum, ptEnum, ptEnum, ptEnum, ptEnum, ptEnum, ptEnum, ptEnum, ptEnum, ptUns8, ptUns8, ptUns8, ptUns8, ptUns8, ptUns8, ptUns8, // Uns8-> ptByte, ptUns8, ptUns8, ptUns8, ptUns8, ptUns8, ptUns8, ptUns8, ptUns8, ptUns8, ptUns8, ptUns8, ptUns8, ptUns8, ptUns8, ptUns8, ptUns8, ptUns8, ptUns16, ptUns16, ptUns16, ptUns16, ptUns16, ptUns16, ptUns16, // Uns16-> ptUns16, ptWord, ptUns16, ptUns16, ptUns16, ptUns16, ptUns16, ptUns16, ptUns16, ptUns16, ptUns16, ptUns16, ptUns16, ptUns16, ptUns16, ptUns16, ptUns16, ptUns16, ptUns32, ptUns32, ptUns32, ptUns32, ptUns32, ptUns32, ptUns32, // Uns32-> ptUns32, ptUns32, ptDWord, ptUns32, ptUns32, ptUns32, ptUns32, ptUns32, ptUns32, ptUns32, ptUns32, ptUns32, ptUns32, ptUns32, ptUns32, ptUns32, ptUns32, ptUns32, ptUns64, ptUns64, ptUns64, ptUns64, ptUns64, ptUns64, ptUns128, // Uns64-> ptUns64, ptUns64, ptUns64, ptQWord, ptUns64, ptUns64, ptUns64, ptUns64, ptUns64, ptUns64, ptUns64, ptUns64, ptUns64, ptUns64, ptUns64, ptUns64, ptUns64, ptUns64, ptUns128, ptUns128, ptUns128, ptUns128, ptUns128, ptUns128, ptUns128, // Uns128-> ptUns128, ptUns128, ptUns128, ptUns128, ptUns128, ptLWord, ptUns128, ptUns128, ptUns128, ptUns128, ptUns128, ptUns128, ptUns128, ptUns128, ptUns128, ptUns128, ptUns128, ptUns128, ptBoolean, ptEnum, ptUns8, ptByte, ptByte, ptByte, ptByte, // Byte-> ptByte, ptByte, ptByte, ptByte, ptByte, ptByte, ptInt8, ptByte, ptByte, ptByte, ptByte, ptChar, ptByte, ptByte, ptByte, ptByte, ptByte, ptByte, ptWord, ptWord, ptWord, ptUns16, ptWord, ptWord, ptWord, // Word-> ptWord, ptWord, ptWord, ptWord, ptWord, ptWord, ptWord, ptInt16, ptWord, ptWord, ptWord, ptWord, ptWChar, ptWord, ptWord, ptWord, ptWord, ptWord, ptDWord, ptDWord, ptDWord, ptDWord, ptUns32, ptDWord, ptDWord, // DWord-> ptDWord, ptDWord, ptDWord, ptDWord, ptDWord, ptDWord, ptDWord, ptDWord, ptInt32, ptDWord, ptDWord, ptDWord, ptDWord, ptDWord, ptDWord, ptDWord, ptDWord, ptString, ptQWord, ptQWord, ptQWord, ptQWord, ptQWord, ptUns64, ptQWord, // QWord-> ptQWord, ptQWord, ptQWord, ptQWord, ptQWord, ptQWord, ptQWord, ptQWord, ptQWord, ptInt64, ptQWord, ptQWord, ptQWord, ptQWord, ptQWord, ptQWord, ptQWord, ptQWord, ptTByte, ptTByte, ptTByte, ptTByte, ptTByte, ptTByte, ptTByte, // TByte-> ptTByte, ptTByte, ptTByte, ptTByte, ptTByte, ptTByte, ptTByte, ptTByte, ptTByte, ptTByte, ptTByte, ptTByte, ptTByte, ptTByte, ptTByte, ptTByte, ptTByte, ptTByte, ptLWord, ptLWord, ptLWord, ptLWord, ptLWord, ptLWord, ptUns128, // LWord-> ptLWord, ptLWord, ptLWord, ptLWord, ptLWord, ptLWord, ptLWord, ptLWord, ptLWord, ptLWord, ptInt128, ptLWord, ptLWord, ptLWord, ptLWord, ptLWord, ptLWord, ptLWord, ptInt8, ptInt8, ptInt8, ptInt8, ptInt8, ptInt8, ptInt8, // Int8-> ptByte, ptInt8, ptInt8, ptInt8, ptInt8, ptLWord, ptInt8, ptInt8, ptInt8, ptInt8, ptInt8, ptInt8, ptInt8, ptInt8, ptInt8, ptInt8, ptInt8, ptInt8, ptInt16, ptInt16, ptInt16, ptInt16, ptInt16, ptInt16, ptInt16, // Int16-> ptInt16, ptWord, ptInt16, ptInt16, ptInt16, ptInt16, ptInt16, ptInt16, ptInt16, ptInt16, ptInt16, ptInt16, ptInt16, ptInt16, ptInt16, ptInt16, ptInt16, ptInt16, ptInt32, ptInt32, ptInt32, ptInt32, ptInt32, ptInt32, ptInt32, // Int32-> ptInt32, ptInt32, ptDWord, ptInt32, ptInt32, ptInt32, ptInt32, ptInt32, ptInt32, ptInt32, ptInt32, ptInt32, ptInt32, ptInt32, ptInt32, ptInt32, ptInt32, ptInt32, ptInt64, ptInt64, ptInt64, ptInt64, ptInt64, ptInt64, ptInt64, // Int64-> ptInt64, ptInt64, ptInt64, ptQWord, ptInt64, ptInt64, ptInt64, ptInt64, ptInt64, ptInt64, ptInt64, ptInt64, ptInt64, ptInt64, ptInt64, ptInt64, ptInt64, ptInt64, ptInt128, ptInt128, ptInt128, ptInt128, ptInt128, ptInt128, ptInt128, // Int64-> ptInt128, ptInt128, ptInt128, ptInt128, ptInt128, ptLWord, ptInt128, ptInt128, ptInt128, ptInt128, ptInt128, ptInt128, ptInt128, ptInt128, ptInt128, ptInt128, ptInt128, ptInt128, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, // char-> ptByte, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, // WChar-> ptWChar, ptWord, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptWChar, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, // Real32-> ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal32, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, // Real64-> ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal64, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, // Real80-> ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal80, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, // Real128-> ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptReal128, ptString, ptString, ptString, ptString, ptString, ptString, ptString, // String-> ptString, ptString, ptDWord, ptString, ptString, ptString, ptString, ptString, ptString, ptString, ptString, ptString, ptString, ptString, ptString, ptString, ptString, ptString, ]; #macro overload( _ovld_parms_ ); ?@global:hla._ovld_count := 0; #keyword signature( string theSig ); ?@global:hla._ovld_curSig := @global:hla._parseSignature_( @text(theSig) ); #if( (@elements(@global:hla._ovld_curSig)-1 ) = @elements( _ovld_parms_ )) ?@global:hla._ovld_matched := true; #for ( @global:hla._ovld_index := 0 to (@elements( _ovld_parms_ )-1) ) // See if the type of the actual parameter matches // the corresponding formal type in the signature. // // Note that we have to use a different promotion algorithm // for constant operands versus other operands. This is because // constants can be easily promoted to other types by the // compiler. The actual promotion function is handled by // the _ovld_const_type_promotion and _ovld_type_promotion // lookup tables. // // Note: The lookup tables do not handle ptPointer types. They are // handled as a special case (converted to dword) in the code below // to save space in the lookup tables. ?@global:hla._ptypeFormal := @ptype( @text (@global:hla._ovld_curSig[@global:hla._ovld_index])); #if( @global:hla._ptypeFormal == @global:hla.ptPointer ) ?@global:hla._ptypeFormal := ptDWord; #endif ?@global:hla._ptypeActual := @ptype( @text(_ovld_parms_[@global:hla._ovld_index])); #if( @global:hla._ptypeActual == @global:hla.ptPointer ) ?@global:hla._ptypeActual := @global:hla.ptDWord; #endif #if ( @global:hla._ptypeFormal >= @global:hla.ptBoolean & @global:hla._ptypeFormal <= @global:hla.ptString & @global:hla._ptypeActual >= @global:hla.ptBoolean & @global:hla._ptypeActual <= @global:hla.ptString ) #if( @isconst( @text(_ovld_parms_[@global:hla._ovld_index]))) ?@global:hla._ptypeActual := @global:hla._ovld_const_type_promotion [ @global:hla._ptypeActual - @global:hla.ptBoolean, @global:hla._ptypeFormal - @global:hla.ptBoolean ]; #else ?@global:hla._ptypeActual := @global:hla._ovld_type_promotion [ @global:hla._ptypeActual - @global:hla.ptBoolean, @global:hla._ptypeFormal - @global:hla.ptBoolean ]; #endif #endif // Lame, make all enum types compatible: #if ( @global:hla._ptypeActual <> @global:hla.ptEnum & @global:hla._ptypeFormal <> @global:hla.ptEnum ) ?@global:hla._typeStr := @global:hla.ptypeStrs[ @global:hla._ptypeActual ]; ?@global:hla._ovld_matched := @global:hla._ovld_matched & @global:hla._ovld_curSig[@global:hla._ovld_index] = @global:hla._typeStr; #endif #endfor #if( @global:hla._ovld_matched ) ?@global:hla._ovld_count := @global:hla._ovld_count + 1; ?@global:hla._ovld_parmStr := "("; #for ( @global:hla._ovld_index := 0 to (@elements( _ovld_parms_ )-2) ) ?@global:hla._ovld_parmStr := @global:hla._ovld_parmStr + _ovld_parms_[ @global:hla._ovld_index ] + ","; #endfor ?@global:hla._ovld_parmStr := @global:hla._ovld_parmStr + #if( @elements(_ovld_parms_) >= 1 ) _ovld_parms_ [ @elements( _ovld_parms_) - 1 ] + #endif ")"; @text ( @global:hla._ovld_curSig [ @elements( @global:hla._ovld_curSig )-1 ] + @global:hla._ovld_parmStr ) #endif #endif #terminator endoverload; #if( @global:hla._ovld_count = 0 ) #error( "Failed to match any signatures" ) #elseif( @global:hla._ovld_count > 1 ) #error( "Invocation matched more than one signature" ) #endif #endmacro end hla;// The stuff in the _hla namespace is intended for use only// by the HLA standard library.namespace _hla; // The following macro allows us to turn a class function // into either a method or a procedure based on the // presence of "funcName" within a list of method names // passed to the class generating macro. #macro function( funcName ); #if( @index( methods, 0, @string:funcName) = -1 ) procedure funcName #else method funcName #endif #endmacro end _hla;#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -