Changeset 137 in dev for BasicCompiler_Common/DebugMiddleFile.cpp
- Timestamp:
- Jun 8, 2007, 3:11:47 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/DebugMiddleFile.cpp
r135 r137 327 327 i2+=sizeof(long); 328 328 for(i4=0;i4<pobj_c->iMemberNum;i4++){ 329 // 名前 329 330 lstrcpy(buffer+i2,pobj_c->ppobj_Member[i4]->GetName().c_str()); 330 331 i2+=lstrlen(buffer+i2)+1; 331 332 333 // 型 334 *(long *)(buffer+i2)=pobj_c->ppobj_Member[i4]->GetType().GetBasicType(); 335 i2+=sizeof(long); 336 337 // 型の拡張情報 338 SetLpIndex_DebugFile(buffer,&i2,pobj_c->ppobj_Member[i4]->GetType()); 339 340 // アクセシビリティ 341 *(Prototype::Accessibility *)(buffer+i2)=pobj_c->ppobj_Member[i4]->GetAccessibility(); 342 i2+=sizeof(Prototype::Accessibility); 343 332 344 memcpy(buffer+i2,pobj_c->ppobj_Member[i4]->SubScripts,sizeof(int)*MAX_ARRAYDIM); 333 345 i2+=sizeof(int)*MAX_ARRAYDIM; 334 335 //型336 *(long *)(buffer+i2)=pobj_c->ppobj_Member[i4]->GetBasicType();337 i2+=sizeof(long);338 339 //型の拡張情報340 SetLpIndex_DebugFile(buffer,&i2,*pobj_c->ppobj_Member[i4]);341 342 *(long *)(buffer+i2)=pobj_c->ppobj_Member[i4]->dwAccess;343 i2+=sizeof(long);344 346 345 347 //バッファが足りない場合は再確保 … … 354 356 i2+=sizeof(long); 355 357 foreach( const CMethod *pMethod, pobj_c->methods ){ 356 *( long *)(buffer+i2)=pMethod->dwAccess;357 i2+=sizeof( long);358 *(Prototype::Accessibility *)(buffer+i2)=pMethod->GetAccessibility(); 359 i2+=sizeof(Prototype::Accessibility); 358 360 if( pMethod->GetInheritsClassPtr() ){ 359 361 lstrcpy(buffer+i2,pMethod->GetInheritsClassPtr()->GetName().c_str()); … … 372 374 i2+=sizeof(long); 373 375 foreach( CMember *member, pobj_c->staticMembers ){ 376 // 名前 374 377 lstrcpy(buffer+i2,member->GetName().c_str()); 375 378 i2+=lstrlen(buffer+i2)+1; 376 379 380 // 型 381 *(long *)(buffer+i2)=member->GetType().GetBasicType(); 382 i2+=sizeof(long); 383 384 // 型の拡張情報 385 SetLpIndex_DebugFile(buffer,&i2,member->GetType()); 386 387 // アクセシビリティ 388 *(Prototype::Accessibility *)(buffer+i2)=member->GetAccessibility(); 389 i2+=sizeof(Prototype::Accessibility); 390 377 391 memcpy(buffer+i2,member->SubScripts,sizeof(int)*MAX_ARRAYDIM); 378 392 i2+=sizeof(int)*MAX_ARRAYDIM; 379 380 //型381 *(long *)(buffer+i2)=member->GetBasicType();382 i2+=sizeof(long);383 384 //型の拡張情報385 SetLpIndex_DebugFile(buffer,&i2,*member);386 387 *(long *)(buffer+i2)=member->dwAccess;388 i2+=sizeof(long);389 393 390 394 //バッファが足りない場合は再確保 … … 707 711 (CMember **)HeapAlloc(hHeap,0,pobj_c->iMemberNum*sizeof(CMember *)); 708 712 for(i4=0;i4<pobj_c->iMemberNum;i4++){ 709 pobj_c->ppobj_Member[i4]=new CMember(); 710 711 pobj_c->ppobj_Member[i4]->SetName( (char *)(buffer+i2));713 714 // 名前 715 string name = (char *)(buffer+i2); 712 716 i2+=lstrlen(buffer+i2)+1; 717 718 // 型 719 Type type( *(long *)(buffer+i2) ); 720 i2+=sizeof(long); 721 722 // 型の拡張情報 723 GetLpIndex_DebugFile(buffer,&i2,type); 724 725 // アクセシビリティ 726 Prototype::Accessibility accessibility = *(Prototype::Accessibility *)(buffer+i2); 727 i2+=sizeof(Prototype::Accessibility); 728 729 pobj_c->ppobj_Member[i4]=new CMember( accessibility, name, type, false ); 713 730 714 731 memcpy(pobj_c->ppobj_Member[i4]->SubScripts,buffer+i2,sizeof(int)*MAX_ARRAYDIM); 715 732 i2+=sizeof(int)*MAX_ARRAYDIM; 716 717 //型718 Type type( *(long *)(buffer+i2) );719 i2+=sizeof(long);720 721 //型の拡張情報722 GetLpIndex_DebugFile(buffer,&i2,type);723 724 pobj_c->ppobj_Member[i4]->SetType( type.GetBasicType(), type.GetIndex() );725 726 pobj_c->ppobj_Member[i4]->dwAccess=*(long *)(buffer+i2);727 i2+=sizeof(long);728 733 } 729 734 … … 733 738 for( i4=0; i4<nMethod; i4++ ){ 734 739 735 DWORD dwAccess=*(long*)(buffer+i2);736 i2+=sizeof( long);740 Prototype::Accessibility accessibility=*(Prototype::Accessibility *)(buffer+i2); 741 i2+=sizeof(Prototype::Accessibility); 737 742 738 743 char szInherits[VN_SIZE]; … … 758 763 } 759 764 760 CMethod *pMethod = new DynamicMethod( pUserProc, dwAccess, 0,0,false, pobj_InheritsClass);765 CMethod *pMethod = new DynamicMethod( pUserProc, accessibility, 0,0,false, pobj_InheritsClass); 761 766 762 767 pobj_c->methods.push_back( pMethod ); … … 767 772 i2+=sizeof(long); 768 773 for( i4=0; i4<nStaticMember; i4++ ){ 769 CMember *member=new CMember(); 770 771 member->SetName( (char *)(buffer+i2) ); 774 // 名前 775 string name = (char *)(buffer+i2); 772 776 i2+=lstrlen(buffer+i2)+1; 777 778 // 型 779 Type type( *(long *)(buffer+i2) ); 780 i2+=sizeof(long); 781 782 // 型の拡張情報 783 GetLpIndex_DebugFile(buffer,&i2,type); 784 785 // アクセシビリティ 786 Prototype::Accessibility accessibility = *(Prototype::Accessibility *)(buffer+i2); 787 i2+=sizeof(Prototype::Accessibility); 788 789 CMember *member=new CMember( accessibility, name, type, false ); 773 790 774 791 memcpy(member->SubScripts,buffer+i2,sizeof(int)*MAX_ARRAYDIM); 775 792 i2+=sizeof(int)*MAX_ARRAYDIM; 776 777 //型778 Type type( *(long *)(buffer+i2) );779 i2+=sizeof(long);780 781 //型の拡張情報782 GetLpIndex_DebugFile(buffer,&i2,type);783 784 member->SetType( type.GetBasicType(), type.GetIndex() );785 786 member->dwAccess=*(long *)(buffer+i2);787 i2+=sizeof(long);788 793 789 794 pobj_c->staticMembers.push_back( member );
Note:
See TracChangeset
for help on using the changeset viewer.