Changeset 330 in dev for trunk/abdev/BasicCompiler64/Compile_Func.cpp
- Timestamp:
- Sep 26, 2007, 3:00:09 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler64/Compile_Func.cpp
r325 r330 14 14 if( lstrcmpi( FuncName, "VarPtr" ) == 0 ) return FUNC_VARPTR; 15 15 if( lstrcmpi( FuncName, "ObjPtr" ) == 0 ) return FUNC_OBJPTR; 16 if( lstrcmpi( FuncName, "__unsafe_call" ) == 0 ) return FUNC_UNSAFE_CALL; 16 if( lstrcmpi( FuncName, "__delegate_dynamicmethod_call" ) == 0 ) return FUNC_DELEGATE_DYNAMICMETHOD_CALL; 17 if( lstrcmpi( FuncName, "__delegate_staticmethod_call" ) == 0 ) return FUNC_DELEGATE_STATICMETHOD_CALL; 17 18 if( lstrcmpi( FuncName, "GetDouble" ) == 0 ) return FUNC_GETDOUBLE; 18 19 if( lstrcmpi( FuncName, "GetSingle" ) == 0 ) return FUNC_GETSINGLE; … … 253 254 } 254 255 255 void Opcode_Func_ unsafe_call( const char *paramsStr, Type &resultType, bool isCallOn )256 void Opcode_Func_delegate_call( const char *paramsStr, Type &resultType, bool isDynamicCall, bool isCallOn ) 256 257 { 257 258 if( isCallOn ) 258 259 { 259 260 int i = 0; 260 char methodPtrParamStr[8192]; 261 GetOneParameter( paramsStr, i, methodPtrParamStr ); 262 UnsafeCall( methodPtrParamStr, paramsStr + i ); 261 char methodPtrParamStr[VN_SIZE]; 262 i = GetOneParameter( paramsStr, i, methodPtrParamStr ); 263 264 char objPtrValueStr[VN_SIZE]; 265 if( isDynamicCall ) 266 { 267 i = GetOneParameter( paramsStr, i, objPtrValueStr ); 268 } 269 270 Opcode_CallDelegate( compiler.pCompilingClass->GetDelegate(), methodPtrParamStr, objPtrValueStr, paramsStr + i ); 263 271 } 264 272 … … 311 319 Opcode_Func_ObjPtr( Parameter, resultType, isCallOn ); 312 320 break; 313 case FUNC_UNSAFE_CALL: 314 Opcode_Func_unsafe_call( Parameter, resultType, isCallOn ); 321 case FUNC_DELEGATE_DYNAMICMETHOD_CALL: 322 Opcode_Func_delegate_call( Parameter, resultType, true, isCallOn ); 323 break; 324 case FUNC_DELEGATE_STATICMETHOD_CALL: 325 Opcode_Func_delegate_call( Parameter, resultType, false, isCallOn ); 315 326 break; 316 327
Note:
See TracChangeset
for help on using the changeset viewer.