Changeset 409 in dev for trunk/abdev/BasicCompiler32
- Timestamp:
- Mar 3, 2008, 6:33:29 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/Compile_Var.cpp
r402 r409 180 180 //////////////////////////// 181 181 182 int memberIndex;183 i nt offset = objClass.GetMemberOffset( VarName, &memberIndex );184 if(memberIndex==objClass.GetDynamicMembers().size()){182 const CMember *pMember = objClass.FindDynamicMember( VarName ); 183 if( !pMember ) 184 { 185 185 if(isErrorEnabled) SetError(103,VarName,cp); 186 186 return false; 187 187 } 188 188 189 CMember *pMember=objClass.GetDynamicMembers()[memberIndex];189 int offset = objClass.GetMemberOffset( VarName ); 190 190 191 191 … … 467 467 } 468 468 else{ 469 //クラス内メンバを参照するとき(通常) 470 471 bool isFound = false; 472 BOOST_FOREACH( CMember *pMember, compiler.pCompilingClass->GetDynamicMembers() ){ 473 if( pMember->GetName() == VarName ){ 474 isFound = true; 475 break; 476 } 477 } 478 if( !isFound ) goto NonClassMember; 469 //クラス内の動的メンバを参照するとき(通常) 470 471 if( !compiler.pCompilingClass->HasDynamicMember( VarName ) ) 472 { 473 goto NonClassMember; 474 } 479 475 } 480 476 … … 798 794 i=GetOneParameter(InitBuf,i,temporary); 799 795 800 i3=objClass.GetMemberOffset( pMember->GetName().c_str() , NULL);796 i3=objClass.GetMemberOffset( pMember->GetName().c_str() ); 801 797 802 798 if(!SetInitGlobalData(offset+i3, … … 966 962 i=GetOneParameter(InitBuf,i,temporary); 967 963 968 i3=objClass.GetMemberOffset( pMember->GetName().c_str() , NULL);964 i3=objClass.GetMemberOffset( pMember->GetName().c_str() ); 969 965 970 966 if(!InitLocalVar(offset+i3,
Note:
See TracChangeset
for help on using the changeset viewer.