Changeset 325 in dev for trunk/abdev/BasicCompiler64/Compile_Func.cpp
- Timestamp:
- Sep 25, 2007, 8:56:38 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler64/Compile_Func.cpp
r308 r325 9 9 10 10 int GetFunctionFromName(char *FuncName){ 11 if(lstrcmpi(FuncName,"Len")==0) return FUNC_LEN; 12 if(lstrcmpi(FuncName,"AddressOf")==0) return FUNC_ADDRESSOF; 13 if(lstrcmpi(FuncName,"SizeOf")==0) return FUNC_SIZEOF; 14 if(lstrcmpi(FuncName,"VarPtr")==0) return FUNC_VARPTR; 15 if(lstrcmpi(FuncName,"ObjPtr")==0) return FUNC_OBJPTR; 16 if(lstrcmpi(FuncName,"GetDouble")==0) return FUNC_GETDOUBLE; 17 if(lstrcmpi(FuncName,"GetSingle")==0) return FUNC_GETSINGLE; 18 if(lstrcmpi(FuncName,"GetQWord")==0) return FUNC_GETQWORD; 19 if(lstrcmpi(FuncName,"GetDWord")==0) return FUNC_GETDWORD; 20 if(lstrcmpi(FuncName,"GetWord")==0) return FUNC_GETWORD; 21 if(lstrcmpi(FuncName,"GetByte")==0) return FUNC_GETBYTE; 11 if( lstrcmpi( FuncName, "Len" ) == 0 ) return FUNC_LEN; 12 if( lstrcmpi( FuncName, "AddressOf" ) == 0 ) return FUNC_ADDRESSOF; 13 if( lstrcmpi( FuncName, "SizeOf" ) == 0 ) return FUNC_SIZEOF; 14 if( lstrcmpi( FuncName, "VarPtr" ) == 0 ) return FUNC_VARPTR; 15 if( lstrcmpi( FuncName, "ObjPtr" ) == 0 ) return FUNC_OBJPTR; 16 if( lstrcmpi( FuncName, "__unsafe_call" ) == 0 ) return FUNC_UNSAFE_CALL; 17 if( lstrcmpi( FuncName, "GetDouble" ) == 0 ) return FUNC_GETDOUBLE; 18 if( lstrcmpi( FuncName, "GetSingle" ) == 0 ) return FUNC_GETSINGLE; 19 if( lstrcmpi( FuncName, "GetQWord" ) == 0 ) return FUNC_GETQWORD; 20 if( lstrcmpi( FuncName, "GetDWord" ) == 0 ) return FUNC_GETDWORD; 21 if( lstrcmpi( FuncName, "GetWord" ) == 0 ) return FUNC_GETWORD; 22 if( lstrcmpi( FuncName, "GetByte" ) == 0 ) return FUNC_GETBYTE; 22 23 return 0; 23 24 } … … 251 252 } 252 253 } 254 255 void Opcode_Func_unsafe_call( const char *paramsStr, Type &resultType, bool isCallOn ) 256 { 257 if( isCallOn ) 258 { 259 int i = 0; 260 char methodPtrParamStr[8192]; 261 GetOneParameter( paramsStr, i, methodPtrParamStr ); 262 UnsafeCall( methodPtrParamStr, paramsStr + i ); 263 } 264 265 resultType = UserProc::CompilingUserProc().ReturnType(); 266 } 267 253 268 void Opcode_Func_GetPtrData( const char *Parameter, const int type ){ 254 269 int reg=REG_RAX; … … 296 311 Opcode_Func_ObjPtr( Parameter, resultType, isCallOn ); 297 312 break; 313 case FUNC_UNSAFE_CALL: 314 Opcode_Func_unsafe_call( Parameter, resultType, isCallOn ); 315 break; 298 316 299 317 case FUNC_GETDOUBLE:
Note:
See TracChangeset
for help on using the changeset viewer.