Changeset 64 in dev for BasicCompiler32/Compile_Func.cpp
- Timestamp:
- Mar 8, 2007, 2:49:34 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler32/Compile_Func.cpp
r51 r64 208 208 209 209 TYPEINFO TypeInfo={type,lpIndex}; 210 if(IsStringObjectType( &TypeInfo)){210 if(IsStringObjectType(TypeInfo)){ 211 211 //Stringオブジェクトの場合 212 212 char temporary[VN_SIZE]; … … 346 346 } 347 347 void Opcode_Func_SizeOf(const char *Parameter){ 348 int type,size;349 348 LONG_PTR lpIndex; 350 351 type=GetTypeFixed(Parameter,&lpIndex); 352 if(type==-1){ 353 extern int cp; 354 SetError(3,Parameter,cp); 355 return; 356 } 357 size=GetTypeSize(type,lpIndex); 349 int type = GetTypeFixed(Parameter,&lpIndex); 350 351 int size; 352 if( type == DEF_OBJECT ){ 353 CClass *pClass = (CClass *)lpIndex; 354 size = pClass->GetSize(); 355 } 356 else{ 357 size=GetTypeSize(type,lpIndex); 358 } 358 359 359 360 //mov eax,size 360 OpBuffer[obp++]=(char)0xB8; 361 *((long *)(OpBuffer+obp))=size; 362 obp+=sizeof(long); 361 op_mov_RV( REG_EAX, size ); 363 362 } 364 363 void Opcode_Func_VarPtr( const char *Parameter, TYPEINFO &ReturnTypeInfo ){ … … 368 367 if(!GetVarOffsetReadOnly( Parameter, &ReturnTypeInfo.type, &RelativeVar, &ReturnTypeInfo.u.lpIndex )) return; 369 368 369 int beforeType = ReturnTypeInfo.type; 370 370 371 PTR_LEVEL_UP( ReturnTypeInfo.type ); 371 372 372 373 SetVarPtrToEax(&RelativeVar); 374 375 if( beforeType == DEF_OBJECT && lstrcmpi( Parameter, "This" ) != 0 ){ 376 //参照をオブジェクトポインタに変更 377 378 //mov eax,dword ptr[eax] 379 op_mov_RM( sizeof(long), REG_EAX, REG_EAX, 0, MOD_BASE ); 380 } 373 381 } 374 382 void Opcode_Func_GetPtrData(const char *Parameter,const int type){
Note:
See TracChangeset
for help on using the changeset viewer.