Changeset 410 in dev for trunk/abdev
- Timestamp:
- Mar 3, 2008, 6:36:30 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler64/Compile_Var.cpp
r402 r410 208 208 //////////////////////////// 209 209 210 int memberIndex;211 i nt offset = objClass.GetMemberOffset( VarName, &memberIndex );212 if( memberIndex == objClass.GetDynamicMembers().size() ){210 const CMember *pMember = objClass.FindDynamicMember( VarName ); 211 if( !pMember ) 212 { 213 213 if(isErrorEnabled) SetError(103,VarName,cp); 214 214 return false; 215 215 } 216 216 217 CMember *pMember = objClass.GetDynamicMembers()[memberIndex];217 int offset = objClass.GetMemberOffset( VarName ); 218 218 219 219 … … 491 491 } 492 492 else{ 493 //クラス内メンバを参照するとき(通常) 494 495 bool isFound = false; 496 BOOST_FOREACH( CMember *pMember, compiler.pCompilingClass->GetDynamicMembers() ){ 497 if( pMember->GetName() == VarName ){ 498 isFound = true; 499 break; 500 } 501 } 502 if( !isFound ) goto NonClassMember; 493 //クラス内の動的メンバを参照するとき(通常) 494 495 if( !compiler.pCompilingClass->HasDynamicMember( VarName ) ) 496 { 497 goto NonClassMember; 498 } 503 499 } 504 500 … … 817 813 i=GetOneParameter(InitBuf,i,temporary); 818 814 819 i3=objClass.GetMemberOffset( pMember->GetName().c_str() , NULL);815 i3=objClass.GetMemberOffset( pMember->GetName().c_str() ); 820 816 821 817 if(!SetInitGlobalData(offset+i3, … … 985 981 i=GetOneParameter(InitBuf,i,temporary); 986 982 987 i3=objClass.GetMemberOffset( pMember->GetName().c_str() , NULL);983 i3=objClass.GetMemberOffset( pMember->GetName().c_str() ); 988 984 989 985 if(!InitLocalVar(offset+i3,
Note:
See TracChangeset
for help on using the changeset viewer.