Changeset 325 in dev for trunk/abdev/BasicCompiler32/Compile_Func.cpp
- Timestamp:
- Sep 25, 2007, 8:56:38 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/Compile_Func.cpp
r301 r325 9 9 10 10 int GetFunctionFromName(char *FuncName){ 11 if(lstrcmpi(FuncName,"CUDbl")==0) return FUNC_CUDBL; 12 if(lstrcmpi(FuncName,"Fix")==0) return FUNC_FIX; 13 if(lstrcmpi(FuncName,"Len")==0) return FUNC_LEN; 14 if(lstrcmpi(FuncName,"AddressOf")==0) return FUNC_ADDRESSOF; 15 if(lstrcmpi(FuncName,"SizeOf")==0) return FUNC_SIZEOF; 16 if(lstrcmpi(FuncName,"VarPtr")==0) return FUNC_VARPTR; 17 if(lstrcmpi(FuncName,"ObjPtr")==0) return FUNC_OBJPTR; 18 if(lstrcmpi(FuncName,"GetDouble")==0) return FUNC_GETDOUBLE; 19 if(lstrcmpi(FuncName,"GetSingle")==0) return FUNC_GETSINGLE; 20 if(lstrcmpi(FuncName,"GetQWord")==0) return FUNC_GETQWORD; 21 if(lstrcmpi(FuncName,"GetDWord")==0) return FUNC_GETDWORD; 22 if(lstrcmpi(FuncName,"GetWord")==0) return FUNC_GETWORD; 23 if(lstrcmpi(FuncName,"GetByte")==0) return FUNC_GETBYTE; 11 if( lstrcmpi( FuncName, "CUDbl" ) == 0 ) return FUNC_CUDBL; 12 if( lstrcmpi( FuncName, "Fix" ) == 0 ) return FUNC_FIX; 13 if( lstrcmpi( FuncName, "Len" ) == 0 ) return FUNC_LEN; 14 if( lstrcmpi( FuncName, "AddressOf" ) == 0 ) return FUNC_ADDRESSOF; 15 if( lstrcmpi( FuncName, "SizeOf" ) == 0 ) return FUNC_SIZEOF; 16 if( lstrcmpi( FuncName, "VarPtr" ) == 0 ) return FUNC_VARPTR; 17 if( lstrcmpi( FuncName, "ObjPtr" ) == 0 ) return FUNC_OBJPTR; 18 if( lstrcmpi( FuncName, "__delegate_dynamicmethod_call" ) == 0 ) return FUNC_DELEGATE_DYNAMICMETHOD_CALL; 19 if( lstrcmpi( FuncName, "__delegate_staticmethod_call" ) == 0 ) return FUNC_DELEGATE_STATICMETHOD_CALL; 20 if( lstrcmpi( FuncName, "GetDouble" ) == 0 ) return FUNC_GETDOUBLE; 21 if( lstrcmpi( FuncName, "GetSingle" ) == 0 ) return FUNC_GETSINGLE; 22 if( lstrcmpi( FuncName, "GetQWord" ) == 0 ) return FUNC_GETQWORD; 23 if( lstrcmpi( FuncName, "GetDWord" ) == 0 ) return FUNC_GETDWORD; 24 if( lstrcmpi( FuncName, "GetWord" ) == 0 ) return FUNC_GETWORD; 25 if( lstrcmpi( FuncName, "GetByte" ) == 0 ) return FUNC_GETBYTE; 24 26 return 0; 25 27 } … … 394 396 } 395 397 } 398 399 void Opcode_Func_delegate_call( const char *paramsStr, Type &resultType, bool isDynamicCall, bool isCallOn ) 400 { 401 if( isCallOn ) 402 { 403 int i = 0; 404 char methodPtrParamStr[VN_SIZE]; 405 i = GetOneParameter( paramsStr, i, methodPtrParamStr ); 406 407 char objPtrValueStr[VN_SIZE]; 408 if( isDynamicCall ) 409 { 410 i = GetOneParameter( paramsStr, i, objPtrValueStr ); 411 } 412 413 Opcode_CallDelegate( compiler.pCompilingClass->GetDelegate(), methodPtrParamStr, objPtrValueStr, paramsStr + i ); 414 } 415 416 resultType = UserProc::CompilingUserProc().ReturnType(); 417 } 418 396 419 void Opcode_Func_GetPtrData(const char *Parameter,const int type){ 397 420 Type tempType; … … 482 505 Opcode_Func_ObjPtr( Parameter, resultType, isCallOn ); 483 506 break; 507 case FUNC_DELEGATE_DYNAMICMETHOD_CALL: 508 Opcode_Func_delegate_call( Parameter, resultType, true, isCallOn ); 509 break; 510 case FUNC_DELEGATE_STATICMETHOD_CALL: 511 Opcode_Func_delegate_call( Parameter, resultType, false, isCallOn ); 512 break; 484 513 485 514 case FUNC_GETDOUBLE:
Note:
See TracChangeset
for help on using the changeset viewer.