Changeset 637 in dev for trunk/ab5.0/abdev/ab_common/src/Lexical/Meta.cpp
- Timestamp:
- Jun 11, 2008, 10:10:26 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/ab_common/src/Lexical/Meta.cpp
r636 r637 50 50 { 51 51 UserProc *pUserProc = meta.GetUserProcs().Iterator_GetNext(); 52 pUserProc->isTargetObjectModule = false; 52 if( pUserProc->IsExternal() ) 53 { 54 // 外部参照の場合は取り込まない 55 continue; 56 } 57 58 pUserProc->ResetRelationalObjectModuleIndex( relationTable ); 53 59 54 60 pUserProc->GetNativeCode().ResetDataSectionBaseOffset( dataSectionBaseOffset ); 55 pUserProc->GetNativeCode().ResetSourceIndexes( relationTable );56 61 57 62 this->userProcs.Put( pUserProc ); … … 64 69 { 65 70 DllProc *pDllProc = meta.GetDllProcs().Iterator_GetNext(); 66 pDllProc->isTargetObjectModule = false; 71 if( pDllProc->IsExternal() ) 72 { 73 // 外部参照の場合は取り込まない 74 continue; 75 } 76 77 pDllProc->ResetRelationalObjectModuleIndex( relationTable ); 67 78 this->dllProcs.Put( pDllProc ); 68 79 } … … 74 85 { 75 86 CClass *pClass = meta.GetClasses().Iterator_GetNext(); 76 pClass->isTargetObjectModule = false; 87 if( pClass->IsExternal() ) 88 { 89 // 外部参照の場合は取り込まない 90 continue; 91 } 92 93 pClass->ResetRelationalObjectModuleIndex( relationTable ); 77 94 pClass->Readed(); 78 95 this->GetClasses().Put( pClass ); … … 84 101 BOOST_FOREACH( Variable *pVar, meta.globalVars ) 85 102 { 103 if( pVar->IsExternal() ) 104 { 105 // 外部参照の場合は取り込まない 106 continue; 107 } 108 86 109 // 基底スコープレベルのグローバル変数の生存値をオンにする 87 110 if( pVar->GetScopeLevel() == 0 ) … … 99 122 } 100 123 101 pVar-> isTargetObjectModule = false;124 pVar->ResetRelationalObjectModuleIndex( relationTable ); 102 125 this->globalVars.Add( pVar, isResetOffsetAddress ); 103 126 } … … 113 136 { 114 137 CConst *pConst = meta.GetGlobalConsts().Iterator_GetNext(); 115 pConst->isTargetObjectModule = false; 138 if( pConst->IsExternal() ) 139 { 140 // 外部参照の場合は取り込まない 141 continue; 142 } 143 144 pConst->ResetRelationalObjectModuleIndex( relationTable ); 116 145 this->GetGlobalConsts().Put( pConst ); 117 146 } … … 123 152 { 124 153 ConstMacro *pConstMacro = meta.GetGlobalConstMacros().Iterator_GetNext(); 125 pConstMacro->isTargetObjectModule = false; 154 if( pConstMacro->IsExternal() ) 155 { 156 // 外部参照の場合は取り込まない 157 continue; 158 } 159 160 pConstMacro->ResetRelationalObjectModuleIndex( relationTable ); 126 161 this->GetGlobalConstMacros().Put( pConstMacro ); 127 162 } … … 131 166 BOOST_FOREACH( BlittableType &blittableType, meta.blittableTypes ) 132 167 { 133 blittableType.isTargetObjectModule = false;168 // TODO: coreモジュール以外でもBlittable型用のクラスモジュールを定義できるようにすべき 134 169 this->blittableTypes.push_back( blittableType ); 135 170 } … … 139 174 BOOST_FOREACH( TypeDef &typeDef, meta.typeDefs ) 140 175 { 141 typeDef.isTargetObjectModule = false; 176 if( typeDef.IsExternal() ) 177 { 178 // 外部参照の場合は取り込まない 179 continue; 180 } 181 182 typeDef.ResetRelationalObjectModuleIndex( relationTable ); 142 183 this->typeDefs.push_back( typeDef ); 143 184 } … … 147 188 BOOST_FOREACH( ProcPointer *pProcPointer, meta.procPointers ) 148 189 { 149 pProcPointer->isTargetObjectModule = false; 190 if( pProcPointer->IsExternal() ) 191 { 192 // 外部参照の場合は取り込まない 193 continue; 194 } 195 196 pProcPointer->ResetRelationalObjectModuleIndex( relationTable ); 150 197 this->procPointers.push_back( pProcPointer ); 151 198 } … … 157 204 { 158 205 Delegate *pDelegate = meta.GetDelegates().Iterator_GetNext(); 159 pDelegate->isTargetObjectModule = false; 206 if( pDelegate->IsExternal() ) 207 { 208 // 外部参照の場合は取り込まない 209 continue; 210 } 211 212 pDelegate->ResetRelationalObjectModuleIndex( relationTable ); 160 213 this->GetDelegates().Put( pDelegate ); 161 214 } … … 199 252 return NULL; 200 253 } 254 255 void Meta::Resolve() 256 { 257 // 関数・メソッド 258 this->GetUserProcs().Iterator_Init(); 259 this->GetUserProcs().Iterator_Reset(); 260 while( this->GetUserProcs().Iterator_HasNext() ) 261 { 262 UserProc *pUserProc = this->GetUserProcs().Iterator_GetNext(); 263 pUserProc->Resolve(); 264 } 265 266 // DLL関数 267 this->GetDllProcs().Iterator_Init(); 268 this->GetDllProcs().Iterator_Reset(); 269 while( this->GetDllProcs().Iterator_HasNext() ) 270 { 271 DllProc *pDllProc = this->GetDllProcs().Iterator_GetNext(); 272 pDllProc->Resolve(); 273 } 274 275 // クラス 276 this->GetClasses().Iterator_Init(); 277 this->GetClasses().Iterator_Reset(); 278 while( this->GetClasses().Iterator_HasNext() ) 279 { 280 CClass *pClass = this->GetClasses().Iterator_GetNext(); 281 pClass->Resolve(); 282 } 283 284 // グローバル変数 285 BOOST_FOREACH( Variable *pVar, globalVars ) 286 { 287 pVar->Resolve(); 288 } 289 290 // グローバル定数 291 this->GetGlobalConsts().Iterator_Init(); 292 this->GetGlobalConsts().Iterator_Reset(); 293 while( this->GetGlobalConsts().Iterator_HasNext() ) 294 { 295 CConst *pConst = this->GetGlobalConsts().Iterator_GetNext(); 296 pConst->Resolve(); 297 } 298 299 // グローバル定数マクロ 300 this->GetGlobalConstMacros().Iterator_Init(); 301 this->GetGlobalConstMacros().Iterator_Reset(); 302 while( this->GetGlobalConstMacros().Iterator_HasNext() ) 303 { 304 ConstMacro *pConstMacro = this->GetGlobalConstMacros().Iterator_GetNext(); 305 pConstMacro->Resolve(); 306 } 307 308 // TypeDef 309 BOOST_FOREACH( TypeDef &typeDef, typeDefs ) 310 { 311 typeDef.Resolve(); 312 } 313 314 // 関数ポインタ 315 BOOST_FOREACH( ProcPointer *pProcPointer, procPointers ) 316 { 317 pProcPointer->Resolve(); 318 } 319 320 // デリゲート 321 this->GetDelegates().Iterator_Init(); 322 this->GetDelegates().Iterator_Reset(); 323 while( this->GetDelegates().Iterator_HasNext() ) 324 { 325 Delegate *pDelegate = this->GetDelegates().Iterator_GetNext(); 326 pDelegate->Resolve(); 327 } 328 }
Note:
See TracChangeset
for help on using the changeset viewer.